Cobra icon indicating copy to clipboard operation
Cobra copied to clipboard

自定义函数无法检测检测

Open braveghz opened this issue 7 years ago • 1 comments

自定义函数的参数可控,无法检测

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);

braveghz avatar Sep 11 '17 12:09 braveghz

优化解析引擎,对跨函数、跨文件、面向对象调用的方式进行支持。

FeeiCN avatar Sep 12 '17 03:09 FeeiCN