Advertisement
Guest User

pain_au_chocolat.py

a guest
Nov 27th, 2012
152
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import urllib2
  2. import re, time
  3. #import painauchocolat
  4.  
  5. opener = urllib2.build_opener()
  6. urllib2.install_opener(opener)
  7.  
  8. pending_vote = []
  9. total = 0
  10.  
  11. while 42:
  12.     try:
  13.         url = 'http://www.identitygenerator.com/process.php'
  14.         data = 'numCols=5&resultType=CSV&countryChoice%5B%5D=canada&numResults=1&title_1=name&type_1=Name&datatype_1=MaleName+Surname&option_1=MaleName+Surname&title_2=&type_2=&title_3=&type_3=&title_4=&type_4=&title_5=&type_5=&numRows=1&sql_database=MySQL&sql_table_name=myTable&sql_create_table=on&enclose_with_backquotes=on&xml_root_node_name=records&xml_record_node_name=record&csv_delimiter=%7C&x=34&y=14'
  15.         pagename = opener.open(url, data).read()
  16.         name1 = pagename.split("\n")[1].split(' ')[0].lower()
  17.         name2 = pagename.split("\n")[1].split(' ')[1].lower()
  18.         test = 'http://%s.yopmail.com' % (name1 + name2)
  19.         f = opener.open(test)
  20.         f.read()
  21.         data = "action=dk_speakup_sendmail&id=1&first_name=%s&last_name=%s&email=%s@yopmail.com&optin=&lang=" % (name1, name2, name1 + name2)
  22.         f = opener.open('http://lafrancedroite.fr/wp-admin/admin-ajax.php', data)
  23.         f.read()
  24.         pending_vote.append((name1, name2))
  25.         print "%s %s send vote" % (name1, name2)
  26.     except Exception as e:
  27.         print e, name1, name2
  28.  
  29.     for vote in pending_vote:
  30.         try:
  31.             name1 = vote[0]
  32.             name2 = vote[1]
  33.             yopmail = "http://www.yopmail.com/rss.php?login=%s" % (name1 + name2)
  34.             f = opener.open(yopmail)
  35.             page = f.read()
  36.             maillink = re.search('<link>(.*id=.*)</link>', page)
  37.             if maillink != None:
  38.                 maillink = maillink.group(1)
  39.                 key = re.search('id=(.*)==</link>', page).group(1)
  40.                 mailaddress = 'http://%s.yopmail.com/en/mail.php?id=m%s' % (name1 + name2, key)
  41.                 f = opener.open(mailaddress)
  42.                 page = f.read()
  43.                 confirmlink = re.search('au lien suivant : <a href="(.*)">', page).group(1)
  44.                 f = opener.open(confirmlink)
  45.                 confirm = f.read()
  46.                 if re.search('Merci', confirm):
  47.                     total += 1
  48.                     print "%s %s vote confirmed ! (%d)" % (name1, name2, total)
  49.                     pending_vote.remove(vote)
  50.         except Exception as e:
  51.             print e
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement