Very small python program that attempts to crack a md5 hash using an external wordlist.
d9432ac047f99766329e140a2cff5d6332507aaf07eda2699e62f22d3b80ae5d
#!/usr/bin/python
#Attempts to crack hash against any givin wordlist.
#http://darkcode.ath.cx/
#d3hydr8[at]gmail[dot]com
import md5, base64, sys
if len(sys.argv) != 3:
print "Usage: ./md5crack.py <hash> <wordlist>"
sys.exit(1)
pw = sys.argv[1]
wordlist = sys.argv[2]
try:
words = open(wordlist, "r")
except(IOError):
print "Error: Check your wordlist path\n"
sys.exit(1)
words = words.readlines()
print "\n",len(words),"words loaded..."
hashes = {}
for word in words:
hash = md5.new()
hash.update(word[:-1])
value = hash.hexdigest()
hashes[word[:-1]] = value
for (key, value) in hashes.items():
if pw == value:
print "Password is:",key,"\n"