From cd80917c625d658745dca9f385ce1081c24486b5 Mon Sep 17 00:00:00 2001 From: Joe Testa Date: Wed, 27 Sep 2017 22:36:23 -0400 Subject: [PATCH] Fixed more warnings. --- ssh-audit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ssh-audit.py b/ssh-audit.py index 5fe4b7a..a57858d 100755 --- a/ssh-audit.py +++ b/ssh-audit.py @@ -573,6 +573,7 @@ class SSH2(object): # pylint: disable=too-few-public-methods return # Parse the server's initial KEX. + packet_type = 0 # pylint: disable=unused-variable packet_type, payload = s.read_packet() SSH2.Kex.parse(payload) @@ -704,6 +705,7 @@ class SSH2(object): # pylint: disable=too-few-public-methods # got here, doesn't mean the server is vulnerable... smallest_modulus = kex_group.get_dh_modulus_size() except Exception: # pylint: disable=bare-except + x = 1 # pylint: disable=unused-variable pass finally: s.close() @@ -726,6 +728,7 @@ class SSH2(object): # pylint: disable=too-few-public-methods kex_group.recv_reply(s) smallest_modulus = kex_group.get_dh_modulus_size() except Exception: # pylint: disable=bare-except + x = 1 # pylint: disable=unused-variable pass finally: # The server is in a state that is not re-testable, @@ -2150,7 +2153,7 @@ class KexDH(object): # pragma: nocover key_id, key_id_len, ptr = KexDH.__get_bytes(hostkey, ptr) # The principles, which are... I don't know what. - principles, princicples_len, ptr = KexDH.__get_bytes(hostkey, ptr) + principles, principles_len, ptr = KexDH.__get_bytes(hostkey, ptr) # The timestamp that this certificate is valid after. valid_after = hostkey[ptr:ptr + 8]