forked from p34709852/monkey
Agent: Add interrupt check before/after agent upload in wmiexec.py
This commit is contained in:
parent
bd07459dab
commit
13e5c03cf9
|
@ -70,6 +70,9 @@ class WmiExploiter(HostExploiter):
|
|||
|
||||
downloaded_agent = self.agent_repository.get_agent_binary(self.host.os["type"])
|
||||
|
||||
if self.is_interrupted():
|
||||
return self.exploit_result
|
||||
|
||||
remote_full_path = SmbTools.copy_file(
|
||||
self.host,
|
||||
downloaded_agent,
|
||||
|
@ -81,6 +84,9 @@ class WmiExploiter(HostExploiter):
|
|||
self.options["smb_download_timeout"],
|
||||
)
|
||||
|
||||
if self.is_interrupted():
|
||||
return self.exploit_result
|
||||
|
||||
if not remote_full_path:
|
||||
wmi_connection.close()
|
||||
return self.exploit_result
|
||||
|
|
Loading…
Reference in New Issue