diff options
author | Ermal <eri@pfsense.org> | 2012-06-13 15:52:13 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2012-06-13 15:52:32 +0000 |
commit | 63362b12e38341d641f21e9600f2610b22016baa (patch) | |
tree | 36ebafe30cdab2ee5b16e24e05968b0700ed945d /config | |
parent | 5ab2c55b04ad459569a13005068c2407634a604d (diff) | |
download | pfsense-packages-63362b12e38341d641f21e9600f2610b22016baa.tar.gz pfsense-packages-63362b12e38341d641f21e9600f2610b22016baa.tar.bz2 pfsense-packages-63362b12e38341d641f21e9600f2610b22016baa.zip |
Untested fix to the snort widget page after yeterday changes to snort package.
Diffstat (limited to 'config')
-rw-r--r-- | config/widget-snort/snort_alerts.inc | 14 | ||||
-rw-r--r-- | config/widget-snort/snort_alerts.inc.php | 3 | ||||
-rw-r--r-- | config/widget-snort/snort_alerts_helper.php | 13 |
3 files changed, 20 insertions, 10 deletions
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; ?> <script src="/javascript/scriptaculous/prototype.js" type="text/javascript"></script> |