Robustify parser, and chomp up messages not in [preauth]
This commit is contained in:
@ -47,13 +47,13 @@ sub parser {
|
||||
m/(from\ ($re_host)) /gcix && do {
|
||||
$host = $2;
|
||||
};
|
||||
} elsif($string =~ m/(Disconnecting|Received disconnect from|Disconnected from|Connection closed by|Connection reset by) (authenticating |invalid |)(user .* |)$re_host port [0-9]{1,6}.*\[preauth\]/) {
|
||||
} elsif($string =~ m/(Disconnecting|Received disconnect from|Disconnected from|Connection closed by|Connection reset by) (authenticating |invalid |)(user .* |)$re_host port [0-9]{1,6}(\: Too many authentication failures|)( \[preauth\]|)/) {
|
||||
$_ = $string;
|
||||
$reply = 'Received disconnect';
|
||||
$hostile = 1;
|
||||
PARSER:
|
||||
m/\ ($re_host)\ /gcix && do {
|
||||
$host = $1;
|
||||
m/(\ ($re_host)\ port\ [0-9]{1,6})/gcix && do {
|
||||
$host = $2;
|
||||
};
|
||||
} elsif($string =~ m/refused connect from .* \($re_host\)/) {
|
||||
$_ = $string;
|
||||
|
||||
Reference in New Issue
Block a user