Skip to content

Instantly share code, notes, and snippets.

@nsa-yoda
Last active December 16, 2015 21:59
Show Gist options
  • Save nsa-yoda/5503415 to your computer and use it in GitHub Desktop.
Save nsa-yoda/5503415 to your computer and use it in GitHub Desktop.
Brute force int MD5 cracker (ints up to 999,999,999) that do NOT start with 0.
import hashlib
def getHexDigest(value):
md5 = hashlib.md5()
md5.update(str(value).encode("utf-8"))
return md5.hexdigest()
def MD5BruteInt(integer):
hexdigest = getHexDigest(integer)
for i in range(999999999):
ihexdigest = getHexDigest(i)
if ihexdigest == hexdigest:
return str(i) + " " + hexdigest + " " + ihexdigest
break;
print(MD5BruteInt(418))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment