$sufix = "ed"; $color = "#3933FC"; $color2 = "#FF4500"; //$color = "darkred"; //$color2 = "lightred"; $titlecolor = "darkred"; } $shared = new DBA_shared(GET('shared')); $SS_Attack = $shared->get("SS_Attack" . $sufix . "Host{$runorder}"); $SA_Attack = $shared->get("SA_Attack" . $sufix . "Host{$runorder}"); if ($type == "event" && is_array($SS_Attack) && count($SS_Attack) > 0) { $list = $SS_Attack; } elseif ($type == "alarm" && is_array($SA_Attack) && count($SA_Attack) > 0) { $list = $SA_Attack; } else { $list = $security_report->AttackHost($security_report->ossim_conn, $target, $limit, $type, $date_from, $date_to); } $datax = $datay = array(); $gorientation = "h"; foreach ($list as $key => $l) { if ($key >= 10) { // ponemos un límite de resultados para la gráfica //break; $gorientation = "v"; } $datax[] = Host::ip2hostname($security_report->ossim_conn, $l[0]); $datay[] = $l[1]; } require_once 'ossim_conf.inc'; $conf = $GLOBALS["CONF"]; $jpgraph = $conf->get_conf("jpgraph_path");
</tr> </table> </td> </tr> </table> <?php } elseif ($screen == "alarms" && Session::menu_perms("MenuIncidents", "ReportsAlarmReport")) { // Alarms report $report_type = "alarm"; $security_report = new SecurityReport(); $interval = 60 * 60 * 24 * $range; # 1 month $date_from = GET('date_from') != "" ? GET('date_from') : strftime("%Y-%m-%d", time() - $interval); $date_to = GET('date_to') != "" ? GET('date_to') : strftime("%Y-%m-%d", time()); // Attacked host $list1 = $security_report->AttackHost($conn, "ip_dst", $NUM_HOSTS, $report_type, $date_from, $date_to); // Attacker host $list2 = $security_report->AttackHost($conn, "ip_src", $NUM_HOSTS, $report_type, $date_from, $date_to); // Ports $list3 = $security_report->Ports($NUM_HOSTS, $report_type, $date_from, $date_to); // Events $list4 = $security_report->Events($NUM_HOSTS, $report_type, $date_from, $date_to); ?> <table cellpadding='0' cellspacing='0' border='0' align="center" width='99%'> <tr> <td class="canvas"> <table cellpadding='0' cellspacing='0' border='0' width='100%'> <tr> <td height="3" colspan="11" bgcolor="#A1A1A1"></td> </tr> <tr>