Admin- Admin
- Posts : 474
Reputation : 8
Join date : 2014-12-10
Age : 32
Location : Pakistan
by Admin Wed Mar 04, 2015 1:54 pm
#!/usr/bin/python
#Collects email addr from database
#and writes them to a file.
import sys, re, sets
if len(sys.argv) != 3:
print "\nUsage: ./dumpemail.py <database> <save file>"
print "Example:"
print "\t ./dumpemail.py db.sql emails.txt\n"
sys.exit(1)
try:
database = open(sys.argv***91;1***93;, "r").read()
except(IOError):
print "\nError: Check your db path\n"
sys.exit(1)
emails = list(sets.Set(re.findall('***91;\.\w***93;+@***91;a-zA-Z_***93;+?\.***91;a-zA-Z***93;{2,3}', database)))
if len(emails) >= 1:
ofile = open(sys.argv***91;2***93;, "a")
print "\nFound:",len(emails)
print "Writing to file:",sys.argv***91;2***93;,"\n\n"
for e in emails:
print e
ofile.writelines(e+"\n")
ofile.close()
else:
print "\n***91;-***93; No email addresses found\n"
print "\n***91;+***93; Done\n"
Sat Apr 29, 2017 10:50 am by ubedullah
» Group hackers
Sat Apr 15, 2017 2:37 pm by Group Hackers
» Hacker Needed
Sat Apr 15, 2017 3:57 am by Group Hackers
» Hacker Needed
Sat Apr 15, 2017 1:45 am by Group Hackers
» Hacker Needed
Thu Apr 13, 2017 11:10 pm by Group Hackers
» Hacker Needed
Tue Apr 11, 2017 2:07 pm by Group Hackers
» Hacker Needed
Tue Apr 11, 2017 2:21 am by Group Hackers
» Hacker Needed
Tue Apr 11, 2017 2:06 am by Group Hackers
» Hacker Needed
Tue Apr 11, 2017 1:35 am by Group Hackers