From e7c0e87ea83d3f74b77d2005ccfa80feee72d4b4 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 7 Oct 2006 05:11:49 +0000 Subject: Woops, reverse the numbers. --- packages/snort/snort.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/snort/snort.inc b/packages/snort/snort.inc index 039a03a7..fb0b7343 100644 --- a/packages/snort/snort.inc +++ b/packages/snort/snort.inc @@ -489,9 +489,9 @@ function get_snort_alert($ip) { $file_split = split("\n", file_get_contents("/var/log/snort/alert")); foreach($file_split as $fileline) { if (preg_match("/\[\*\*\] (\[.*\]) (.*) (\[\*\*\])/", $fileline, $matches)) - $alert_title = $matches[0]; + $alert_title = $matches[2]; if (preg_match("/(\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b)/", $fileline, $matches)) - $alert_ip = $matches[2]; + $alert_ip = $matches[0]; if($alert_ip == $ip) return $alert_title; } -- cgit v1.2.3