From 93b908f890bad335b476a455fcd1ac257285a08d Mon Sep 17 00:00:00 2001 From: Andris Raugulis Date: Thu, 13 Oct 2016 17:53:01 +0300 Subject: [PATCH] Fix error output. --- ssh-audit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ssh-audit.py b/ssh-audit.py index c0471c3..221f341 100755 --- a/ssh-audit.py +++ b/ssh-audit.py @@ -1612,7 +1612,7 @@ def audit(conf, sshv=None): if err is None: packet_type, payload = s.read_packet(sshv) if packet_type < 0: - payload = payload.decode('utf-8') + payload = str(payload).decode('utf-8') if payload == u'Protocol major versions differ.': if sshv == 2 and conf.ssh1: audit(conf, 1) @@ -1640,7 +1640,7 @@ def audit(conf, sshv=None): utils = Utils.wrap() +out = Output() if __name__ == '__main__': conf = AuditConf.from_cmdline(sys.argv[1:], usage) - out = Output() audit(conf)