Skip to content

Instantly share code, notes, and snippets.

View wckd's full-sized avatar

Alexander Hansen wckd

  • Norway
View GitHub Profile
@wckd
wckd / gravatar_url.py
Created March 18, 2014 13:34
gravatar_url
import hashlib
def gravatar_url(email, size=120):
h = hashlib.new('md5')
h.update(email)
email_md5 = h.hexdigest()
gravatar = 'https://www.gravatar.com/avatar/{}.jpg?s={}'.format(email_md5, size)
return gravatar
@wckd
wckd / adobe_creds.py
Last active December 27, 2015 12:39
Open up the credentials file rom the adobe-hack (early october 2013), and get the nice content out. Use twitter or google to find the credentials-file, it's out there! :) For example: You can modify this script to put the values in a database, or dump to json etc. Whatever you feel like! :-)
for row, line in enumerate(open('cred', 'r')):
splitting = line.split('|')
if len(splitting) == 6:
uid = splitting[0].rstrip('-')
username = splitting[2].lstrip('-').rstrip('-')
pwhash = splitting[3].lstrip('-').rstrip('-')
print {'uid': uid, 'username': username, 'hash': pwhash}
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import imaplib
import getpass
import argparse
argparser = argparse.ArgumentParser(description="Dump a IMAP folder into .eml files")
argparser.add_argument('-s', dest='host', help="IMAP host, like imap.gmail.com", required=True)
argparser.add_argument('-u', dest='username', help="IMAP username", required=True)