Skip to content

Instantly share code, notes, and snippets.

View mrdmnd's full-sized avatar

Matthew Redmond mrdmnd

  • Self-Employed
  • San Francisco, CA
  • X @mrdmnd
View GitHub Profile
import string
# Algorithm for SMBC #2874 - the "fouriest" transform.
# Support bases 2-36.
BASE_LIST = string.digits + string.letters
def encode(integer, base):
# Stolen off the internet from somewhere,
# almost certainly guaranteed to be buggy.
base_list = BASE_LIST[:base]
@mrdmnd
mrdmnd / decklist_dl.py
Created August 26, 2012 00:26
TCG Player deck scraper
# Copyright 2012 Matt Redmond
__author__ = "mrdmnd@mit.edu"
import mechanize
from Queue import Queue, Empty
from threading import Thread
import re
queue = Queue()
break_regex = re.compile("<br>", re.IGNORECASE)
@mrdmnd
mrdmnd / kpbreaker.py
Created August 12, 2012 08:57
Quick bruteforcer. No results.
import sys
sys.path.append("./python-keepass/python")
from keepass import kpdb
byte_strings = [hex(x)[2:].rjust(2, '0').lower() for x in range(255)]
pass_template = "%s3b140a6ec5%sec"
num_tried = 0
for s1 in byte_strings:
for s2 in byte_strings:
tmp_pw = pass_template % (s1, s2)
num_tried += 1