diff --git a/monkey/infection_monkey/exploit/HostExploiter.py b/monkey/infection_monkey/exploit/HostExploiter.py index 2e0faad36..915a8c50e 100644 --- a/monkey/infection_monkey/exploit/HostExploiter.py +++ b/monkey/infection_monkey/exploit/HostExploiter.py @@ -128,23 +128,6 @@ class HostExploiter: powershell = True if "powershell" in cmd.lower() else False self.exploit_info["executed_cmds"].append({"cmd": cmd, "powershell": powershell}) - def _publish_propagation_event( - self, - target: str, - propagation_success: bool, - tags: Tuple[str, ...] = tuple(), - error_message: str = "", - ): - propagation_event = PropagationEvent( - source=get_agent_id(), - target=IPv4Address(target), - success=propagation_success, - exploiter_name=self.__class__.__name__, - error_message=error_message, - tags=frozenset(tags), - ) - self.agent_event_queue.publish(propagation_event) - def _publish_exploitation_event( self, target: str, @@ -161,3 +144,20 @@ class HostExploiter: tags=frozenset(tags), ) self.agent_event_queue.publish(exploitation_event) + + def _publish_propagation_event( + self, + target: str, + propagation_success: bool, + tags: Tuple[str, ...] = tuple(), + error_message: str = "", + ): + propagation_event = PropagationEvent( + source=get_agent_id(), + target=IPv4Address(target), + success=propagation_success, + exploiter_name=self.__class__.__name__, + error_message=error_message, + tags=frozenset(tags), + ) + self.agent_event_queue.publish(propagation_event)