1 2 3 4 5 6 7 8
| cipher = 'XXXXXXXXXXX' PASSWORD_MASK_ARRAY = [19, 78, 10, 15, 100, 213, 43, 23] Password = "" cipher = cipher[3:] for i in range(int(len(cipher) / 4)): c1 = int("0x" + cipher[i * 4:(i + 1) * 4], 16) c2 = c1 ^ PASSWORD_MASK_ARRAY[i % 8] Password = Password + chr(c2) print (Password)
|