forked from dvopsway/datasploit
-
Notifications
You must be signed in to change notification settings - Fork 456
Expand file tree
/
Copy pathemail_whoismind.py
More file actions
executable file
·49 lines (37 loc) · 1.11 KB
/
email_whoismind.py
File metadata and controls
executable file
·49 lines (37 loc) · 1.11 KB
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
#!/usr/bin/env python2
import base
import sys
import requests
from bs4 import BeautifulSoup
from termcolor import colored
# Control whether the module is enabled or not
ENABLED = True
class style:
BOLD = '\033[1m'
END = '\033[0m'
def banner():
print colored(style.BOLD + '\n---> Searching Whoismind for associated domains\n' + style.END, 'blue')
def main(email):
req = requests.get('http://www.whoismind.com/email/%s.html' % (email))
soup = BeautifulSoup(req.content, "lxml")
atag = soup.findAll('a')
domains = []
for at in atag:
if 'href' in at and at.text in at['href']:
domains.append(at.text)
domains = list(set(domains))
return domains
def output(data, email=""):
for domain in data:
if domain:
print domain
print "\n-----------------------------\n"
if __name__ == "__main__":
try:
email = sys.argv[1]
banner()
result = main(email)
output(result, email)
except Exception as e:
print e
print "Please provide an email as argument"