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