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");}
}
}
if ($ignorefile ne "") {
open (IGNORE, $ignorefile);
while (<IGNORE>) {
- chop;
+ $_=~ s/\s+$//;
+ chomp;
next if (/\#/); #skip comments
next if (/^\s*$/); # and blank lines
$ignore{$_}=1;