"; $host = htmlspecialchars($_POST['host']); $s_port = (int)$_POST['s_port']; $e_port = (int)$_POST['e_port']; echo "
"; }else{ $br_nl = "\n"; $host = $argv[1]; $s_port = $argv[2]; $e_port = $argv[3]; } error_reporting(0); if($host == ""){ $host = '127.0.0.1'; } if($s_port == "" && $e_port == ""){ $s_port = 0; $e_port = 10000; }do{ if (fsockopen($host, $s_port)){ echo "port " . $s_port . "/" . getservbyport($s_port, tcp) . " open" . $br_nl; } $s_port++; }while($s_port <= $e_port); ?>