ossim_valid($destination, OSS_IP_CIDR, 'illegal:' . _('Destination cidr')); $destination_type = 'net'; } } if (ossim_error()) { $info_error[] = ossim_get_error(); ossim_clean_error(); } else { $tdestinations[] = $destination; } } } else { $tdestinations = array(); } // Launch scan $info_sensor = $sensors_status[Av_sensor::get_name_by_ip($dbconn, $sensor_ip)]; if ($sensor_ip != '' && $sensor_interface != '' && intval($timeout) > 0 && count($info_error) == 0 && ($info_sensor[0] == 0 || $info_sensor[0] == -1)) { $rlaunch_scan = $scan->launch_scan($tsources, $tdestinations, $sensor_ip, $sensor_interface, $timeout, $cap_size, $raw_filter); if ($rlaunch_scan["status"] === true) { $content = _('Launching capture... wait a few seconds'); $type = 'nf_success'; } else { $content = $rlaunch_scan['message']; $type = 'nf_warning'; } $jtimeout = 4000; } else { if ($info_sensor[0] != -1 && ($info_sensor[0] == 1 || $info_sensor[0] == 2)) { $content = _('The sensor is busy'); $type = 'nf_warning'; }
$sstatus_seid = "sensor_status{$i}"; $tdborder = ""; if (count($scans_by_sensor[$sensor_ip]) > 0 || count($sensors_status) == $i) { $tdborder = "nobborder"; } $i++; ?> <tr><td style="text-align:center;" id="<?php echo $sname_seid; ?> " class="<?php echo $tdborder; ?> "> <?php echo Av_sensor::get_name_by_ip($dbconn, $sensor_ip) != '' ? Av_sensor::get_name_by_ip($dbconn, $sensor_ip) : _("Not found"); ?> </td> <td style="text-align:center;" id="<?php echo $sip_seid; ?> " class="<?php echo $tdborder; ?> "><?php echo $sensor_ip; ?> </td> <td style="text-align:center;" id="<?php echo $tcap_seid; ?>