Created
July 27, 2021 22:35
-
-
Save larsenv/e17a068809f8b53fa15108afd00dfc16 to your computer and use it in GitHub Desktop.
crc32 seed brute force tool
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
import sys | |
import zlib | |
if len(sys.argv) != 3: | |
print("Usage: crc.py <input> <seed (in hex form)>") | |
sys.exit(1) | |
with open(sys.argv[1], "rb") as f: | |
read = f.read() | |
for i in range(0x00000000, 0x100000000): | |
crc = zlib.crc32(read, i) | |
if crc == int(sys.argv[2], 16): | |
print(hex(i) + " matches!") | |
else: | |
print(hex(i), end="\r") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment