标签:aaa 图片 pen git pad size flag this 压缩
MISC-1
提示:if you want to find the flag, this hint may be useful: the text files within each zip consist of only "printable" ASCII characters
给了53个加密压缩包,每个包分别含有一个txt文件,首先想到暴力破解压缩包,试过各种破解工具后发现并不能用,于是想到使用脚本。以下是py脚本:
1 #coding:utf-8 2 import zipfile 3 import string 4 import binascii 5 6 def CrackCrc(crc): 7 for i in dic: 8 for j in dic: 9 for p in dic: 10 for q in dic: 11 s = i + j + p + q 12 if crc == (binascii.crc32(s) & 0xffffffff): 13 print s 14 f.write(s) 15 return 16 17 def CrackZip(): 18 for I in range(53): 19 file = ‘chunk‘ + str(I) + ‘.zip‘ 20 f = zipfile.ZipFile(file, ‘r‘) 21 GetCrc = f.getinfo(‘data.txt‘) 22 crc = GetCrc.CRC 23 #以上3行为获取压缩包CRC32值的步骤 24 #print hex(crc) 25 CrackCrc(crc) 26 27 dic = string.ascii_letters + string.digits + ‘+/=‘ 28 29 f = open(‘out.txt‘, ‘w‘) 30 CrackZip() 31 f.close()
运行出来后得到一串疑似base64的东西:
UEsDBBQDAQAAAJFy1kgWujyNLwAAACMAAAAIAAAAZmxhZy50eHT/xhoeSnjMRLuArw2FXUAIWn8UQblChs4AF1dA nT4nB5hs2SkR4fTfZZRB56Bp/FBLAQI/AxQDAQAAAJFy1kgWujyNLwAAACMAAAAIAAAAAAAAAAAAIIC0gQAAAABmbGFnLnR4 dFBLBQYAAAAAAQABADYAAABVAAAAAAA=
base64在线解密后得到:
PKr?</#flag.txt?Jx? ]@ZAB?W@>‘ l??eA砩PK?r?</# flag.txtPK6U
怀疑是一个加密的压缩包。将原来得到的一串使用notepad++打开,使用插件base64decode保存为zip
在Linux下用fcrackzip爆破,得到密码:
解密后得到flag:flag{i_z1pp3d_a_zip_w1th_sum_zips}
标签:aaa 图片 pen git pad size flag this 压缩
原文地址:https://www.cnblogs.com/yang12318/p/9426875.html