Compare commits

...

2 Commits

View File

@ -22,16 +22,27 @@ sub parser {
m/(\ ($re_host):[0-9]{1,6})/gcix && do {
$host = $2;
};
} elsif($string =~ m/https\~ https\/\<NOSRV\>/) {
if($string =~ m/-1\/-1\/-1\/-1\/[0-9]{1,20} 0 0/) {
#This one seems like someone is doing something bad. Return code 0
} elsif($string =~ m/https\/1: (Timeout|Connection closed) during SSL handshake/) {
$_ = $string;
$reply = 'SSL handshake error';
$hostile = 1;
PARSE:
m/(:\ ($re_host):[0-9]{1,6})/gcix && do {
$host = $2;
};
} elsif($string =~ m/http(s\~|) http(s|)\/\<NOSRV\>/) {
if($string =~ m/-1\/-1\/-1\/-1\/[0-9]{1,20} (400|0) 0/) {
#This one seems like someone is doing something bad. Return code 400/0
$_ = $string;
$hostile = 1;
$reply = 'Bad request, return code 0';
$reply = 'Bad request, return code 400/0';
PARSE:
m/(\ ($re_host):[0-9]{1,6})/gcix && do {
$host = $2;
};
} else {
#Other requests of this type seems to be ... not too bad
$reply = 'Not routed, but probs only random error codes'
}
} elsif($string =~ m/https\~ /) {
#Accepted as https, probably fine..