Agent: Log exception if PowerShellExploiter fails to copy agent

This commit is contained in:
Mike Salvatore 2021-08-25 14:18:43 -04:00
parent 86d7879c31
commit 176828d458
1 changed files with 2 additions and 2 deletions

View File

@ -134,8 +134,8 @@ class PowerShellExploiter(HostExploiter):
self.client.copy(TEMP_MONKEY_BINARY_FILEPATH, dest)
LOG.info(f"Successfully copied the monkey agent binary to {self.host.ip_addr}")
return True
except Exception:
LOG.warning(f"Failed to copy the monkey agent binary to {self.host.ip_addr}")
except Exception as ex:
LOG.error(f"Failed to copy the monkey agent binary to {self.host.ip_addr}: {ex}")
return False
finally:
os.remove(TEMP_MONKEY_BINARY_FILEPATH)