源码分析
<?php
error_reporting(0);
include("flag.php");
if(isset($_GET['r'])){
$r = $_GET['r'];
mt_srand(372619038);
if(intval($r)===intval(mt_rand())){
echo $flag;
}
}else{
highlight_file(__FILE__);
phpinfo();
}
?>
伪随机数
脚本:
<?php
mt_srand(372619038);
echo mt_rand();
//运行结果
999695185
payload:
?r=999695185