Sophie

Sophie

distrib > Mandriva > 2008.1 > i586 > by-pkgid > e28667f4e1cf50e0b002c8a83e0e0d6f > files > 170

logwatch-7.3.6-2mdv2008.1.noarch.rpm

##########################################################################
# $Id: bfd,v 1.1 2007/04/15 19:48:23 bjorn Exp $
##########################################################################
# $Log: bfd,v $
# Revision 1.1  2007/04/15 19:48:23  bjorn
# New bfd (Brute Force Detection) service, by Andy Bolstridge.
#
##########################################################################

$Debug = $ENV{'LOGWATCH_DEBUG'} || 0;

if ( $Debug >= 5 ) {
   print STDERR "\n\nDEBUG: Inside BFD Filter \n\n";
   $DebugCounter = 1;
}

while (defined($ThisLine = <STDIN>)) {
   if ( $Debug >= 5 ) {
      print STDERR "DEBUG($DebugCounter): $ThisLine";
      $DebugCounter++;
   }

   $ThisLine =~ s/^[^ ]* [^ ]* //;

   if ( $ThisLine =~ s/.*apf \-d ([^ ]+).*\{([^\}]+).*/$1 : \($2\)/ ) {
      $Banned{$ThisLine}++;
   } else {
      # Report any unmatched entries...
      push @OtherList,$ThisLine;
   }
}

if (keys %Banned) {
   print "\nBanned:\n";
   foreach $ThisOne (keys %Banned) {
       print "   ". $ThisOne;
   }
}

if ($#OtherList >= 0) {
   print "\n**Unmatched Entries**\n";
   print @OtherList;
}

exit(0);

# vi: shiftwidth=3 tabstop=3 et