Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib, urllib2, time
- session = ""
- for x in xrange(1,1000):
- input = {"id":"3","answer":"%0.3f"%(x/1000.0)}
- input = urllib.urlencode(input)
- print input
- req = urllib2.Request("http://www.cstutoringcenter.com/problems/answer.php", input)
- req.add_header("Cookie", "PHPSESSID="+session)
- time.sleep(2)
- if urllib2.urlopen(req).read().find("WRONG")== -1:
- print 'GOOOOOOOOOOOOOD : ' + str(x)
- break
Advertisement
Add Comment
Please, Sign In to add comment