下载文件后,发现一大堆zip,查看属性并扔进010查看也并无伪加密
根据题目和这么多zip猜测,应该需要把zip里的txt内容连起来,但txt被加密了,随机打开一个zip发现txt内容不大并且给了crc32,猜测是crc32爆破,找大佬wp用一下
# python3
import zipfile
import string
import binascii
def CrackCrc(crc):
for i in dic:
for j in dic:
for k in dic:
for h in dic:
s = i + j + k + h
if crc == (binascii.crc32(s.encode())):
f.write(s)
return
def CrackZip():
for i in range(0, 68):
file = 'XXX/out' + str(i) + '.zip'
crc = zipfile.ZipFile(file, 'r').getinfo('data.txt').CRC
CrackCrc(crc)
print('\r' + "loading:{:%}".format(float((i + 1) / 68)), end='')
dic = string.ascii_letters + string.digits + '+/='
f = open('crc32.txt', 'w')
print("\nCRC32begin")
CrackZip()
print("CRC32finished")
f.close()
import base64
base64_text = open('crc32.txt', 'r').read()
byte_stream = base64.b64decode(base64_text)
print(byte_stream)
open('new.txt', 'wb').write(byte_stream)
拿到new.txt后扔进010查看一下,发现结尾有点像rar的文件格式结尾,将rar文件头补齐并修改后缀名得到