Ejemplo n.º 1
0
if (!(valid_hex32($scan_server) && (Session::allowedSensors() == "" || in_array($scan_server, array_values($sensor_ids))))) {
    $scan_server = "";
}
$message_pre_scan = _('Pre-scan localy');
$message_force_pre_scan = _('Error: Need to force pre-scan locally');
$ctest = array();
// to save connection test to servers
$ttargets = array();
// to save check for targets
$sensor_error = false;
// Getting available sensors (connected sensors)
$_list_data = Av_sensor::get_list($conn);
$all_sensors = $_list_data[0];
// Remote nmap
$ids = array();
$agents = Av_scan::get_scanning_sensors();
if (is_array($agents) && !empty($agents)) {
    $ids = array_keys($agents);
}
$withnmapforced = 0;
if (valid_hex32($scan_server) && !$hosts_alive && $sensor_id != '') {
    $ids = array_merge(array($sensor_id), $ids);
    $withnmapforced = 1;
}
// targets
$total_host = 0;
// count total targets to scan
foreach ($targets as $target => $target_data) {
    $sensors = array();
    if ($scan_server != '') {
        $sensors = array($scan_server);