Skip to content

Commit

Permalink
Addresses issue #219 as there was no output in verbose mode to show i…
Browse files Browse the repository at this point in the history
…f a signature was already disabled
  • Loading branch information
shirkdog committed Nov 8, 2016
1 parent 1075c94 commit 18e996c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pulledpork.pl
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,7 @@ sub modify_state {
close(DATA);
if ($hashref) {
my $sidcount = 0;
my $skipcount = 0;
foreach (@sid_mod) {

# ranges
Expand Down Expand Up @@ -982,6 +983,7 @@ sub modify_state {
$sidcount++;
}
$sidcount = 0;
$skipcount = 0;
foreach (@sid_mod) {
if ( $_ =~ /^\d+:\d+/ ) {
my $gid = $&;
Expand Down Expand Up @@ -1063,13 +1065,18 @@ sub modify_state {
/^\s*#*\s*(alert|drop|pass)/i )
{
$$hashref{$gid}{$sid}{'disabled'} = 1;
if ( $Verbose && !$Quiet ) {
print "\tAlready Disabled $gid:$sid\n";
}
$skipcount++;
}
}
}
}
}
}
print "\tModified $sidcount rules\n" if !$Quiet;
print "\tSkipped $sidcount rules (already disabled)\n" if !$Quiet;
}
}
print "\tDone\n" if !$Quiet;
Expand Down

0 comments on commit 18e996c

Please sign in to comment.