From 3c5625404cac8948ed560126a4ec111df0a20e19 Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Tue, 16 Apr 2019 14:16:41 +0300 Subject: [PATCH] SSH exploiter handles exception better --- monkey/infection_monkey/exploit/sshexec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/infection_monkey/exploit/sshexec.py b/monkey/infection_monkey/exploit/sshexec.py index 8a58f18c6..395b3e448 100644 --- a/monkey/infection_monkey/exploit/sshexec.py +++ b/monkey/infection_monkey/exploit/sshexec.py @@ -84,7 +84,7 @@ class SSHExploiter(HostExploiter): self.report_login_attempt(True, user, curpass) break - except Exception as exc: + except paramiko.AuthenticationException as exc: LOG.debug("Error logging into victim %r with user" " %s and password '%s': (%s)", self.host, user, curpass, exc)