" frameborder="0" scrolling="no"></iframe> </td> </tr> </table> </div> </form> <!-- end of Asset form --> <?php require_once 'classes/Scan.inc'; $scan = new Scan(""); if (GET('clearscan')) { Scan::del_scan($scan->nmap_completed_scan); } $lastscan = $scan->get_scan(); if (is_array($lastscan) && count($lastscan) > 0) { require_once 'scan_util.php'; $_SESSION["_scan"] = $lastscan; scan2html($lastscan); } else { echo "<!-- <p align=\"center\">"; echo _("NOTE: This tool is a nmap frontend. In order to use all nmap functionality, you need root privileges."); echo "<br/>"; echo _("For this purpose you can use suphp, or change group to the web-user and set suid to nmap binary (<strong>chgrp www-data /usr/bin/nmap ; chmod 4750 /usr/bin/nmap</strong>)."); echo "</p> -->"; } ?> </body>
die("Incorrect net/host format {$net}\n"); } if ($remote_sensor != "" && $remote_sensor != "null") { $rscan = new RemoteScan($net, "ping", $remote_sensor, $nmap_completed_scan); $quiet = $timing_template != "" ? FALSE : TRUE; echo "Scanning remote network: {$net}\n"; $rscan->do_scan($quiet); if ($rscan->err() == "") { $ips = $rscan->get_scan(); } else { $ips = array(); echo "Unable to run remote scan: " . $rscan->err() . "\n"; } } else { echo "Scanning local network: {$net}\n"; $scan = new Scan($net, null, $nmap_completed_scan); $scan->append_option($timing_template); if ($full == "fast") { $scan->append_option("-F"); $scan->do_scan(TRUE); } elseif ($full == "full") { $scan->do_scan(TRUE); } else { $scan->do_scan(FALSE); } echo "\n"; $ips = $scan->get_scan(); } foreach ($ips as $ip => $val) { echo "Host {$ip} appears to be up\n"; }