Merge pull request #216 from VakarisZ/web_rce_get_ports_bugfix

Small bugfix for web_rce get_open_service_ports function
This commit is contained in:
Daniel Goldberg 2018-11-26 05:04:05 -08:00 committed by GitHub
commit 45cc7f0bf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -126,7 +126,9 @@ class WebRCE(HostExploiter):
candidate_services = {} candidate_services = {}
candidate_services.update({ candidate_services.update({
service: self.host.services[service] for service in self.host.services if 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 valid_ports = [(port, candidate_services['tcp-' + str(port)]['data'][1]) for port in port_list if