-
Notifications
You must be signed in to change notification settings - Fork 18
/
MurMurHash.py
60 lines (54 loc) · 1.61 KB
/
MurMurHash.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import mmh3
import requests
import codecs
import os, sys
#from shodan import Shodan
#import json
def logo():
banner = '''
___ ___ ___ ___ _ _ _
| \/ | | \/ | | | | | | |
| . . |_ _ _ __| . . |_ _ _ __| |_| | __ _ ___| |__
| |\/| | | | | '__| |\/| | | | | '__| _ |/ _` / __| '_ \
| | | | |_| | | | | | | |_| | | | | | | (_| \__ \ | | |
\_| |_/\__,_|_| \_| |_/\__,_|_| \_| |_/\__,_|___/_| |_|
Author: Viral Maniar
Twitter: @ManiarViral
Org: Preemptive Cyber Security Pty Ltd
Description: This tool is to calculate a MurmurHash value of
a favicon to hunt phishing website on Shodan.
'''
return banner
def cmd_HashGenerator():
URL = input('\nEnter Favicon URL to generate Hash:')
response = requests.get(URL)
#response = requests.get(URL, verify=False)
favicon = codecs.encode(response.content,"base64")
print('\n')
hash = mmh3.hash(favicon)
print('----------')
print(hash)
print('----------')
print('\n')
print('Tip: Use http.favicon.hash:<hash> on Shodan to hunt phishing sites.')
while True:
try:
choice = str(input('\n[?] Do you want to continue? y/n\n> ')).lower()
if choice[0] == 'y':
return cmd_HashGenerator()
if choice[0] == 'n':
sys.exit(0)
break
else:
print('Invalid Input')
except KeyboardInterrupt:
print ('[!] Ctrl + C detected\n[!] Exiting')
sys.exit(0)
except EOFError:
print ('[!] Ctrl + D detected\n[!] Exiting')
sys.exit(0)
def main():
print (logo())
cmd_HashGenerator()
if __name__ == "__main__":
main()