Last active
July 19, 2018 06:32
-
-
Save lawvs/129b5c0b047f0cbf4e9697323b1fdfbe to your computer and use it in GitHub Desktop.
Guess number
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 | |
import sys | |
import zlib | |
# from binascii import crc32 | |
ans = int(sys.argv[1], 16) | |
for i in range(100000, 999999): | |
if i % 100000 == 0: | |
print('cracking',i) | |
if zlib.crc32(bytes(str(i), encoding='utf8')) == ans: | |
print('success', i) | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment