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比較一個字符串和數(shù)組的話,將不再返回-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比較一個字符串和數(shù)組的話,將不再返回-1而是返回0