php特性

$v1=$_GET['v1'];
$v2=$_GET['v2'];
$v3=$_GET['v3'];
$v0=is_numeric($v1) and is_numeric($v2) and is_numeric($v3);
if($v0){
    if(!preg_match("/\;/", $v2)){
        if(preg_match("/\;/", $v3)){
            eval("$v2('ctfshow')$v3");
        }
    }
   }

这道题看似需要对v1,v2,v3做检测

实则由于&& > || > = > and > or

=的运算符比and高,所以按照优先级的缘故,并不会执行到v2,v3

发表评论

蜀ICP备2022010829号