Skip to content

Instantly share code, notes, and snippets.

@whokilleddb
Last active July 26, 2022 07:41
Show Gist options
  • Select an option

  • Save whokilleddb/1b1490222739e76887886f7ce26d5705 to your computer and use it in GitHub Desktop.

Select an option

Save whokilleddb/1b1490222739e76887886f7ce26d5705 to your computer and use it in GitHub Desktop.
Generate Favicon Hashes For Recon
#!/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