Target is not a valid IP";exit(0);} $target = escapeshellarg(preg_replace('/[^0-9.\']/', '', $ipaddress)); $ports = escapeshellarg(preg_replace('/[^0-9,\-\']/', '', htmlspecialchars($_GET["ports"]))); //checks if ports is set to 0 and then forces to top 100 ports if ( $ports == "'0'") {$cmd = escapeshellcmd("nmap -T4 --stats-every 5 -r -n -Pn --top-ports 100 $target"); } else {$cmd = escapeshellcmd("nmap -T4 --stats-every 5 -r -n -Pn -p$ports $target");} echo '
';
	$a = popen($cmd, 'r'); 
	while($b = fgets($a, 4096)) { 
		echo $b;
		flush(); 
	} 
	pclose($a); 
	echo '
'; } ?> Port Scan Me
Custom Ports: (e.g. 53,80,137-139,443,445)
Default Ports: