Agent: Rename timestamp -> execute_agent_timestamp

This commit is contained in:
Mike Salvatore 2022-10-06 12:39:11 -04:00
parent ac11d159fe
commit c4573673ce
1 changed files with 5 additions and 3 deletions

View File

@ -86,19 +86,21 @@ class PowerShellExploiter(HostExploiter):
) )
return self.exploit_result return self.exploit_result
timestamp = time() execute_agent_timestamp = time()
try: try:
self._execute_monkey_agent_on_victim() self._execute_monkey_agent_on_victim()
except Exception as err: except Exception as err:
self.exploit_result.error_message = f"Failed to propagate to the remote host: {err}" self.exploit_result.error_message = f"Failed to propagate to the remote host: {err}"
self._publish_propagation_event( self._publish_propagation_event(
time=timestamp, success=False, error_message=self.exploit_result.error_message time=execute_agent_timestamp,
success=False,
error_message=self.exploit_result.error_message,
) )
logger.error(self.exploit_result.error_message) logger.error(self.exploit_result.error_message)
return self.exploit_result return self.exploit_result
self.exploit_result.propagation_success = True self.exploit_result.propagation_success = True
self._publish_propagation_event(timestamp, True) self._publish_propagation_event(time=execute_agent_timestamp, success=True)
return self.exploit_result return self.exploit_result