Skip to content

Instantly share code, notes, and snippets.

@cyb3rsalih
Last active October 2, 2018 21:24
Show Gist options
  • Save cyb3rsalih/14dd0a3ea657ffe2986c1f1315a0ddaa to your computer and use it in GitHub Desktop.
Save cyb3rsalih/14dd0a3ea657ffe2986c1f1315a0ddaa to your computer and use it in GitHub Desktop.
MD5 Bruteforce Attack Tool w/ Python
from itertools import permutations
import hashlib
m = hashlib.md5()
m.update("")
print m.hexdigest()
inputstr = "hackistanbul" # character set to get permutations
print inputstr
i = 0
perms = (p for p in permutations(inputstr)) # TODO Option for character length
for p in perms:
x = ''.join(p)
m.update(x)
print str(i)+"-"+x+ " -> "+m.hexdigest()
i+=1
if m.hexdigest() == "648f36df1522d896c713ed070f65ff62": # MD5 You search for. #TODO set it arg[0]
print "Found!! -> ",x
break
print "OVER ----"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment