下载压缩包发现解压错误。010打开发现文件尾部是zip压缩包的文件结尾(504B),将文件头改成zip的文件头,得出一张图片和一个压缩包
来经过结合题目和百度,终于搜到了,这么一个东西 对照得到whereisflag,拿去解压得到美丽的风景.zip和层层加密.txt
解压发现压缩包还存在密码
观察发现存在三个加密。1,摩斯侦探,2,篱笆地交叉2(应该是栅栏密码),3,加盐(MD5)
先把0全部替换成.,把1换成-,把空格换成/,解密得到
栅栏密码解密得到28D7C25B4056EB299CE03A78DA4FDB56,发现md5还是算不出来,在把这一串解密一次,得到298CDE70C32A57B84D0A546FEDBB2596,这一次md5算出来了
解码得到密码解压得到一张图片
先把字符串提取出来,。。发现qq提取不了,手动提取。。
MTM4NDAwMjE4MTYxNTg5Nzc2ODk2NzcxOTYyMTQzMTgzMzcwNjU0Njg0NDU1MTk4MzcwOTk3ODA3NDU1MDUzMjI1OTc5MTI2Mj
UxMDM4MjY3MDU5NzU4OTQ0MzAxNTQ2Nzg0OTU2MTY1NTUxMTQ4MDMxNzE4MDg4NzM4ODA1MzgyNDgyOTE0MTEwMTA5MzMxNTI4Mzg0OTI4OTM5MzgxMjg3MzA2MDE4NjExNDEyNTE2ODM4MzcyNjUzMzkz
拿去base64解密得到
138400218161589776896771962143183370654684455198370997807455053225979126251038267059758944301546784956165551148031718088738805382482914110109331528384928939381287306018611412516838372653393
到了这里,突然不会了,没思路了,网上百度看看大佬怎么写的
发现转为二进制后长度为625,即25*25,然后试着转为二维码,附上大佬的脚本
import PIL //PTL需要自行安装,命令pip install Pillow
from PIL import Image
MAX = 25 #图片边长
img = Image.new("RGB",(MAX,MAX))
str="1111111001110111001111111100000100001101010100000110111010011100101010111011011101010110000101011101101110101010111010101110110000010011001101010000011111111010101010101111111000000000100101000000000011000111011010110000110001000000010100001010111100001011110101100111110011100101101001100101010010111000101011100100101101001111110000110101011110011010000010010001011100001111000010011101010110001100101110101000111011111010100000000110001101000110001111111011001100101010101100000101111001110001100010111010011100011111101111011101001101111011010011101110100010011010010010110000010100011010011110011111111011011100101010001"
i = 0
for y in range (0,MAX):
for x in range (0,MAX):
if(str[i] == '1'):
img.putpixel([x,y],(0, 0, 0))
else:
img.putpixel([x,y],(255,255,255))
i = i+1
img.show()
img.save("flag.png")
得到二维码
扫码得到flag
bugku{wHat_a_iMagE_QR}