diff --git a/README.md b/README.md index ecfb074..469f444 100644 --- a/README.md +++ b/README.md @@ -221,6 +221,7 @@ For convenience, a web front-end on top of the command-line tool is available at - Fixed crash when running with `-P` and `-T` options simultaneously. - Fixed host key tests from only reporting a key type at most once despite multiple hosts supporting it; credit [Daniel Lenski](https://github.com/dlenskiSB). - Fixed DHEat connection rate testing on MacOS X and BSD platforms; credit [Drew Noel](https://github.com/drewmnoel) and [Michael Osipov](https://github.com/michael-o). + - Fixed invalid JSON output when a socket error occurs while performing a client audit. - Added 1 new cipher: `grasshopper-ctr128`. - Added 2 new key exchanges: `mlkem768x25519-sha256`, `sntrup761x25519-sha512`. diff --git a/src/ssh_audit/ssh_socket.py b/src/ssh_audit/ssh_socket.py index 4afaa57..400bd50 100644 --- a/src/ssh_audit/ssh_socket.py +++ b/src/ssh_audit/ssh_socket.py @@ -108,7 +108,7 @@ class SSH_Socket(ReadBuf, WriteBuf): s.listen() self.__sock_map[s.fileno()] = s except Exception as e: - print("Warning: failed to listen on any IPv4 interfaces: %s" % str(e)) + print("Warning: failed to listen on any IPv4 interfaces: %s" % str(e), file=sys.stderr) try: # Socket to listen on all IPv6 addresses. @@ -119,11 +119,11 @@ class SSH_Socket(ReadBuf, WriteBuf): s.listen() self.__sock_map[s.fileno()] = s except Exception as e: - print("Warning: failed to listen on any IPv6 interfaces: %s" % str(e)) + print("Warning: failed to listen on any IPv6 interfaces: %s" % str(e), file=sys.stderr) # If we failed to listen on any interfaces, terminate. if len(self.__sock_map.keys()) == 0: - print("Error: failed to listen on any IPv4 and IPv6 interfaces!") + print("Error: failed to listen on any IPv4 and IPv6 interfaces!", file=sys.stderr) sys.exit(exitcodes.CONNECTION_ERROR) # Wait for an incoming connection. If a timeout was explicitly