问题描述
当我输入“ 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 (将#修改为@)