Skip to content

Instantly share code, notes, and snippets.

View woodrow's full-sized avatar

Steve Woodrow woodrow

View GitHub Profile
@woodrow
woodrow / get_gmail_recipients.py
Created January 15, 2012 10:12
Determine who you sent mail to from an expiring/expired email addresss
#!/usr/bin/env python
import imaplib
import email.parser
import pickle
import pprint
GMAIL_USERNAME = 'yourname@gmail.com'
GMAIL_PASSWORD = 'yourgmailpassword'
OLD_SENDER_ADDRESS = 'defuntaccount@mit.edu'
woodrow@woodrow-x200:~/tmp$ cat sort_test
1.2.3.4
2.3.4.5
12.3.2.4
12.2.3.4
12.2.3.5
11.2.3.4
1.12.3.4
20.2.3.4
21.2.3.4
@woodrow
woodrow / etc-motd
Created December 1, 2014 07:18
MOTD: BEWARE OF DOGE.
SO SECURE SYSTEM. AMAZE.
UNAUTHORIZED ACCESS MUCH PROHIBITED.
BEWARE OF DOGE. WOW.
░░░░░░░░░▄░░░░░░░░░░░░░░▄░░░░
░░░░░░░░▌▒█░░░░░░░░░░░▄▀▒▌░░░
░░░░░░░░▌▒▒█░░░░░░░░▄▀▒▒▒▐░░░
░░░░░░░▐▄▀▒▒▀▀▀▀▄▄▄▀▒▒▒▒▒▐░░░
░░░░░▄▄▀▒░▒▒▒▒▒▒▒▒▒█▒▒▄█▒▐░░░
░░░▄▀▒▒▒░░░▒▒▒░░░▒▒▒▀██▀▒▌░░░

Keybase proof

I hereby claim:

  • I am woodrow on github.
  • I am woodrow (https://keybase.io/woodrow) on keybase.
  • I have a public key whose fingerprint is 7901 C8DB 4886 EB01 4FC7 EBBA 8A10 C01C F186 88B8

To claim this, I am signing this object:

@woodrow
woodrow / ca_certs.patch
Created March 1, 2014 03:49
Root certificate changes in OSX 10.9.2/Security Update 2014-001
--- ca_certs-10.9.1.txt 2014-02-28 18:24:53.365172328 -0800
+++ ca_certs-10.9.2.txt 2014-02-28 18:25:18.209171996 -0800
@@ -1,1 +1,1 @@
-System Version: OS X 10.9.1 (13B42)
+System Version: OS X 10.9.2 (13C64)
@@ -2132,0 +2132,119 @@
+Certificate:
+ Data:
+ Version: 3 (0x2)
+ Serial Number:
#!/bin/bash
mkdir -p /tmp/ca_certs/ && rm -f /tmp/ca_certs/*
cd /tmp/ca_certs/
# dump root certs and split on cert boundary (assuming no more than 1000 root certs)
security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain | csplit -s -k -f ca_cert -n 3 - '/-----BEGIN CERTIFICATE-----/' '{1000}' >/dev/null 2>&1
# rename the certs based on their openssl subject_hash to ensure the certs are sortable
ls /tmp/ca_certs/ | xargs -n 1 sh -c 'mv $0 $(openssl x509 -hash -noout -in $0)'
# print the OS version in the first line
system_profiler SPSoftwareDataType | grep -o 'System Version.*$' > /tmp/ca_certs.txt
# dump the text of the certs in subject_hash-sorted order into certs.txt