moectf-xor 题解

image-20241017154109744

矛盾,结合len=45,应该是Buffer[45],按Y进行修改

image-20241017154202252

0i64应该是64位的0值i,然后看看程序逻辑,挺简单,就是^0x24要为byte中的变量,按u,然后选中这些字符,shift+e导出

image-20241017154424973

image-20241017154655673

写脚本:

a =[
  0x49, 0x4B, 0x41, 0x47, 0x50, 0x42, 0x5F, 0x41, 0x1C, 0x16,
  0x46, 0x10, 0x13, 0x1C, 0x40, 0x09, 0x42, 0x16, 0x46, 0x1C,
  0x09, 0x10, 0x10, 0x42, 0x1D, 0x09, 0x46, 0x15, 0x14, 0x14,
  0x09, 0x17, 0x16, 0x14, 0x41, 0x40, 0x40, 0x16, 0x14, 0x47,
  0x12, 0x40, 0x14, 0x59
]

for i in range(0, len(a)):
  print(chr(a[i] ^ 0x24), end='')