Last active
July 26, 2022 07:41
-
-
Save whokilleddb/1b1490222739e76887886f7ce26d5705 to your computer and use it in GitHub Desktop.
Generate Favicon Hashes For Recon
This file contains hidden or 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 mmh3 | |
| import sys | |
| import codecs | |
| import requests | |
| if len(sys.argv) != 2: | |
| print(f"Usage: {sys.argv[0]} [Favicon URL]") | |
| sys.exit(0) | |
| try: | |
| response = requests.get(sys.argv[1]) | |
| favicon = codecs.encode(response.content, 'base64') | |
| hash = mmh3.hash(favicon) | |
| print(f"Favicon Hash: {hash}") | |
| except Exception as e: | |
| print(f"Error occured as: {e}", file=sys.stderr) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment