Skip to content

Instantly share code, notes, and snippets.

@vortexau
Forked from yehgdotnet/get-shodan-favicon-hash.py
Created September 3, 2020 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vortexau/19c5133b63990ec7269a18575d58f42d to your computer and use it in GitHub Desktop.
Save vortexau/19c5133b63990ec7269a18575d58f42d to your computer and use it in GitHub Desktop.
Get Shodan FAVICON Hash
# https://twitter.com/brsn76945860/status/1171233054951501824
pip install mmh3
-----------------------------
# python 2
import mmh3
import requests
response = requests.get('https://cybersecurity.wtf/favicon.ico')
favicon = response.content.encode('base64')
hash = mmh3.hash(favicon)
print hash
-----------------------------
# python 3
import mmh3
import requests
import codecs
response = requests.get('https://cybersecurity.wtf/favicon.ico')
favicon = codecs.encode(response.content,"base64")
hash = mmh3.hash(favicon)
print(hash)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment