SySS-Research / syss-crc

Simple Python CRC implementation for playing around with cyclic redundancy checks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SySS CRC

Simple Python CRC implementation for playing around with cyclic redundancy checks, for instance when analyzing undocumented protocols or file formats.

Inspired by

Caution: This simple Python implementation is not very fast, but it may be good enough for some test cases. If search spaces are quite large and/or more speed is required, consider using other CRC tools like bruteforce-crc.

Usage

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from syss_crc import CRC

# main
if __name__ == "__main__":
    # simple usage example
    crc = CRC()
    crc.set_config_by_name("CRC-32")
    data = b"What's my CRC again?"
    c = crc.compute(data)
    print("[*] CRC-32 of test data '{:s}' is {:X}".format(data.decode("UTF-8"), c))

Disclaimer

Use at your own risk. Mainly for educational and tinkering purposes.

About

Simple Python CRC implementation for playing around with cyclic redundancy checks

License:MIT License


Languages

Language:Python 100.0%