From f7ccdf4686d486ef5994c97f6f57bc5fe0425bb7 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 26 Sep 2006 21:44:19 +0000 Subject: * Alert user when no items are in the list * Otherwise show how many items listed --- packages/snort/snort_blocked.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'packages/snort') diff --git a/packages/snort/snort_blocked.php b/packages/snort/snort_blocked.php index c23639c5..4dd0a72d 100644 --- a/packages/snort/snort_blocked.php +++ b/packages/snort/snort_blocked.php @@ -80,15 +80,21 @@ include("head.inc"); $ips = `/sbin/pfctl -t snort2c -T show`; $ips_array = split("\n", $ips); + $counter = 0; foreach($ips_array as $ip) { if(!$ip) continue; + $counter++; echo ""; echo "'"; echo "\"Delete\""; echo "{$ip}"; echo ""; } + if($counter < 1) + echo "There are currently no items being blocked by snort."; + else + echo "{$counter} items listed."; ?> -- cgit v1.2.3