Back

Misc常用CRC32碰撞脚本

观察压缩包分割大小以及CRC32值可以尝试用遍历所有可能出现的字符(string.printable)进行碰撞猜解。

import binascii
import string

dic=string.printable #打印出字符表
crc1=0x7DE0AB32
crc2=0xB1441D53
crc3=0x49BD11F5
crc4=0xB42F1DFA
crc5=0x8163F43E
crc6=0x1FC8FEE5

for i in dic:
    for j in dic:
        for n in dic:
            for m in dic:
                s=i+j+n+m
                if(crc1==(binascii.crc32(s) & 0xffffffff)):
                    text1=s
                if (crc2 == (binascii.crc32(s) & 0xffffffff)):
                    text2=s
                if (crc3 == (binascii.crc32(s) & 0xffffffff)):
                    text3=s
                if (crc4 == (binascii.crc32(s) & 0xffffffff)):
                    text4=s
                if (crc5 == (binascii.crc32(s) & 0xffffffff)):
                    text5=s
                if (crc6 == (binascii.crc32(s) & 0xffffffff)):
                    text6=s
print text1+text2+text3+text4+text5+text6
Submit