https://buuoj.cn/challenges#[MRCTF2020]%E5%8D%83%E5%B1%82%E5%A5%97%E8%B7%AF
套娃题,拿脚本解压
import zipfile
name = '0573'
while True:
fz = zipfile.ZipFile(name + '.zip', 'r')
fz.extractall(pwd=bytes(name, 'utf-8'))
name = fz.filelist[0].filename[0:4]
fz.close()
解压出来六百多个压缩包,得到qr.txt
,qr.txt
内容是RGB
数据,整理成如下格式
使用脚本将RGB
数据写成图片
from PIL import Image
x = y = 200
img = Image.new("RGB",(x,y))
file = open('./qr.txt','r')
for width in range(0,x):
for height in range(0,y):
line = file.readline()
rgb = line.split(',')
img.putpixel((width,height),(int(rgb[0]),int(rgb[1]),int(rgb[2])))
img.save('flag.jpg')
得到如下图片
flag{ta01uyout1nreet1n0usandtimes}