Skip to main content

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.3.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crcfinder-0.0.3-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file crcfinder-0.0.3.tar.gz.

File metadata

  • Download URL: crcfinder-0.0.3.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for crcfinder-0.0.3.tar.gz
Algorithm Hash digest
SHA256 878479d0638749500ba23331d3e9dfc5868cae32cf5dd1767668aa2e084ff274
MD5 beafb7703ac029bd667acfed6a66b100
BLAKE2b-256 af3c9e551fcc411f0dc2b1776509abce195842602649136fd68a4499d2498282

See more details on using hashes here.

File details

Details for the file crcfinder-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: crcfinder-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for crcfinder-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7dbb5bf653f4c42440a6ba99b89fa70873b0492ba5da2851666d32acf75a0b67
MD5 c097810e36ae2fe864641e83eb32e4f0
BLAKE2b-256 8f20848003728b21ec11c1600666cf238d4a92543c057b84574cd34602dee38c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page