forked from p15670423/monkey
Agent: Log exception if PowerShellExploiter fails to copy agent
This commit is contained in:
parent
86d7879c31
commit
176828d458
|
@ -134,8 +134,8 @@ class PowerShellExploiter(HostExploiter):
|
||||||
self.client.copy(TEMP_MONKEY_BINARY_FILEPATH, dest)
|
self.client.copy(TEMP_MONKEY_BINARY_FILEPATH, dest)
|
||||||
LOG.info(f"Successfully copied the monkey agent binary to {self.host.ip_addr}")
|
LOG.info(f"Successfully copied the monkey agent binary to {self.host.ip_addr}")
|
||||||
return True
|
return True
|
||||||
except Exception:
|
except Exception as ex:
|
||||||
LOG.warning(f"Failed to copy the monkey agent binary to {self.host.ip_addr}")
|
LOG.error(f"Failed to copy the monkey agent binary to {self.host.ip_addr}: {ex}")
|
||||||
return False
|
return False
|
||||||
finally:
|
finally:
|
||||||
os.remove(TEMP_MONKEY_BINARY_FILEPATH)
|
os.remove(TEMP_MONKEY_BINARY_FILEPATH)
|
||||||
|
|
Loading…
Reference in New Issue