Created
April 9, 2019 09:18
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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