import hashlib import itertools def bruteforce(passwordHash, hashtype): #bruteforce not working? wordlist = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_+{}:;',./?-=" y='' length=1 wordlistHash='' passwordHash=passwordHash while wordlistHash != passwordHash: for c in itertools.product(wordlist, repeat=length): word = y.join(c) if hashtype == 'md5': wordlistHash = hashlib.md5(word.encode("utf-8")).hexdigest() print(f"Trying password: {word}:{wordlistHash}") if wordlistHash == passwordHash: print(f"Found password: {word}") break else: print("Please either enter a md5 hash and restart the script") exit() length=length + 1 bruteforce('81dc9bdb52d04dc20036dbd8313ed055', 'md5')