";
$br_nl = "
";
$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];
}
if (!isset($host)){
echo "Enter a Host to scan!" . $br_nl;
}else do{
if (fsockopen($host, $s_port)){
echo $s_port . " open" . $br_nl;
}
$s_port++;
}while($s_port <= $e_port);
?>