Post

LOS Lv.8 troll

troll

1
2
3
4
5
6
7
8
9
10
11
12
13
14
query : select id from prob_troll where id=''

<?php  
  include "./config.php"; 
  login_chk(); 
  $db = dbconnect(); 
  if(preg_match('/\'/i', $_GET[id])) exit("No Hack ~_~");
  if(preg_match("/admin/", $_GET[id])) exit("HeHe");
  $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__);
?>

Solution

1
2
MySQL은 대소문자 구분이 없다고 orc에서 얘기 했음. 
?id=Admin
This post is licensed under CC BY 4.0 by the author.