CTF.show:web11
阿新 • • 發佈:2021-01-16
程式碼審計
<?php
function replaceSpecialChar($strParam){
$regex = "/(select|from|where|join|sleep|and|\s|union|,)/i";
return preg_replace($regex,"",$strParam);
}
if(strlen($password)!=strlen(replaceSpecialChar ($password))){
die("sql inject error");
}
if($password==$_SESSION['password']){
echo $flag;
}else{
echo "error";
}
?>
要求我們password的值等於session的值
F12找到session的值,直接刪掉。
輸入空口令,得到flag