Blame scripts/services/bfd

Packit 57988d
##########################################################################
Packit 57988d
# $Id$
Packit 57988d
##########################################################################
Packit 57988d
# $Log: bfd,v $
Packit 57988d
# Revision 1.3  2008/06/30 23:07:51  kirk
Packit 57988d
# fixed copyright holders for files where I know who they should be
Packit 57988d
#
Packit 57988d
# Revision 1.2  2008/03/24 23:31:26  kirk
Packit 57988d
# added copyright/license notice to each script
Packit 57988d
#
Packit 57988d
# Revision 1.1  2007/04/15 19:48:23  bjorn
Packit 57988d
# New bfd (Brute Force Detection) service, by Andy Bolstridge.
Packit 57988d
#
Packit 57988d
##########################################################################
Packit 57988d
Packit 57988d
########################################################
Packit 57988d
## Copyright (c) 2008 Andy Bolstridge
Packit 57988d
## Covered under the included MIT/X-Consortium License:
Packit 57988d
##    http://www.opensource.org/licenses/mit-license.php
Packit 57988d
## All modifications and contributions by other persons to
Packit 57988d
## this script are assumed to have been donated to the
Packit 57988d
## Logwatch project and thus assume the above copyright
Packit 57988d
## and licensing terms.  If you want to make contributions
Packit 57988d
## under your own copyright or a different license this
Packit 57988d
## must be explicitly stated in the contribution an the
Packit 57988d
## Logwatch project reserves the right to not accept such
Packit 57988d
## contributions.  If you have made significant
Packit 57988d
## contributions to this script and want to claim
Packit 57988d
## copyright please contact logwatch-devel@lists.sourceforge.net.
Packit 57988d
#########################################################
Packit 57988d
Packit 57988d
$Debug = $ENV{'LOGWATCH_DEBUG'} || 0;
Packit 57988d
Packit 57988d
if ( $Debug >= 5 ) {
Packit 57988d
   print STDERR "\n\nDEBUG: Inside BFD Filter \n\n";
Packit 57988d
   $DebugCounter = 1;
Packit 57988d
}
Packit 57988d
Packit 57988d
while (defined($ThisLine = <STDIN>)) {
Packit 57988d
   if ( $Debug >= 5 ) {
Packit 57988d
      print STDERR "DEBUG($DebugCounter): $ThisLine";
Packit 57988d
      $DebugCounter++;
Packit 57988d
   }
Packit 57988d
Packit 57988d
   $ThisLine =~ s/^[^ ]* [^ ]* //;
Packit 57988d
Packit 57988d
   if ( $ThisLine =~ s/.*apf \-d ([^ ]+).*\{([^\}]+).*/$1 : \($2\)/ ) {
Packit 57988d
      $Banned{$ThisLine}++;
Packit 57988d
   } else {
Packit 57988d
      # Report any unmatched entries...
Packit 57988d
      push @OtherList,$ThisLine;
Packit 57988d
   }
Packit 57988d
}
Packit 57988d
Packit 57988d
if (keys %Banned) {
Packit 57988d
   print "\nBanned:\n";
Packit 57988d
   foreach $ThisOne (keys %Banned) {
Packit 57988d
       print "   ". $ThisOne;
Packit 57988d
   }
Packit 57988d
}
Packit 57988d
Packit 57988d
if ($#OtherList >= 0) {
Packit 57988d
   print "\n**Unmatched Entries**\n";
Packit 57988d
   print @OtherList;
Packit 57988d
}
Packit 57988d
Packit 57988d
exit(0);
Packit 57988d
Packit 57988d
# vi: shiftwidth=3 tabstop=3 et
Packit 57988d
# Local Variables:
Packit 57988d
# mode: perl
Packit 57988d
# perl-indent-level: 3
Packit 57988d
# indent-tabs-mode: nil
Packit 57988d
# End: