ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • Webhacking.kr / old-10
    문제 풀이/webhacking.kr 2024. 8. 30. 09:23

    문제

     

    설명

    소스코드를 확인해 보자

    <html>
    <head>
    <title>Challenge 10</title>
    </head>
    
    <body>
    <hr style=height:100;background:brown;>
    <table border=0 width=1800 style=background:gray>
    <tr><td>
    <a id=hackme style="position:relative;left:0;top:0" onclick="this.style.left=parseInt(this.style.left,10)+1+'px';if(this.style.left=='1600px')this.href='?go='+this.style.left" onmouseover=this.innerHTML='yOu' onmouseout=this.innerHTML='O'>O</a><br>
    <font style="position:relative;left:1600;top:0" color=gold>|<br>|<br>|<br>|<br>Goal</font>
    </td></tr>
    </table>
    <hr style=height:100;background:brown;>
    </body>
    </html>

    <a> 태그에 onclick 이벤트가 있고 if 문으로 리다이렉션 시키는 것을 확인할 수 있다.

     

    즉 id=hackme a태그를 이용하여 O 문구를 1600px로 이동시키면 성공

     

    정답

    더보기

    1. 개발자도구 -> style에 left를 1599로 변경 후 클릭

    2. onclick에 this.style.left=parseInt(this.style.left,10) => this.style.left=parseInt(this.style.left,1600) 수정 후 클릭

    '문제 풀이 > webhacking.kr' 카테고리의 다른 글

    Webhacking.kr / old - 01  (1) 2025.02.03
    Webhacking.kr / old-21  (0) 2024.08.30
    Webhacking.kr / old-39  (0) 2024.08.23
    Webhacking.kr / old-26  (0) 2024.08.23
    Webhacking.kr / old-23  (0) 2024.08.23
Designed by Tistory.