Hadoop bugfix, minor readability improvement
This commit is contained in:
parent
5def120942
commit
ca1ee90385
|
@ -325,9 +325,10 @@ class ControlClient(object):
|
|||
return False
|
||||
|
||||
@staticmethod
|
||||
def should_monkey_run(port: str) -> bool:
|
||||
if WormConfiguration.get_hop_count() > 1 and \
|
||||
ControlClient.can_island_see_port(port) and \
|
||||
def should_monkey_run(vulnerable_port: str) -> bool:
|
||||
if vulnerable_port and \
|
||||
WormConfiguration.get_hop_count() > 1 and \
|
||||
ControlClient.can_island_see_port(vulnerable_port) and \
|
||||
WormConfiguration.started_on_island:
|
||||
raise PlannedShutdownException("Monkey shouldn't run on current machine "
|
||||
"(it will be exploited later with more depth).")
|
||||
|
|
|
@ -74,7 +74,7 @@ class HadoopExploiter(WebRCE):
|
|||
def build_command(self, path, http_path):
|
||||
# Build command to execute
|
||||
monkey_cmd = build_monkey_commandline(self.host, get_monkey_depth() - 1,
|
||||
vulnerable_port=HTTPTools.get_port_from_url(http_path))
|
||||
vulnerable_port=HadoopExploiter.HADOOP_PORTS[0][0])
|
||||
if 'linux' in self.host.os['type']:
|
||||
base_command = HADOOP_LINUX_COMMAND
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue