From 63362b12e38341d641f21e9600f2610b22016baa Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 13 Jun 2012 15:52:13 +0000 Subject: Untested fix to the snort widget page after yeterday changes to snort package. --- config/widget-snort/snort_alerts.inc | 14 +++++++++----- config/widget-snort/snort_alerts.inc.php | 3 +-- config/widget-snort/snort_alerts_helper.php | 13 ++++++++++--- 3 files changed, 20 insertions(+), 10 deletions(-) (limited to 'config/widget-snort') diff --git a/config/widget-snort/snort_alerts.inc b/config/widget-snort/snort_alerts.inc index 74adb4bb..08e6c3f7 100644 --- a/config/widget-snort/snort_alerts.inc +++ b/config/widget-snort/snort_alerts.inc @@ -6,11 +6,15 @@ require_once("includes/snort_alerts.inc.php"); $snort_alerts_title = "Snort Alerts"; $snort_alerts_title_link = "snort/snort_alerts.php"; -$snort_alerts_logfile = "{$g['varlog_path']}/snort/alert"; -$nentries = 10; -$snort_alerts = get_snort_alerts($snort_alerts_logfile, $nentries); +foreach (glob("{$g['varlog_path']}/snort/alert_*") as $alert) { + $snort_alerts_logfile = $alert; + $nentries = 10; + $snort_alerts = get_snort_alerts($snort_alerts_logfile, $nentries); -/* AJAX related routines */ -handle_snort_ajax($snort_alerts_logfile, $nentries = 10); + /* AJAX related routines */ + handle_snort_ajax($snort_alerts_logfile, $nentries); +} +if($_GET['lastsawtime'] or $_POST['lastsawtime']) + exit; ?> diff --git a/config/widget-snort/snort_alerts.inc.php b/config/widget-snort/snort_alerts.inc.php index b56ac02c..46d2b9a7 100644 --- a/config/widget-snort/snort_alerts.inc.php +++ b/config/widget-snort/snort_alerts.inc.php @@ -87,7 +87,6 @@ function handle_snort_ajax($snort_alerts_logfile, $nentries = 5, $tail = 50) { } } echo $new_rules; - exit; } } -?> \ No newline at end of file +?> diff --git a/config/widget-snort/snort_alerts_helper.php b/config/widget-snort/snort_alerts_helper.php index b49af1d8..46d68eac 100644 --- a/config/widget-snort/snort_alerts_helper.php +++ b/config/widget-snort/snort_alerts_helper.php @@ -3,9 +3,16 @@ require_once("globals.inc"); require_once("guiconfig.inc"); require_once("includes/snort_alerts.inc.php"); -$snort_alerts_logfile = "{$g['varlog_path']}/snort/alert"; -$nentries = 5; -handle_snort_ajax($snort_alerts_logfile, $nentries); +foreach (glob("{$g['varlog_path']}/snort/alert_*") as $alert) { + $snort_alerts_logfile = $alert; + $nentries = 5; + $snort_alerts = get_snort_alerts($snort_alerts_logfile, $nentries); + + /* AJAX related routines */ + handle_snort_ajax($snort_alerts_logfile, $nentries); +} +if($_GET['lastsawtime'] or $_POST['lastsawtime']) + exit; ?> -- cgit v1.2.3