From afc43ae8065474e3ce93e0b2bd802d018972e5ae Mon Sep 17 00:00:00 2001 From: vakarisz Date: Tue, 8 Mar 2022 11:30:23 +0200 Subject: [PATCH] Agent: fix a bug in wmi_tools Fix a bug in wmi connection cleanup where incorrect keys were being used on a dictionary --- monkey/infection_monkey/exploit/tools/wmi_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/infection_monkey/exploit/tools/wmi_tools.py b/monkey/infection_monkey/exploit/tools/wmi_tools.py index 078d37daa..b7eaf8675 100644 --- a/monkey/infection_monkey/exploit/tools/wmi_tools.py +++ b/monkey/infection_monkey/exploit/tools/wmi_tools.py @@ -88,7 +88,7 @@ class WmiTools(object): for port_map in list(DCOMConnection.PORTMAPS.keys()): del DCOMConnection.PORTMAPS[port_map] for oid_set in list(DCOMConnection.OID_SET.keys()): - del DCOMConnection.OID_SET[port_map] + del DCOMConnection.OID_SET[oid_set] DCOMConnection.OID_SET = {} DCOMConnection.PORTMAPS = {}