如何解决UnicodeDecodeError: 'utf-8' 编解码器无法解码位置 5079973 中的字节 0xf1:继续字节无效
我有一个类似散列的代码,我试图通过尝试 "rockyou" password list 来暴力破解它。
我需要解码此字符串 2e84cb5f6c34b0a38fcdf99749
,但尝试 5m 后出现以下错误:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf1 in position 5079973: invalid continuation byte
def GGGGotate(lol):
bit = lol << 1
movebit = bit & 255
if (lol > 127 ):
movebit = movebit | 1
return (movebit)
t=4
list= open("password.txt").read().splitlines()
print(list)
c=0
while t== 4:
# value = input("Enter your value: ")
value=list[c]
print(value)
ListMoveBit = []
Index_Move_bit = 1
Index_Value = 0
ORD_value = []
ORD_key = []
Under_10 = []
Index_star = 0
Final_encrypted = ""
Passs = []
List_values_back = []
Uncrypt = []
for i in value:
ORD_value.append(ord(i))
a = ord("a")
ORD_key.append(a)
lol = int(ORD_key[0]) ^ int(ORD_value[0])
print(lol)
ListMoveBit.append(GGGGotate(lol))
for chars in ORD_value:
if Index_Value == 0:
Index_Value += 1
pass
else:
lol = int(ListMoveBit[Index_Value-1]) ^ int(chars)
ListMoveBit.append(GGGGotate(lol))
Index_Value += 1
for i in ListMoveBit:
Under_10.append("0")
for i in ListMoveBit:
if (i < 9):
Under_10[Index_star] = "1"
Index_star += 1
for i in ListMoveBit:
x = hex(i)
val = x[2:]
if(i > 9) and (i < 16):
Final_encrypted = Final_encrypted + "0" + val
else:
if (i<10):
Final_encrypted = Final_encrypted +"0"+val
else:
Final_encrypted = Final_encrypted + val
print("\nThe encrypted message is:")
print(Final_encrypted + "\n")
c=c+1
print(c)
if Final_encrypted =='2e84cb5f6c34b0a38fcdf99749':
print (value)enter code here
break
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。