Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib.request
- from time import sleep
- import datetime
- #McHeinrich, McFefeDiet, McApfel, McDöner:
- burger_ids = [b'56130', b'56248', b'57370', b'53631']
- proxys = open("proxyliste.txt").readlines()
- url = 'http://213.61.220.45:8080/registration/services/campaignWS'
- while True:
- for proxy in proxys:
- print("Proxy: "+proxy.strip())
- for burger_id in burger_ids:
- print("Burger: "+str(burger_id))
- data = b'<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><SOAP-ENV:Body><tns:vote xmlns:tns=\"http://campaigns.mcd.neuedigitale.de\"><tns:campaignId>3325</tns:campaignId><tns:postId>'+burger_id+b'</tns:postId></tns:vote></SOAP-ENV:Body></SOAP-ENV:Envelope>'
- req = urllib.request.Request(url)
- req.add_data(data)
- req.add_header('Content-Type', 'text/xml')
- req.add_header('User-Agent', 'trolololololol')
- req.set_proxy(proxy, 'http')
- for i in range(0,6):
- try:
- response = urllib.request.urlopen(req, timeout=10)
- the_page = str(response.read())
- t = datetime.datetime.today()
- the_page=the_page[the_page.find('<ns1:out>')+9:the_page.find('</ns1:out>')]
- print("%s:%s:%sh: %s"%(t.hour, t.minute, t.second, the_page))
- except Exception as exc:
- print("Error: %s" % exc )
- break
Advertisement
Add Comment
Please, Sign In to add comment