Skip to content

Instantly share code, notes, and snippets.

@girving
Created March 24, 2024 21:28
Show Gist options
  • Save girving/6545ffc62bfa71c89086b1ed02d11acb to your computer and use it in GitHub Desktop.
Save girving/6545ffc62bfa71c89086b1ed02d11acb to your computer and use it in GitHub Desktop.
Program to recognize its own CRC-32
#!/usr/bin/env python3
import sys
import zlib
if len(sys.argv) == 2:
print(('Not me', 'Me.')[zlib.crc32(open(sys.argv[1], 'rb').read()) == 1441602037])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment