Skip to content

Instantly share code, notes, and snippets.

@yehgdotnet
Last active February 23, 2024 07:48
Show Gist options
  • Star 88 You must be signed in to star a gist
  • Fork 51 You must be signed in to fork a gist
  • Save yehgdotnet/b9dfc618108d2f05845c4d8e28c5fc6a to your computer and use it in GitHub Desktop.
Save yehgdotnet/b9dfc618108d2f05845c4d8e28c5fc6a 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)
@vansh1
Copy link

vansh1 commented Feb 9, 2022

Traceback (most recent call last):
File "favfreak.py", line 85, in
a,urls= main()
File "favfreak.py", line 21, in main
if line.strip()[-1] == "/":
IndexError: string index out of range

i am getting this error
cat file.txt | python3 favicon.py

@cherrera0001
Copy link

acá te ofrezco una solución, en la que estoy trabajando para este mismo concepto. https://github.com/cherrera0001/ScriptsPython/blob/main/FavIconShondanToCF.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment