From 95b1d9c62dfeb2ce33b4a8396e3c4caaf5349598 Mon Sep 17 00:00:00 2001 From: Kekoa Kaaikala Date: Wed, 5 Oct 2022 15:57:15 +0000 Subject: [PATCH] Agent: Remove target from publish methods --- monkey/infection_monkey/exploit/HostExploiter.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/monkey/infection_monkey/exploit/HostExploiter.py b/monkey/infection_monkey/exploit/HostExploiter.py index 915a8c50e..1327fd26d 100644 --- a/monkey/infection_monkey/exploit/HostExploiter.py +++ b/monkey/infection_monkey/exploit/HostExploiter.py @@ -130,14 +130,13 @@ class HostExploiter: def _publish_exploitation_event( self, - target: str, exploitation_success: bool, tags: Tuple[str, ...] = tuple(), error_message: str = "", ): exploitation_event = ExploitationEvent( source=get_agent_id(), - target=IPv4Address(target), + target=IPv4Address(self.host.ip_addr), success=exploitation_success, exploiter_name=self.__class__.__name__, error_message=error_message, @@ -147,14 +146,13 @@ class HostExploiter: 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), + target=IPv4Address(self.host.ip_addr), success=propagation_success, exploiter_name=self.__class__.__name__, error_message=error_message,