728x90
<?php
include "./config.php";
login_chk();
$db = dbconnect();
if(preg_match('/\'/i', $_GET[id])) exit("No Hack ~_~"); // '(quote) 사용불가
if(preg_match("/admin/", $_GET[id])) exit("HeHe"); //admin을 사용불가
$query = "select id from prob_troll where id='{$_GET[id]}'";
echo "<hr>query : <strong>{$query}</strong><hr><br>";
$result = @mysqli_fetch_array(mysqli_query($db,$query));
if($result['id'] == 'admin') solve("troll");
highlight_file(__FILE__);
?>
mysql은 대소문자를 구분하지 않음. admin이랑 ADMIN이랑 같음.
답: ?id=ADMIN
728x90