Update of /cvsroot/netpass/NetPass/www/components/Client
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16431/www/components/Client
Modified Files:
ShowResults
Log Message:
Index: ShowResults
===================================================================
RCS file: /cvsroot/netpass/NetPass/www/components/Client/ShowResults,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- ShowResults 1 May 2005 19:46:04 -0000 1.5
+++ ShowResults 17 May 2005 20:34:28 -0000 1.6
@@ -48,6 +48,9 @@
my $struckOut = {};
my $maxStrikes = $np->cfg->policy(-key => 'STRIKES', -network => $ip);
+my $noStrikesForSnort = $np->cfg->policy(-key => 'NO_STRIKES_FOR_SNORT', -network => $ip);
+my $noStrikesForNessus = $np->cfg->policy(-key => 'NO_STRIKES_FOR_NESSUS', -network => $ip);
+my $noStrikesForManual = $np->cfg->policy(-key => 'NO_STRIKES_FOR_MANUAL', -network => $ip);
if ($np->db->macIsRegistered($mac) && $maxStrikes) {
@@ -60,6 +63,9 @@
$results->{'id'}->[$rn]. " is ". $#{$uf->{'type'}});
# +1 bc $# is zero relative, +1 again because it's prev result + cur result
if ( (ref($uf) eq "HASH") && ($#{$uf->{'type'}}+2 > $maxStrikes) ) {
+ next if ( ($uf->{'type'}->[0] =~ /^snort$/i) && $noStrikesForSnort );
+ next if ( ($uf->{'type'}->[0] =~ /^nessus/i) && $noStrikesForNessus );
+ next if ( ($uf->{'type'}->[0] =~ /^manual$/i) && $noStrikesForManual );
$struckOut->{$uf->{'type'}->[0]} -> {$uf->{'id'}->[0]} = 1;
}
}
|