웹 해킹/webhacking.kr

webhacking.kr 54번

sonysame 2018. 2. 9. 15:55

소스는 다음과 같다.

<html>
<head>
<title>Challenge 54</title>
</head>
<body>
<h1><b>Password is <font id=aview></font></b></h1>
<script>
function run(){
if(window.ActiveXObject){
try {
return new ActiveXObject('Msxml2.XMLHTTP');
} catch (e) {
try {
return new ActiveXObject('Microsoft.XMLHTTP');
} catch (e) {
return null;
}
}
}else if(window.XMLHttpRequest){
return new XMLHttpRequest();
}else{
return null;
}
}

x=run();

a="";

function answer(i)
{
x.open('GET','?m='+i,false);
x.send(null);

aview.innerHTML=x.responseText;
a+=x.response.Text;

aview.innerHTML=a;

i++;
if(x.responseText) setTimeout("answer("+i+")",100);
if(x.responseText=="") aview.innerHTML="?";
}

setTimeout("answer(0)",10000);

</script>
</body>
</html>



패스워드를 한글자씩 보여주므로 코드를 약간 수정했다.