javascript challenge 입니다.

소스에 script 부문에 ASCII CODE로 되어있는 문자들이 많이 보이게 됩니다.

해당 부분을 복사해 콘솔로 가져가면 쉽게 원래 문자열을 얻을 수 있습니다.



ck는 URL에서 =을 찾은 후 =을 포함한 뒤에 문자열을 가져오게 됩니다.

결국 맨아래 if문에서 ck에 들어있는 값이랑 해당 값을 비교해서 동일하면 패스워드라고 알려줍니다.


간단하게 해당 부분을 console에 복사해 실행해보면 특정 문자열이 나오게 되고 해당 문자열을 URL의 넣어주면 성공하게 됩니다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var enco='';
var enco2=126;
var enco3=33;
var ck=document.URL.substr(document.URL.indexOf('='));
 
 
for(i=1;i<122;i++)
{
enco=enco+String.fromCharCode(i,0);
}
 
function enco_(x)
{
return enco.charCodeAt(x);
}
 
if(ck=="="+String.fromCharCode(enco_(240))+String.fromCharCode(enco_(220))+String.fromCharCode(enco_(232))
          +String.fromCharCode(enco_(192))+String.fromCharCode(enco_(226))+String.fromCharCode(enco_(200))
          +String.fromCharCode(enco_(204))+String.fromCharCode(enco_(222-2))+String.fromCharCode(enco_(198))
          +"~~~~~~"+String.fromCharCode(enco2)+String.fromCharCode(enco3))
{
alert("Password is "+ck.replace("=",""));
}
cs





FLAG AUTH에 값을 넣어주면 성공!


'WarGame > webhacking.kr' 카테고리의 다른 글

[webhacking.kr] prob 15  (0) 2018.12.04
[webhacking.kr] prob 14  (0) 2018.12.04
[webhacking.kr] prob 11  (0) 2018.12.04
[webhacking.kr] prob 10  (0) 2018.12.04
[webhacking.kr] prob 6  (0) 2018.12.04

+ Recent posts