CRC32爆破


    CRC它的全称是循环冗余校验(Cyclic Redundancy Check, CRC),用来校验文件是否出错但并不能用于自动纠错。对于字节数小的文件完全可以对CRC进行爆破获得其内容。
    crc32

    1. python crc32.py reverse 0x你的crc32密文
    2. python crc32.py reverse 0x308e1d5b
    3. python crc32.py reverse 0x5194c2d0
    4. python crc32.py reverse 0x5c48f6ca

    image.png
    {0x36, 0x34, 0x70, 0x32,0x40, 0x73, 0x77, 0x6f, 0x72, 0x44, 0x32, 0x30} == 64p2@sworD20


    爆破脚本:

    1. import binascii
    2. def str2num(s):
    3. return int(s, 16)
    4. dic = '''abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~'''
    5. crc1 = str2num("308E1D58")
    6. crc2 = str2num("5194C2D0")
    7. crc3 = str2num("5C48F6CA")
    8. for x in dic:
    9. for a in dic:
    10. for b in dic:
    11. for c in dic:
    12. str = x + a + b + c
    13. str_crc = binascii.crc32(str) & 0xffffffff
    14. if (str_crc == crc1):
    15. pass1 = str
    16. if (str_crc == crc2):
    17. pass2 = str
    18. if (str_crc == crc3):
    19. pass3 = str
    20. print("pass:",pass1+pass2+pass3)