在此代码上:
##script qui brute force les hashs
import hashlib
while True :
try :
wordlist_user = input("entrez votre wordlist: ")
wordlist = open(wordlist_user, "r", encoding='utf-8')
hash = input('entrez le hash que vous oulez cracker (sha224) : ')
break
except :
print('Error')
for word in wordlist.readlines():
word = word.strip()
wordlist_hash = hashlib.sha224(word).hexdigest()
if (hash == wordlist_hash):
print('password trouve: ' +word)
else :
print('password non trouve')
Run Code Online (Sandbox Code Playgroud)
我有这个错误
wordlist_hash = hashlib.sha224(word).hexdigest() TypeError:字符串必须在散列之前进行编码
有人能帮我吗 ?
python-3.9 ×1