Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- codes = ['YAOONGPE', 'TEUZZYAE', 'TENNIPAE', 'LAXAALAA', 'YAEKPLAE', 'IEXGVYZA', 'YEXIKOYA', 'IPUGAGZP', 'GPKUAEZA',
- 'LOEKSAPA', 'ZPSLPXZA', 'PEEVAZTA', 'IAXVYEYE', 'ZAOKPZLE', 'GEOGNTAA', 'PEEKYPLA', 'GPEGKILA', 'PEKSVGLA']
- test_code = 'ZEXPYGLA'
- hex_map = dict()
- hex_map['A'] = 0x0
- hex_map['P'] = 0x1
- hex_map['Z'] = 0x2
- hex_map['L'] = 0x3
- hex_map['G'] = 0x4
- hex_map['I'] = 0x5
- hex_map['T'] = 0x6
- hex_map['Y'] = 0x7
- hex_map['E'] = 0x8
- hex_map['O'] = 0x9
- hex_map['X'] = 0xA
- hex_map['U'] = 0xB
- hex_map['K'] = 0xC
- hex_map['S'] = 0xD
- hex_map['V'] = 0xE
- hex_map['N'] = 0xF
- code = test_code
- print(hex(0x8000 + ((hex_map[code[3]] & 7) << 12) | ((hex_map[code[5]] & 7) << 8) | ((hex_map[code[4]] & 8) << 8) | (
- (hex_map[code[2]] & 7) << 4) | ((hex_map[code[1]] & 8) << 4) | (hex_map[code[4]] & 7) | (hex_map[code[3]] & 8)))
- print(((hex_map[code[1]] & 7) << 4) | ((hex_map[code[0]] & 8) << 4) | (
- hex_map[code[0]] & 7) | (hex_map[code[5]] & 8))
- print()
- for code in codes:
- compare = ((hex_map[code[7]] & 7) << 4) | ((hex_map[code[6]] & 8) << 4) | (
- hex_map[code[6]] & 7) | (hex_map[code[5]] & 8)
- address = 0x8000 + ((hex_map[code[3]] & 7) << 12) | ((hex_map[code[5]] & 7) << 8) | ((hex_map[code[4]] & 8) << 8) | (
- (hex_map[code[2]] & 7) << 4) | ((hex_map[code[1]] & 8) << 4) | (hex_map[code[4]] & 7) | (hex_map[code[3]] & 8)
- data = ((hex_map[code[1]] & 7) << 4) | ((hex_map[code[0]] & 8) << 4) | (
- hex_map[code[0]] & 7) | (hex_map[code[5]] & 8)
- print(hex(address), hex(data))
Add Comment
Please, Sign In to add comment