From 91478aa128c014cb3b6305ca9a2a5404e32a946d Mon Sep 17 00:00:00 2001 From: shortcutme Date: Fri, 5 Oct 2018 15:08:28 +0200 Subject: [PATCH] Add TLS version of the connection to stats page --- plugins/Stats/StatsPlugin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/Stats/StatsPlugin.py b/plugins/Stats/StatsPlugin.py index f675b37a..d2f1ca01 100644 --- a/plugins/Stats/StatsPlugin.py +++ b/plugins/Stats/StatsPlugin.py @@ -102,8 +102,10 @@ class UiRequestPlugin(object): for connection in main.file_server.connections: if "cipher" in dir(connection.sock): cipher = connection.sock.cipher()[0] + tls_version = connection.sock.version() else: cipher = connection.crypt + tls_version = "" if "time" in connection.handshake and connection.last_ping_delay: time_correction = connection.handshake["time"] - connection.handshake_time - connection.last_ping_delay else: @@ -113,7 +115,7 @@ class UiRequestPlugin(object): ("%s", connection.type), ("%s:%s", (connection.ip, connection.port)), ("%s", connection.handshake.get("port_opened")), - ("%s", (cipher, connection.crypt)), + ("%s", (cipher, tls_version, connection.crypt)), ("%6.3f", connection.last_ping_delay), ("%s", connection.incomplete_buff_recv), ("%s", connection.bad_actions),