]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - config/guardian/guardian.pl
Fix build logfiles list sometimes files that are not new.
[people/pmueller/ipfire-2.x.git] / config / guardian / guardian.pl
index b5c3f9c16ae78c3499b5c2f062396f6ffd784177..0c37c34f4f8e22e4bd59c44dfcf9bd9069a7029e 100644 (file)
@@ -94,7 +94,7 @@ for (;;) {
                while (<ALERT2>) {
                        chop;
                        if ($_=~/.*sshd.*Failed password for root from.*/) {
-                               my @array=split(/ /,$_);&checkssh ($array[10], "possible SSH-Bruteforce Attack");}
+                               my @array=split(/ /,$_);&checkssh ($array[11], "possible SSH-Bruteforce Attack");}
                        }
        }
 
@@ -211,7 +211,8 @@ sub build_ignore_hash {
        if ($ignorefile ne "") {
                open (IGNORE, $ignorefile);
                while (<IGNORE>) {
-                       chop;
+                       $_=~ s/\s+$//;
+                       chomp;
                        next if (/\#/);  #skip comments
                        next if (/^\s*$/); # and blank lines
                        $ignore{$_}=1;