From 6d53928d242f8af1d73322e6d1cfa7edf13cd3bc Mon Sep 17 00:00:00 2001 From: digdug3 Date: Wed, 25 Jul 2012 09:46:50 +0300 Subject: Update config/snort/snort_blocked.php Fix Snort alerts descriptions with "," like: "ET TROJAN MS Terminal Server User A Login, possible Morto inbound" --- config/snort/snort_blocked.php | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/config/snort/snort_blocked.php b/config/snort/snort_blocked.php index babb6bea..6815c18d 100644 --- a/config/snort/snort_blocked.php +++ b/config/snort/snort_blocked.php @@ -137,15 +137,15 @@ if ($pconfig['brefresh'] == 'on') @@ -208,10 +208,9 @@ if ($pconfig['brefresh'] == 'on') if ($fd) { /* 0 1 2 3 4 5 6 7 8 9 10 11 12 /* File format timestamp,sig_generator,sig_id,sig_rev,msg,proto,src,srcport,dst,dstport,id,classification,priority */ - while(($fileline = @fgets($fd))) { - if (empty($fileline)) + while (($fields = fgetcsv($fd, 1000, ',', '"')) !== FALSE) { + if(count($fields) < 11) continue; - $fields = explode(",", $fileline); if (isset($tmpblocked[$fields[6]])) { if (!is_array($src_ip_list[$fields[6]])) @@ -270,4 +269,4 @@ if ($pconfig['brefresh'] == 'on') include("fend.inc"); ?> - + \ No newline at end of file -- cgit v1.2.3