from hashlib import sha256 import itertools import xxhash hashes = [387926980213842431, 2951043163173678585, 16720874773084141888, 17181926294437511708, 9312877567425344755, 8363454362106170326, 15029944785333505497, 6016790709393671791, 11525417821618867588, ] def ispass(guess, seed): hash = xxhash.xxh64(''.join(guess), seed=seed).hexdigest() hash = int(hash,16) #print ("".join(guess)) #print (seed) #print (hash) if hash in hashes: print ("Found it!!") print (guess) print (seed) return True return False def find_password(): seed = 0 alphabet= 'abcdefghijklmnopqrstuvwxyz' while True: attempt_length = 6 print(seed) guesses = itertools.product(alphabet, repeat=attempt_length) # Guess: list of all 6 letter combinations. for guess in guesses: if ispass(guess, seed): return guess break print("inc seed") seed = seed+1 find_password()