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 (将#修改为@)