1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
| from ctypes import *
key = [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476]
def decrypt(v1, v2): sum = c_uint32(0xdeadbeef * 256) for i in range(256): sum.value -= 0xdeadbeef v2.value -= (((v1.value >> 3) ^ (v1.value << 6)) + v1.value) ^ (sum.value + key[(sum.value >> 0xb) & 3]) v1.value -= (((v2.value >> 7) ^ (v2.value << 2)) + v2.value) ^ (sum.value + key[sum.value & 3])
for i in range(4): print(chr((v1.value >> (8 * i)) & 0xff), end='') for i in range(4): print(chr((v2.value >> (8 * i)) & 0xff), end='')
enc = [0x33, 0xb2, 0x49, 0x8c, 0x39, 0xdd, 0x60, 0x5f, 0x5f, 0x77, 0x72, 0xab, 0x38, 0xd9, 0xed, 0xe7, 0xf3, 0xf0, 0x66, 0x67, 0x16, 0xc8, 0x53, 0x80, 0x71, 0xb2, 0xfa, 0x5e, 0x7c, 0x2b, 0xbb, 0xb, 0xe5, 0x88, 0x82, 0xb, 0x6, 0x8c, 0x8d, 0xad, 0x47, 0xb5, 0x85, 0xbb, 0x6, 0x8d, 0x1, 0x2b]
tabel1 = [0x31, 0xee, 0x17, 0x80, 0xe3, 0x2d, 0xa, 0xe5, 0x53, 0x33, 0x9e, 0x2e, 0x1d, 0x5, 0x6f, 0xb4, 0x51, 0x9a, 0x36, 0x5c, 0xbd, 0x8, 0xa2, 0x34, 0xa3, 0x65, 0x59, 0x62, 0xae, 0xef, 0xd, 0xd0, 0xbc, 0x30, 0x81, 0xeb, 0x8c, 0xe8, 0x22, 0xfd, 0x7e, 0x4a, 0x1e, 0x10, 0x27, 0xdd, 0x5a, 0xa4, 0xb, 0x29, 0xd5, 0x61, 0x9c, 0x48, 0x6e, 0x7d, 0xf1, 0xbe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0x2f, 0x83, 0x2b, 0x28, 0x4f, 0xe6, 0xf3, 0xdb, 0xce, 0xb1, 0x97, 0xed, 0x67, 0xab]
xor1 = [] add = [] xor2 = [] index = 0 sum_ = 0
for i in range(48): index = index + 1
sum_ = (sum_ + tabel1[index]) % 256
tabel1[sum_], tabel1[index] = tabel1[index], tabel1[sum_]
v15 = (tabel1[index] + tabel1[sum_]) % 256
xor1.append(tabel1[v15]) xor2.append(tabel1[sum_]) add.append(tabel1[index])
enc_2 = [] for i in range(len(enc)): enc_2.append((c_uint8(((enc[i] ^ xor2[i]) - add[i]) ^ xor1[i])).value)
tea = [] for i in range(0, len(enc), 4): tea.append((enc_2[i]) | (enc_2[i + 1] << 8) | (enc_2[i + 2] << 16) | (enc_2[i + 3] << 24))
for i in range(0, len(tea), 2): decrypt(c_uint32(tea[i]), c_uint32(tea[i + 1]))
|