Untitled
unknown
plain_text
a year ago
880 B
5
Indexable
import binascii #from backports.pbkdf2 import pbkdf2_hmac import hashlib pbkdf2salt = binascii.unhexlify('b876b03e431c10f21ae1752539e10ed3') rounds = 10 def hash(bin): encoded = bin.encode("utf8") key = hashlib.pbkdf2_hmac("sha1", encoded, pbkdf2salt, rounds, 32) return binascii.hexlify(key) cipertext_hashed_guess = b"ea2a1ee58b5695d7e9ee8a06900d19eadc442f218b457db81541622b2371ac4a" print(f"Searching for {cipertext_hashed_guess}") for i in range(0, 10000000): payload = str(i).rjust(7, '0') plaintext_guess = "PWNX{00000000000000000000" + payload + "111}" hashed_guess = hash(plaintext_guess) #print(plaintext_guess + '\r') if hashed_guess == cipertext_hashed_guess: print(f"\nFlag found! hash({plaintext_guess}) -> {hashed_guess}") break
Editor is loading...
Leave a Comment