PHP Taint 从PHP语言层面去分析,找出一些可能的XSS漏洞代码.
启用这个扩展以后, 如果在一些关键函数(或者语句: echo, print, system, exec, 等等), 或者输出的地方直接(没有经过转义, 安全过滤处理)使用了来自$_GET, $_POST或者$_COOKIE的数据, 则Taint就会提示你:
$a = $_GET['a'];
$file_name = '/tmp'.$a;
$output = "Welcome,{$a} !!!";
$sql = "select * from ".$a;
$sql .= "ooxx";
echo $output;
//Warning:main(){function.echo}:Argument contains data that is not con...
include($file_name);
//Warning:include(){function.include}:file path contains data ...