题目链接 : https://buuoj.cn/challenges#%E5%96%B5%E5%96%B5%E5%96%B5
LSB 隐写, 不过这次和之前不同了, 这次不是 RGB 的顺序读取, 这次是 BGR 顺序 :
导出 png, 处理一下文件头和文件尾 :
得到半张二维码, png
上 tweakpng
把图像的宽和高改成一样的, 得到整张二维码
然后反色扫码
扫码拿到一个百度网盘的压缩包
https://pan.baidu.com/s/1pLT2J4f#/
WinRAR 解压报错 :
搜了一圈是 ntfs 数据流隐写
导出 pyc, 上在线工具反编译 : https://tool.lu/pyc/
#!/usr/bin/env python
# visit http://tool.lu/pyc/ for more information
import base64
def encode():
flag = '*************'
ciphertext = []
for i in range(len(flag)):
s = chr(i ^ ord(flag[i]))
if i % 2 == 0:
s = ord(s) + 10
else:
s = ord(s) - 10
ciphertext.append(str(s))
return ciphertext[::-1]
ciphertext = [
'96',
'65',
'93',
'123',
'91',
'97',
'22',
'93',
'70',
'102',
'94',
'132',
'46',
'112',
'64',
'97',
'88',
'80',
'82',
'137',
'90',
'109',
'99',
'112']
解密脚本
import base64
ciphertext = ['96','65','93','123','91','97','22', '93','70','102','94','132','46','112','64','97','88','80','82','137','90','109','99','112']
ciphertext = ciphertext[::-1]
def decode():
code = ''
for i in range(24):
if(i%2 == 0):
a = int(ciphertext[i]) - 10
else:
a = int(ciphertext[i]) + 10
a = i ^ a
code = code + chr(a)
print(code)
decode()
flag{Y@e_Cl3veR_C1Ever!}