如何解决如何修复变量,使它们的评估结果相等?
当我输入“ hi”时,我有两个保存相同数据的变量。但是我的if语句将其评估为false。我不知道为什么会这样。
#modules
import hashlib as hl
import multiprocessing as mp
import playsound as ps
from os import system
#functions
def password():
file = open("crack.md5","r")
cont = file.read()
file.close()
for i in range(5):
system('cls')
user_in = str(input("Please input user password>> "))
hashed = hl.md5(user_in.encode())
hash_dig = hashed.hexdigest()
print(hash_dig)
print(cont)
if hash_dig == cont:
main(False)
else:
input("сука блять,ты не русский. это не верный\nPress enter to continue")
if i == 4:
input("To many attempts cyka blyat you will now be sent to gulag,press enter")
exit()
def main(locked):
if locked == True:
password()
while True:
print("yay you got it correct")
password()
为什么要这样做?我该如何解决?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。