#coding:utf-8 import zipfile import string import binascii defCrackCrc(crc): for i in dic : for j in dic: for p in dic: for q in dic: for m in dic: for n in dic: #文件大小为6B的6重循环 s=i+j+p+q+m+n if crc == (binascii.crc32(s) & 0xffffffff): print s #return defCrackZip(): for I inrange(2,3): file = 'crc.zip' f = zipfile.ZipFile(file, 'r') GetCrc = f.getinfo('crc/ad71bf43131c4b3fa27066a3b408f843/'+str(I)+'.txt') crc = GetCrc.CRC #以上3行为获取压缩包CRC32值的步骤 CrackCrc(crc)