728x90
[๋ฌธ์ ]
https://webhacking.kr/challenge/js-3/
[๋ฌธ์ ํ์ด]
<script>
document.body.innerHTML+="<font color=yellow id=aa style=position:relative;left:0;top:0>*</font>";
function mv(cd){
kk(star.style.left-50,star.style.top-50);
if(cd==100) star.style.left=parseInt(star.style.left+0,10)+50+"px";
if(cd==97) star.style.left=parseInt(star.style.left+0,10)-50+"px";
if(cd==119) star.style.top=parseInt(star.style.top+0,10)-50+"px";
if(cd==115) star.style.top=parseInt(star.style.top+0,10)+50+"px";
if(cd==124) location.href=String.fromCharCode(cd)+".php"; // do it!
}
function kk(x,y){
rndc=Math.floor(Math.random()*9000000);
document.body.innerHTML+="<font color=#"+rndc+" id=aa style=position:relative;left:"+x+";top:"+y+" onmouseover=this.innerHTML=''>*</font>";
}
</script>
- ๋จผ์ ์ฝ๋๋ฅผ ๋ถ์ํด ๋ณด๋ฉด mvํจ์๋ ํค ์ ๋ ฅ์ ๋ฐ๋ผ ์์ง์์ ์ฒ๋ฆฌํ๋ ํจ์์ ๋๋ค.
- cd๋ ASCII์ฝ๋๋ก ์ ๋ฌ๋๋ ์
๋ ฅ ๊ฐ์
๋๋ค.
- d(100): ์ค๋ฅธ์ชฝ์ผ๋ก 50px ์ด๋
- a(97): ์ผ์ชฝ์ผ๋ก 50px ์ด๋
- w(119): ์๋ก 50px ์ด๋
- s(115): ์๋๋ก 50px ์ด๋
- ASCII ์ฝ๋๋ก 124๋ |(ํ์ดํ)์ด๋ค.
- | ํค๋ฅผ ๋๋ฅด๋ฉด ์ ํ์ด์ง๋ก ์ด๋ํ๋ค.
- |(ํ์ดํ) ํค๋ฅผ ๋๋ ๋๋ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ ์ ์์์ต๋๋ค.
'๋ณด์ > CTF' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Webhacking.kr] old-26 write-up (0) | 2025.01.05 |
---|---|
[์นํดํน] | [๋๋ฆผํต]-Broken Buffalo Wings (0) | 2025.01.01 |
[Webhacking.kr] old-15 write-up (0) | 2024.12.29 |
[Webhacking.kr] old-17 write-up (0) | 2024.12.22 |
[Webhacking.kr] old-01 write-up (0) | 2024.12.22 |