From 85d832938d1a896b54758f795b25ff59da68622e Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Mon, 26 Nov 2018 13:43:15 +0200 Subject: [PATCH] Small bugfix in web_rce get_open_service_ports --- monkey/infection_monkey/exploit/web_rce.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/monkey/infection_monkey/exploit/web_rce.py b/monkey/infection_monkey/exploit/web_rce.py index bb3704995..6bc5fee37 100644 --- a/monkey/infection_monkey/exploit/web_rce.py +++ b/monkey/infection_monkey/exploit/web_rce.py @@ -126,7 +126,9 @@ class WebRCE(HostExploiter): candidate_services = {} candidate_services.update({ service: self.host.services[service] for service in self.host.services if - (self.host.services[service] and self.host.services[service]['name'] in names) + (self.host.services[service] and + 'name' in self.host.services[service] and + self.host.services[service]['name'] in names) }) valid_ports = [(port, candidate_services['tcp-' + str(port)]['data'][1]) for port in port_list if