A tool to find well known crc params that matches the input data and crc result (right or wrong)
Project description
CrcFinder
A tool to find well known crc params that matches the input data and crc result (right or wrong)
Install
pip install crcFinder
Usage
As Library
find zlib.crc32
from crcFinder import CrcFinder
import zlib
data = []
data.append((b"123456789", zlib.crc32(b'123456789')))
data.append((b"123456789xxxx", zlib.crc32(b'123456789xxxx')))
f = CrcFinder()
r = f.findCrc(data)
print([str(i) for i in r])
find something else
from crcFinder import CrcFinder
data = []
data.append((b"123456789\x09", b'\x11\x60\x7a\x37'))
data.append((b"1234567890\x0a", b'\xb3\x95\xcb\x46'))
f = CrcFinder()
r = f.findCrc(data)
print(r[0])
use CrcCalculator directly
from crcFinder import CrcCalculator, ShiftType
crc_pkzip = CrcCalculator(32, 0x04c11db7, 0xffffffff, True, True, 0xffffffff, ShiftType.LEFT, ShiftType.LEFT)
assert(crc_pkzip.check() == 0xcbf43926)
cli
python3 -m crcFinder -d 616263646566,4b8e39ef
python3 -m crcFinder -d 616263646566,0x4b8e39ef 313233343536373839,0xcbf43926
Reference
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
crcfinder-0.0.2.tar.gz
(19.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
crcfinder-0.0.2-py3-none-any.whl
(17.8 kB
view details)
File details
Details for the file crcfinder-0.0.2.tar.gz.
File metadata
- Download URL: crcfinder-0.0.2.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b600cec0542e098375296431890660faa2de0dcc3fc57f4792fe5b046ad8b85
|
|
| MD5 |
839da29c8d7c3baaeeef8ce4c6c21a8e
|
|
| BLAKE2b-256 |
d1252ec45c5819ff6135d894a9ca794f6b7979d2e142e3c9294a4fc75024f3a1
|
File details
Details for the file crcfinder-0.0.2-py3-none-any.whl.
File metadata
- Download URL: crcfinder-0.0.2-py3-none-any.whl
- Upload date:
- Size: 17.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c61d2175dc94c05339697c475d08c5d8d95a31cd6e4dfa1739ee7237d42ee607
|
|
| MD5 |
f6e7ea92fd416ac86266549745d4ea0e
|
|
| BLAKE2b-256 |
0930aa5b075f20a4ece3a76fb486c5b02b0bd4f56de27b84b93fdcc3a787b87d
|