Challenge
<?php
error_reporting(0);
error_"xxxxxxxx";
$password = $_GET['password'];
if(strcmp($password,$pass) == 0)
{
echo "flag";
}else{
echo "try again";
}
?>
Solution
Php5.3之后版本使用strcmp比较一个字符串和数组的话,将不再返回-1而是返回0
<?php
error_reporting(0);
error_"xxxxxxxx";
$password = $_GET['password'];
if(strcmp($password,$pass) == 0)
{
echo "flag";
}else{
echo "try again";
}
?>
Php5.3之后版本使用strcmp比较一个字符串和数组的话,将不再返回-1而是返回0
本文标题:strcmp()绕过
本文链接:https://www.haomeiwen.com/subject/jcpdbxtx.html
网友评论