From dd2168e8383edaab3b8b436437338f0f08b2368e Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Thu, 10 Mar 2022 12:00:27 -0500 Subject: [PATCH] Agent: Log exception information on dcom.disconnect() key error --- monkey/infection_monkey/exploit/tools/wmi_tools.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/monkey/infection_monkey/exploit/tools/wmi_tools.py b/monkey/infection_monkey/exploit/tools/wmi_tools.py index 682dfee60..5b21d2d9f 100644 --- a/monkey/infection_monkey/exploit/tools/wmi_tools.py +++ b/monkey/infection_monkey/exploit/tools/wmi_tools.py @@ -67,8 +67,7 @@ class WmiTools(object): try: dcom.disconnect() except KeyError: - # No connection to disconnect - pass + logger.exception("Disconnecting the DCOMConnection failed") if "rpc_s_access_denied" == exc.error_string: raise AccessDeniedException(host, username, password, domain)