diff --git a/monkey/infection_monkey/exploit/powershell.py b/monkey/infection_monkey/exploit/powershell.py index ff1e6d785..d3c9b12f7 100644 --- a/monkey/infection_monkey/exploit/powershell.py +++ b/monkey/infection_monkey/exploit/powershell.py @@ -86,19 +86,21 @@ class PowerShellExploiter(HostExploiter): ) return self.exploit_result - timestamp = time() + execute_agent_timestamp = time() try: self._execute_monkey_agent_on_victim() except Exception as err: self.exploit_result.error_message = f"Failed to propagate to the remote host: {err}" 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) return self.exploit_result 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