forked from p15670423/monkey
Merge pull request #70 from guardicore/bugfix/shellshock-service-name-bug
Fix shellshock bug where service name wasn't available
This commit is contained in:
commit
68ec6d26f6
|
@ -38,8 +38,10 @@ class ShellShockExploiter(HostExploiter):
|
|||
|
||||
def exploit_host(self):
|
||||
# start by picking ports
|
||||
candidate_services = {service: self.host.services[service] for service in self.host.services if
|
||||
self.host.services[service]['name'] == 'http'}
|
||||
candidate_services = {
|
||||
service: self.host.services[service] for service in self.host.services if
|
||||
('name' in self.host.services[service]) and (self.host.services[service]['name'] == 'http')
|
||||
}
|
||||
|
||||
valid_ports = [(port, candidate_services['tcp-' + str(port)]['data'][1]) for port in self.HTTP if
|
||||
'tcp-' + str(port) in candidate_services]
|
||||
|
|
Loading…
Reference in New Issue