SHOW:
|
|
- or go back to the newest paste.
1 | #!/usr/bin/python | |
2 | import time | |
3 | import urllib | |
4 | import urllib2 | |
5 | import random | |
6 | import string | |
7 | ||
8 | COUNT=1000 | |
9 | POLL_ID=95315 | |
10 | # fuck yeah kiwihow | |
11 | ANSWER_ID=1 | |
12 | USER_AGENT="Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/4.0; InfoPath.2; SV1; .NET CLR 2.0.50727; WOW64)" | |
13 | ||
14 | for i in range(0, COUNT): | |
15 | rndval = random.randrange(0, 4294967296) | |
16 | rndval2 = random.randrange(0, 4294967296) | |
17 | post_data = urllib.urlencode({ | |
18 | "ajax": "1", | |
19 | "pview": "1", | |
20 | "vsubmit": "Vote", | |
21 | "pid": "%s" % (POLL_ID), | |
22 | "paid": "%s" % (ANSWER_ID), | |
23 | "rndval": rndval, | |
24 | }) | |
25 | phpsid = "" | |
26 | for i in range(0, 32): | |
27 | phpsid = phpsid + random.choice(string.ascii_letters + string.octdigits) | |
28 | cookie_data = urllib.urlencode({ | |
29 | "PHPSESSID": phpsid, | |
30 | "q": rndval2, | |
31 | "ajax": 1, | |
32 | "pview": "1", | |
33 | "submit": "Vote", | |
34 | "pid": "%s" % (POLL_ID), | |
35 | "paid": "%s" % (ANSWER_ID), | |
36 | "rndval": rndval, | |
37 | }) | |
38 | headers = { | |
39 | "Cookie": cookie_data, | |
40 | "Referer": "http://www.twiigs.com/poll/Technology/Internet/95315", | |
41 | "User-Agent": USER_AGENT, | |
42 | "Origin": "http://www.twiigs.com", | |
43 | } | |
44 | r = urllib2.Request("http://www.twiigs.com/vote", post_data, headers) | |
45 | - | print post_data |
45 | + | |
46 | - | print cookie_data |
46 | + | |
47 | time.sleep(3) |