hdarwin

thisislegal.com_Programming Challenge 1

Jan 6th, 2013
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. import urllib, urllib2, time
  2. req = urllib2.Request("http://www.thisislegal.com/rand.php")
  3. code = urllib2.urlopen(req).readline()[39:48]
  4. req = urllib2.Request("http://www.thisislegal.com/challenge/p1&code="+code)
  5. session = "PHPSESSID=;TILSESSID="
  6. req.add_header("Cookie", session)
  7. urllib2.urlopen(req)
Advertisement
Add Comment
Please, Sign In to add comment