Buenas, hace tiempo hice un crackeador de hashes md5, ahora lo dejo mejorado.
El uso es simple, como argumentos el hash y el modo, m(minusculas), M(mayusculas) y N(numeros) los cuales se pueden juntar Ejemplo: "mMN".
Código simple pero muy mejorable, optimizable.
import sys
import itertools
import hashlib
import time
#Const
_m = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
'w', 'x', 'y', 'z']
_M = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
'W', 'X', 'Y', 'Z']
_N = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
#Help
def _help():
print ("==========================================================================\n"
" EnForcer v0.1 | encode\n"
"--------------------------------------------------------------------------\n"
" Usage: EnForcer.py [md5] [mode: m/M/N]\n"
"\n"
" Example: EnForcer.py 97a57645a3f0e1518f8c9f4d340d4c4f mMN\n"
"==========================================================================")
#Break
def _break(_md5, _chars):
_clen = 0
print '========================================='
print ' Breaking: ' + time.asctime()
print '-----------------------------------------'
while 1:
_clen += 1
for word in itertools.product(_chars, repeat=_clen):
_word = ''.join(word)
if _md5 == hashlib.md5(_word).hexdigest():
print ' Text: ' + _word
print ' MD5: ' + _md5
print '-----------------------------------------'
print ' Hash Cracked: ' + time.asctime()
print '========================================='
return
print ' Hash Not Cracked: ' + time.asctime()
print '========================================='
#Main
def _main(_md5, _mode):
_chain = ''
if 'm' in _mode:
_chain = _chain.join(_m)
if 'M' in _mode:
_chain = _chain.join(_M)
if 'N' in _mode:
_chain = _chain.join(_N)
if _chain == '':
_help()
return
_break(_md5, _chain)
#Args
if len(sys.argv) == 3:
_main(sys.argv[1], sys.argv[2])
else:
_help()