Skip to content

Instantly share code, notes, and snippets.

@Atticuss
Atticuss / vpc_flow_log_graph.py
Last active January 24, 2019 22:02
eat vpc flow logs -> dump to dgraph
import sys
import json
import boto3
import sqlite3
import pydgraph
from uuid import uuid4
dgraph_server = 'localhost:9080'
client_stub = pydgraph.DgraphClientStub(dgraph_server)
package main
import (
"bufio"
"fmt"
"net"
"strconv"
"strings"
)
@Atticuss
Atticuss / robo_kb.py
Last active May 17, 2019 23:59
Read in a file and pipe it through a virtual keyboard -- uses the pynput module
import time, string, sys
from pynput.keyboard import Key, Controller
kb = Controller()
shift_keys = {
'<' : ',',
':' : ';',
'>' : '.',
'+' : '=',
import sys,os
from stat import *
if len(sys.argv) < 2:
print('Usage: python fileperms.py <dir>')
sys.exit(1)
flist=[]
for (dirpath,dirname,filenames) in os.walk(sys.argv[1]):
flist.extend(['%s/%s'%(dirpath,filename) for filename in filenames])
import json
import plotly.offline as py
import plotly.graph_objs as go
import numpy as np
with open('temps_orig.txt', 'r') as f:
tempOrig = json.loads(f.read())
with open('fanspeeds_orig.txt','r') as f:
fanspeedOrig = json.loads(f.read())
with open('temps_external.txt', 'r') as f:
import subprocess,json,sys
numGPU = 4
hashcatLoc = '/home/atticuss/cudaHashcat-2.01/cudaHashcat64.bin'
cmd = [hashcatLoc, '-m', '0', '3858f62230ac3c915f300c664312c63f', '-a', '3', '?a?a?a?a?a?a?a?a?a', '--status', '--status-timer=1']
limit = 60 * 30 #30 minutes
temps = {}
fanspeeds = {}
count = 0
### Keybase proof
I hereby claim:
* I am atticuss on github.
* I am jonncallahan (https://keybase.io/jonncallahan) on keybase.
* I have a public key whose fingerprint is 1787 2104 316A 1CA5 75F2 858C ABA3 3E6B 64E7 4F53
To claim this, I am signing this object: