记一道ctf实验平台上的misc题:convert
第一次进行转换发现出现rar,于是直接输出内容到rar文件
上脚本
with open('convert.txt','r') as f: strs = f.read() len1 = len(strs) list1 = [] list2 = [] list3 = [] for i in range(0,len1+1,8): list1.append(i) len2 = len(list1) for i in range(len2): if i != len2 - 1: list2.append(strs[list1[i]:list1[i+1]]) len3 = len(list2) for i in range(len3): list3.append(chr(int(list2[i],2))) with open('flag.rar','w') as f: f.write(''.join(list3))
解压后发现图片
右键打开看到base64编码
ZmxhZ3swMWEyNWVhM2ZkNjM0OWM2ZTYzNWExZDAxOTZlNzVmYn0=
二话不说,直接转
flag{01a25ea3fd6349c6e635a1d0196e75fb}