Skip to content

Instantly share code, notes, and snippets.

View geudrik's full-sized avatar

Pat Litke geudrik

View GitHub Profile
### Keybase proof
I hereby claim:
* I am geudrik on github.
* I am grodik (https://keybase.io/grodik) on keybase.
* I have a public key ASB2Fsc03z8RTwQ_7IERrY5PAfl8PPWoLx9Hl0uRKDD2Kwo
To claim this, I am signing this object:
@geudrik
geudrik / gist:0b0a898371a2492fc0aa3187c27e3926
Created September 30, 2016 15:29
Get value for a nested key, given a map list (list of keys to traverse)
# Taken from https://stackoverflow.com/questions/14692690/access-python-nested-dictionary-items-via-a-list-of-keys
# Reproduced for my own benefit later
data_dict = {
"a":{
"r": 1,
"s": 2,
"t": 3
},
"b":{
#! /usr/bin/env python2.7
#
# packetsummary.pl -> packetsummary.py
#
# Released under the BSD License (3-clause)
#
# Written by Pat Litke.
# Reason: GLP is too restrictive (yes, I'm pointing at you, Cuckoo)
# This is essentially a re-write of my Scapy based summary script (because scapy..)
#
@geudrik
geudrik / cobb_knock_sections.py
Last active September 5, 2015 19:07
Find rows in a CobbAP Datalog that indicate non-nominal values for DAM, FK, and FKL
#! /usr/bin/env python2.7
# Written by Pat Litke
# This is a total hack to indicate sections in a large Cobb AP datalog that need review
# Specifically, this script dumps out those sections where DAM, FK, and/or FKL are non-nominal
import csv
import sys
CSVRowNumber = 2 # Row 2 is the first row of data
@geudrik
geudrik / gist:870c8588479bce4d1578
Last active August 29, 2015 14:14
Show Disk Serial Numbers Next to Disk Letters (sde serialnumber)
ls -l /dev/disk/by-id |gawk 'match($11, /[a-z]{3}$/) && match($9, /^ata-/) { gsub("../", ""); print $11,"\t",$9 }' |sort
@geudrik
geudrik / getPETimestamp.py
Last active February 8, 2023 07:15
Read the PE Timestamp from a Windows Executable (PE) in Python
#! /usr/bin/env python2.7
#
# Author: Pat Litke (C) 2014
#
# This code is released under the WTFPL V2 http://www.wtfpl.net/
#
# License:
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
#