Created
December 16, 2021 11:01
-
-
Save jilleb/7980fa8e696542ca95c2e55d326a86a9 to your computer and use it in GitHub Desktop.
CRC32_ADLATUS calculator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# --------------------------------------------------------------------------- | |
# Created By : Jille | |
# This is meant specifically for calculating CRC32_ADLATUS for a file | |
import sys | |
import crcmod | |
import argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument("filename") | |
args = parser.parse_args() | |
data = open(args.filename, 'rb').read() | |
crc32_adlatus = crcmod.mkCrcFun(0x104c11db7, initCrc=0, xorOut=0, rev=True) | |
crc = crc32_adlatus(data) | |
print (" CRC32_ADLATUS: %08x" %(crc)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment