old-26 (100)
view-source를 클릭해 본 소스는 아래와 같다.
<?php
include "../../config.php";
if($_GET['view_source']) view_source();
?><html>
<head>
<title>Challenge 26</title>
<style type="text/css">
body { background:black; color:white; font-size:10pt; }
a { color:lightgreen; }
</style>
</head>
<body>
<?php
if(preg_match("/admin/",$_GET['id'])) { echo"no!"; exit(); }
$_GET['id'] = urldecode($_GET['id']);
if($_GET['id'] == "admin"){
solve(26);
}
?>
<br><br>
<a href=?view_source=1>view-source</a>
</body>
</html>
admin
을 한 번 인코딩하면 %61%64%6d%69%6e
이고 이를 한 번 더 인코딩하면 %25%36%31%25%36%34%25%36%64%25%36%39%25%36%65
이다.
주소창에 id 값으로 %25%36%31%25%36%34%25%36%64%25%36%39%25%36%65
을 넣으면 문제가 풀린다.

Last updated
Was this helpful?