password를 직접 입력하는 문제인가?
소스코드
Password:
<form name="input" method="get">
<input type="text" name="passwd" size=20>
<input type="submit" value="Login">
</form>
<?php
if(array_key_exists("passwd",$_REQUEST)){
if(strstr($_REQUEST["passwd"],"iloveyou") && ($_REQUEST["passwd"] > 10 )){
echo "<br>The credentials for the next level are:<br>";
echo "<pre>Username: natas24 Password: <censored></pre>";
}
else{
echo "<br>Wrong!<br>";
}
}
// morla / 10111
?>
$_REQUEST로 패스워드를 받는다.
strstr함수는 찾고 싶은 문자를 찾은 후 매치되는 문자열을 반환하는 함수다. 대소문자 구분이 없다.
패스워드에 iloveyou가 들어있는 것 같다.
10보다 큰 수를 넣고 iloveyou를 입력하면 문제를 해결할 수 있다.
숫자를 먼저 넣어야 한다.
OsRmXFguozKpTZZ5X14zNO43379LZveg
'Over the Wire > natas' 카테고리의 다른 글
[OverTheWire:Natas] natas 24 → 25 / natas 25 (0) | 2021.08.15 |
---|---|
[OverTheWire:Natas] natas 23 → 24 / natas24 (0) | 2021.08.03 |
[OvertheWire:Natas] natas 21 → 22 /natas22 (0) | 2021.08.01 |
[OvertheWire:Natas] natas 20 → 21 / natas21 (0) | 2021.07.19 |
[OvertheWire:Natas] natas 19 → 20 / natas20 (0) | 2021.07.11 |