コード例 #1
0
ファイル: ports_graph.php プロジェクト: jhbsz/ossimTest
if (empty($limit)) {
    $limit = 10;
}
if (empty($type)) {
    $type = "event";
}
$security_report = new SecurityReport();
$shared = new DBA_shared(GET('shared'));
$SS_UsedPorts = $shared->get("SS_UsedPorts{$runorder}");
$SA_UsedPorts = $shared->get("SA_UsedPorts{$runorder}");
if ($type == "event" && is_array($SS_UsedPorts) && count($SS_UsedPorts) > 0) {
    $list = $SS_UsedPorts;
} elseif ($type == "alarm" && is_array($SA_UsedPorts) && count($SA_UsedPorts) > 0) {
    $list = $SA_UsedPorts;
} else {
    $list = $security_report->Ports($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[] = $l[0];
    $datay[] = $l[2];
}
$conf = $GLOBALS["CONF"];
$jpgraph = $conf->get_conf("jpgraph_path");
require_once "{$jpgraph}/jpgraph.php";
コード例 #2
0
ファイル: mobile.php プロジェクト: jhbsz/ossimTest
</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>
		<td width="12" valign="top"><img src="../pixmaps/statusbar/btn_minimize.gif" border='0'></td>
		<td style="padding:5px 10px 3px 0px">
		
			<table cellpadding='0' cellspacing='0' border='0' width='100%'>