if ($perc > 0) { $id = md5($sc_asset); ?> <script type="text/javascript"> setIframeHeight('process'); $('#asset_<?php echo $id?>').html("Scan<?php if ($ip != "") echo " [$ip]\n" ?>: <?php echo $found[1] ?>%\n"); </script> <?php } } } sleep(3); } */ while (Scan::scanning_now()) { sleep(3); } $has_results = false; if (file_exists($scan_path_log)) { $has_results = true; $output = file($scan_path_log); foreach ($output as $line) { if (!preg_match("/appears to be up/", $line)) { echo $line . "\n"; } } @unlink($scan_path_log); } echo "<br/>"; if ($has_results) {
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * MA 02110-1301 USA * * * On Debian GNU/Linux systems, the complete text of the GNU General * Public License can be found in `/usr/share/common-licenses/GPL-2'. * * Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt * */ require_once 'av_init.php'; Session::logcheck('environment-menu', 'ToolsScan'); $db = new ossim_db(); $conn = $db->connect(); $data = array(); if (Scan::scanning_now()) { // Scan Status $scanning_assets = Scan::scanning_what(); if (count($scanning_assets) > 0) { foreach ($scanning_assets as $rsensor_ip) { $tdata = explode('#', $rsensor_ip); $assets[] = $tdata[1]; $sensor_id = $tdata[0]; } $sc_asset = implode(', ', $assets); if ($sensor_id != '' && $sensor_id != 'null') { $sensor_ip = Av_sensor::get_ip_by_id($conn, $sensor_id); $data['state'] = 'remote_scan_in_progress'; $data['message'] = sprintf(_('Scanning network: <strong>%s</strong> with a remote sensor [<strong>%s</strong>], please wait...'), $sc_asset, $sensor_ip); $data['progress'] = NULL; $data['debug_info'] = NULL;
foreach ($hosts as $k => $v) { $ids .= $v->get_host_ip() . "/32 "; } $assets_aux[] = '{ txt:"HOSTGROUP:' . $_host_group->get_name() . '", id: "' . rtrim($ids) . '" }'; } $sensor_list = Sensor::get_list($conn, "ORDER BY name"); foreach ($sensor_list as $_sensor) { $assets_aux[] = '{ txt:"SENSOR:' . $_sensor->get_name() . ' [' . $_sensor->get_ip() . ']", id: "' . $_sensor->get_ip() . '/32" }'; } $assets = implode(",\n", $assets_aux); $db->close($conn); require_once "ossim_conf.inc"; $conf = $GLOBALS["CONF"]; $nmap_path = $conf->get_conf("nmap_path"); $nmap_exists = file_exists($nmap_path) ? 1 : 0; $nmap_running = Scan::scanning_now(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title> <?php echo gettext("OSSIM Framework"); ?> </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <meta http-equiv="Pragma" content="no-cache"/> <link rel="stylesheet" type="text/css" href="../style/style.css"/> <link type="text/css" rel="stylesheet" href="../style/jquery-ui-1.7.custom.css"/> <link rel="stylesheet" type="text/css" href="../style/jquery.autocomplete.css">