picoctf/rev/keygenme_py/solve.py

19 lines
645 B
Python
Raw Normal View History

2024-09-01 23:15:27 +02:00
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p python3
import hashlib
print("picoCTF{1n_7h3_|<3y_of_", end="")
username_trial = b'MORTON'
print(hashlib.sha256(username_trial).hexdigest()[4], end="")
print(hashlib.sha256(username_trial).hexdigest()[5], end="")
print(hashlib.sha256(username_trial).hexdigest()[3], end="")
print(hashlib.sha256(username_trial).hexdigest()[6], end="")
print(hashlib.sha256(username_trial).hexdigest()[2], end="")
print(hashlib.sha256(username_trial).hexdigest()[7], end="")
print(hashlib.sha256(username_trial).hexdigest()[1], end="")
print(hashlib.sha256(username_trial).hexdigest()[8], end="")
print("}")