BUUCTF MISC ZIP

This question irritated, write out a separate
first posted two pictures, one would use
Figure I
Figure II

This is the first title to 68 compressed,
Here Insert Picture Description
each compression bag only 4bytes size, so it is conceivable that crc blasting, write their own scripts are always killed, lazy found a script

 
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 = 'out'+str(i)+'.zip'
            crc = zipfile.ZipFile(file,'r').getinfo('data.txt').CRC
            CrackCrc(crc)

dic = string.ascii_letters + string.digits + '+/='

f = open('out.txt','w')
CrackZip()
print("CRC32碰撞完成")
f.close

 

Then the resulting string of base64 encoding, decoding hexadecimal
Here Insert Picture Description
so handy previous figures, see CF 90 73 we know that this is an incomplete rar, fill 526 172 21 1A 07 00 After storage decompression, get
Here Insert Picture Description
this very skin, and finally got flag.txt results give me a look at this,
then look at the second map, there is a 74 between the header and bit crc mark, this one is fixed, but we 7A is nowHere Insert Picture Description

7A will be changed to 74, extract
Here Insert Picture Description
the CMT where is the real flag of

Guess you like

Origin www.cnblogs.com/harmonica11/p/11365755.html