Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added feature of retreiving email_ids and web_links #1

Merged
merged 1 commit into from
Jun 16, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions torBot.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,33 @@ def readPage(page):
response = urllib.request.urlopen(page)
soup = BeautifulSoup(response.read(),'html.parser')
print (soup.find_all('input'))
return soup

###Get all emails from the website
def get_all_emails(soup):
websites = []
emails = []
for link in soup.find_all('a'):
email_link = link.get('href')
if email_link != None:
if 'http' in email_link:
websites.append(email_link)
elif 'mailto' in email_link:
emails.append(email_link)
else:
pass
return websites,emails


def main():
header()
stemTest()
print ("Tor Ip Address :")
readPage("http://www.whatsmyip.net/")
a = readPage("http://www.whatsmyip.net/")
print (get_all_emails(a))
print ("\n\n")
#readPage("http://od6j46sy5zg7aqze.onion")
return 0

if __name__ == '__main__':
main()
main()