First version of Hosts Up ready and working
This commit is contained in:
22
scan.php
Normal file
22
scan.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
include("htmlblock.html");
|
||||
|
||||
print "<h1>Open ports on $_GET[host]</h1>\n";
|
||||
print "<pre>\n";
|
||||
|
||||
$portscan = shell_exec("nmap $_GET[host]");
|
||||
preg_match_all('/[0-9]{1,5}\/..p.*/', $portscan, $openports);
|
||||
|
||||
foreach ($openports[0] as $out)
|
||||
{
|
||||
print "$out\n";
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user