Skip to content

Instantly share code, notes, and snippets.

@pqcfox
Created November 7, 2014 18:22
Show Gist options
  • Save pqcfox/d33aa53566502c1dde37 to your computer and use it in GitHub Desktop.
Save pqcfox/d33aa53566502c1dde37 to your computer and use it in GitHub Desktop.
A cute little dehasher.
import hashlib, sys
words = open('/usr/share/dict/words', 'r').read().splitlines()
hashes = [ hashlib.md5(w).hexdigest() for w in words ]
dictionary = dict(zip(hashes, words))
try:
print dictionary[sys.argv[1]]
except:
print "Could not decrypt hash."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment