diff options
| author | 2022-11-30 11:04:30 +0000 | |
|---|---|---|
| committer | 2022-11-30 11:04:30 +0000 | |
| commit | e2243c3aae21c6fc0440c7ef9517be3e9a8a20e6 (patch) | |
| tree | df83fb2ca7c738a4e778574814191384fab26767 /tools | |
| parent | Fix GetSnomasks returning unregistered snomasks. (diff) | |
| parent | Add a method for quickly escaping a tag value. (diff) | |
Merge branch 'insp3' into master.
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/testssl | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tools/testssl b/tools/testssl index c5b53bb39..598b81502 100755 --- a/tools/testssl +++ b/tools/testssl @@ -42,6 +42,10 @@ if (scalar @ARGV < 2) { # needs so we disable it. STDOUT->autoflush(1); +# If a server closes the connection whilst an SSL session is being initiated we +# want EPIPE instead of SIGPIPE. +$SIG{PIPE} = 'IGNORE'; + my $hostip = shift @ARGV; if ($hostip =~ /[^A-Za-z0-9.:-]/) { say STDERR "Error: invalid hostname or IP address: $hostip"; @@ -73,7 +77,11 @@ It seems like the server endpoint you specified is not reachable! Make sure that * If you are using a firewall incoming connections on TCP port $port are allowed. * The endpoint your server is listening on is not local or private. -See https://docs.inspircd.org/4/configuration/#ltbindgt for more information. +The error provided by the socket library was: + + $IO::Socket::errstr + +See https://docs.inspircd.org/4/configuration/#bind for more information. EOM exit 1; } @@ -82,7 +90,7 @@ say "${\CC_GREEN}yes${\CC_RESET}"; print "Checking whether ${\CC_BOLD}$hostip/$port${\CC_RESET} is using plaintext ... "; my $error = $sock->recv(my $data, 1); -if ($error) { +if (!defined $error || $data eq '') { say <<"EOM"; ${\CC_RED}error${\CC_RESET} @@ -90,8 +98,9 @@ It seems like the server dropped the connection before sending anything! Make su * The endpoint you specified is actually your IRC server. * If you are using a firewall incoming data on TCP port $port are allowed. + * The IP address you are connecting from has not been banned from the server. -See https://docs.inspircd.org/4/configuration/#ltbindgt for more information. +See https://docs.inspircd.org/4/configuration/#bind for more information. EOM exit 1; } elsif ($data =~ /[A-Z:@]/) { @@ -151,7 +160,6 @@ EOM exit 1; } - say <<"EOM"; ${\CC_GREEN}yes${\CC_RESET} |
