Python script to convert mysqldump output to JSON file. Most of the code was borrowed from github.com/jamesmishra/mysqldump-to-csv
You'll want to update the 'parse_row' function to map each item in a row to a dictionary.
| /** A S I M P L E T W I T T E R B O T **/ | |
| /** ======================================= **/ | |
| // Config |
Python script to convert mysqldump output to JSON file. Most of the code was borrowed from github.com/jamesmishra/mysqldump-to-csv
You'll want to update the 'parse_row' function to map each item in a row to a dictionary.
| #!/usr/bin/env python | |
| ''' | |
| Analyze Apache log file to identify malicious request sources | |
| ''' | |
| from os import path | |
| import sys | |
| import urllib | |
| import json | |
| def apache2_logrow(s): |
| """ | |
| Remove Nessus findings by hostname or IP address from .nessus files | |
| Example usage: | |
| python nessus_exclude.py –d nessus_files/ -r 10.1.1.1,10.2.2.2,hostname.internal | |
| """ | |
| import os | |
| import xml.dom.minidom | |
| from optparse import OptionParser |
| from copy import copy | |
| import json | |
| import logging | |
| import requests | |
| class Cymon(object): | |
| def __init__(self, auth_token, endpoint='https://cymon.io/api/nexus/v1'): | |
| self.endpoint = endpoint |
| # Name: logentries.config | |
| # Description: configure rsyslogd to include logfiles from apache | |
| # | |
| # Steps: | |
| # 1. Save this file as .ebextensions/logentries.config | |
| # 2. Replace 'TOKEN' below (line 37) | |
| # 3. Deploy per normal scripts or aws.push. | |
| # | |
| files: | |
| "/etc/rsyslog.d/apache.conf" : |
| #!/usr/bin/python | |
| """ | |
| Decode quoted-printable text in a file | |
| """ | |
| import sys | |
| import quopri | |
| from BeautifulSoup import BeautifulSoup as bs | |
| print '\t\tHTML Extract0r 2014\n' |
| #!/bin/bash | |
| cd "$(dirname "$0")" | |
| while test $# -gt 0; do | |
| case "$1" in | |
| -h|--help) | |
| echo " " | |
| echo "domain watcher" | |
| echo " " |
| import imaplib | |
| import email | |
| from datetime import datetime | |
| ### | |
| ### Enter your IMAP server address here | |
| ### | |
| mail = imaplib.IMAP4_SSL('mail.example.com') | |
| ### | |
| ### Enter your email and password here |
| #!/usr/bin/env python | |
| """ | |
| Patch docx file with a tracking URL | |
| Author: Roy Firestein (roy[at]firestein[dot]net) | |
| Date: October 28, 2014 | |
| Based on code from https://docping.me |