Cobra
Cobra copied to clipboard
自定义函数无法检测检测
自定义函数的参数可控,无法检测
Example
function GetFile($host, $port, $link) {
$fp = fsockopen($host, intval($port), $errno, $errstr, 30);
if (!$fp) {
echo "$errstr (error number $errno) \n";
} else {
$out = "GET $link HTTP/1.1\r\n";
$out .= "Host: $host\r\n";
$out .= "Connection: Close\r\n\r\n";
$out .= "Connection: Close\r\n\r\n";
$out .= "\r\n";
fwrite($fp, $out);
$contents = '';
while (!feof($fp)) {
$contents .= fgets($fp, 1024);
}
fclose($fp);
return $contents;
}
}
$host = $_POST['host'];
$port = $_POST['port'];
GetFile($host, $port, $link);
优化解析引擎,对跨函数、跨文件、面向对象调用的方式进行支持。