diff --git a/monkey/infection_monkey/exploit/HostExploiter.py b/monkey/infection_monkey/exploit/HostExploiter.py index 9490b8706..f910cfa49 100644 --- a/monkey/infection_monkey/exploit/HostExploiter.py +++ b/monkey/infection_monkey/exploit/HostExploiter.py @@ -3,7 +3,7 @@ import threading from abc import abstractmethod from datetime import datetime from ipaddress import IPv4Address -from typing import Dict, Sequence +from typing import Dict, Sequence, Tuple from common.agent_events import ExploitationEvent, PropagationEvent from common.event_queue import IAgentEventQueue @@ -132,7 +132,7 @@ class HostExploiter: self, target: str, propagation_success: bool, - tags: frozenset = frozenset(), + tags: Tuple[str] = tuple(), error_message: str = "", ): propagation_event = PropagationEvent( @@ -141,7 +141,7 @@ class HostExploiter: success=propagation_success, exploiter_name=self.__class__.__name__, error_message=error_message, - tags=tags, + tags=frozenset(tags), ) self.agent_event_queue.publish(propagation_event) @@ -149,7 +149,7 @@ class HostExploiter: self, target: str, exploitation_success: bool, - tags: frozenset = frozenset(), + tags: Tuple[str] = tuple(), error_message: str = "", ): exploitation_event = ExploitationEvent( @@ -158,6 +158,6 @@ class HostExploiter: success=exploitation_success, exploiter_name=self.__class__.__name__, error_message=error_message, - tags=tags, + tags=frozenset(tags), ) self.agent_event_queue.publish(exploitation_event)