diff --git a/monkey/infection_monkey/exploit/powershell.py b/monkey/infection_monkey/exploit/powershell.py index 369ca151d..a4b2a66a8 100644 --- a/monkey/infection_monkey/exploit/powershell.py +++ b/monkey/infection_monkey/exploit/powershell.py @@ -82,13 +82,13 @@ class PowerShellExploiter(HostExploiter): try: self._execute_monkey_agent_on_victim() - self.exploit_result.propagation_success = True except Exception as ex: self._publish_propagation_event(self.host.ip_addr, False, PROPAGATION_TAGS, str(ex)) logger.error(f"Failed to propagate to the remote host: {ex}") self.exploit_result.error_message = str(ex) return self.exploit_result + self.exploit_result.propagation_success = True self._publish_propagation_event(self.host.ip_addr, True, PROPAGATION_TAGS) return self.exploit_result