Skip to content

Instantly share code, notes, and snippets.

@Ge0rg3
Created April 9, 2019 09:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ge0rg3/742712ca4ff884426e28102b4ae5fb43 to your computer and use it in GitHub Desktop.
Save Ge0rg3/742712ca4ff884426e28102b4ae5fb43 to your computer and use it in GitHub Desktop.
A tool for bruteforcing the SHA256 hash leaderboard code, as part of HMGCC's BLK_BOX challenge
from hashlib import sha256
from itertools import product
hash = "B4BFAF4A11C4C962C46ECC384D799B26FF26AC60684FE1C5396364DFA20103D0".lower()
combos = ['k8', 'SK', 'jL', 'CN', '76', 'L5', 'OR', 'AW', 'x1', '7I', 'L5', '43']
checkFlag = lambda flag: hash == sha256(''.join(flag).encode()).hexdigest()
sequences = product(*combos)
for s in sequences:
if checkFlag(s):
print(f"Found!\n{''.join(s)}")
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment