1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| enc = [0x28, 0x50, 0xC1, 0x23, 0x98, 0xA1, 0x41, 0x36, 0x4C, 0x31, 0xCB, 0x52, 0x90, 0xF1, 0xAC, 0xCC, 0x0F, 0x6C, 0x2A, 0x89, 0x7F, 0xDF, 0x11, 0x84, 0x7F, 0xE6, 0xA2, 0xE0, 0x59, 0xC7, 0xC5, 0x46, 0x5D, 0x29, 0x38, 0x93, 0xED, 0x15, 0x7A, 0xFF] Mpinput = "hgame{0123456789012345678901234567890123}" enin = "magh10{e54329876321076541098543298763210" inenc = [ 0x23, 0xC1, 0x50, 0x28, 0x77, 0x32, 0xA1, 0x98, 0x14, 0xCE, 0x5D, 0x0E, 0x96, 0xE1, 0xAB, 0xF9, 0x8A, 0x75, 0x02, 0x57, 0xD7, 0x78, 0xD9, 0x39, 0xE0, 0xF4, 0xB9, 0x2B, 0x07, 0x9D, 0x81, 0x08, 0x9E, 0x68, 0x6A, 0x34, 0xB1, 0x0B, 0x7B, 0xB3] for i in range(40): print(hex(inenc[i] ^ ord(enin[i])),end=', ') key = [0x4e, 0xa0, 0x37, 0x40, 0x46, 0x2, 0xda, 0xfd, 0x21, 0xfa, 0x6e, 0x3c, 0xaf, 0xd9, 0x9c, 0xcf, 0xb9, 0x47, 0x33, 0x67, 0xe0, 0x4e, 0xec, 0xd, 0xd1, 0xc4, 0x80, 0x13, 0x32, 0xa9, 0xb2, 0x3a, 0xa7, 0x50, 0x5d, 0x2, 0x82, 0x39, 0x4a, 0x83] print() for i in range(10): print(chr(enc[i * 4] ^ key[i * 4 + 3]), end='') print(chr(enc[i * 4 + 1] ^ key[i * 4 + 2]), end='') print(chr(enc[i * 4 + 2] ^ key[i * 4 + 1]), end='') print(chr(enc[i * 4 + 3] ^ key[i * 4]), end='')
|