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
| # The raw bytecode you dumped (with the missing 0x10 added back) bytecode = [ 0x10, 0x0, 0x20, 0x66, 0x30, 0x1, 0x40, 0x7, 0x10, 0x1, 0x20, 0x66, 0x30, 0x1, 0x40, 0x18, 0x10, 0x2, 0x20, 0x66, 0x30, 0x1, 0x40, 0x40, 0x10, 0x3, 0x20, 0x66, 0x30, 0x1, 0x40, 0x29, 0x10, 0x4, 0x20, 0x66, 0x30, 0x1, 0x40, 0x23, 0x10, 0x5, 0x20, 0x66, 0x30, 0x1, 0x40, 0xa, 0x10, 0x6, 0x20, 0x66, 0x30, 0x1, 0x40, 0x40, 0x10, 0x7, 0x20, 0x66, 0x30, 0x1, 0x40, 0x29, 0x10, 0x8, 0x20, 0x66, 0x30, 0x1, 0x40, 0x1f, 0x10, 0x9, 0x20, 0x66, 0x30, 0x1, 0x40, 0xa, 0x10, 0xa, 0x20, 0x66, 0x30, 0x1, 0x40, 0x3, 0x10, 0xb, 0x20, 0x66, 0x30, 0x1, 0x40, 0xa, 0x10, 0xc, 0x20, 0x66, 0x30, 0x1, 0x40, 0x1d, 0x10, 0xd, 0x20, 0x66, 0x30, 0x1, 0x40, 0x7, 0x10, 0xe, 0x20, 0x66, 0x30, 0x1, 0x40, 0xa, 0x10, 0xf, 0x20, 0x66, 0x30, 0x1, 0x40, 0x29, 0x10, 0x10, 0x20, 0x66, 0x30, 0x1, 0x40, 0x2, 0x10, 0x11, 0x20, 0x66, 0x30, 0x1, 0x40, 0x18, 0x10, 0x12, 0x20, 0x66, 0x30, 0x1, 0x40, 0xa, 0x10, 0x13, 0x20, 0x66, 0x30, 0x1, 0x40, 0x29, 0xff ]
flag = ""
# Loop through the bytecode in chunks of 8 bytes (1 block per character) for i in range(0, len(bytecode) - 1, 8): # The target byte is always the 8th byte in the block (index 7) target = bytecode[i + 7] # Reverse the math: (target - 1) ^ 0x66 original_char = (target - 1) ^ 0x66 flag += chr(original_char)
print(f"Decoded inner flag: {flag}") print(f"Full flag submission: flag{{{flag}}}")
|