File tree 1 file changed +20
-2
lines changed
1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -76,15 +76,33 @@ def readPage(page):
76
76
response = urllib .request .urlopen (page )
77
77
soup = BeautifulSoup (response .read (),'html.parser' )
78
78
print (soup .find_all ('input' ))
79
+ return soup
80
+
81
+ ###Get all emails from the website
82
+ def get_all_emails (soup ):
83
+ websites = []
84
+ emails = []
85
+ for link in soup .find_all ('a' ):
86
+ email_link = link .get ('href' )
87
+ if email_link != None :
88
+ if 'http' in email_link :
89
+ websites .append (email_link )
90
+ elif 'mailto' in email_link :
91
+ emails .append (email_link )
92
+ else :
93
+ pass
94
+ return websites ,emails
95
+
79
96
80
97
def main ():
81
98
header ()
82
99
stemTest ()
83
100
print ("Tor Ip Address :" )
84
- readPage ("http://www.whatsmyip.net/" )
101
+ a = readPage ("http://www.whatsmyip.net/" )
102
+ print (get_all_emails (a ))
85
103
print ("\n \n " )
86
104
#readPage("http://od6j46sy5zg7aqze.onion")
87
105
return 0
88
106
89
107
if __name__ == '__main__' :
90
- main ()
108
+ main ()
You can’t perform that action at this time.
0 commit comments