import hashlib def hash(data, hash_type): return hashlib.new(hash_type, data.encode('utf-8')).hexdigest() if hash_type in hashlib.algorithms_available else "Ungültiger Hash-Typ" digits = input("zeichen:") hash_text = input("hash:") for a in hashlib.algorithms_available: print(a,end=",") print("") type = input("Hashtype:") i = 0 while 1 : n =i s = '' while n > 0: s = digits[n % len(digits)] + s n //= len(digits) hashed = hash(s,type) print(s,hashed) if hashed == hash_text: print("found: ",s,hashed) exit() i += 1