From 89397d8cbd65a6285da6ad995f74f08ca09427c3 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Tue, 27 Sep 2022 13:10:07 +0200 Subject: [PATCH] Agent: Rename event_queue to agent_event_queue --- monkey/infection_monkey/monkey.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/monkey/infection_monkey/monkey.py b/monkey/infection_monkey/monkey.py index c54569360..195f82996 100644 --- a/monkey/infection_monkey/monkey.py +++ b/monkey/infection_monkey/monkey.py @@ -272,14 +272,14 @@ class InfectionMonkey: self._control_channel ) - event_queue = PyPubSubAgentEventQueue(Publisher()) + agent_event_queue = PyPubSubAgentEventQueue(Publisher()) self._subscribe_events( - event_queue, + agent_event_queue, propagation_credentials_repository, self._agent_event_serializer_registry, ) - puppet = self._build_puppet(event_queue) + puppet = self._build_puppet(agent_event_queue) victim_host_factory = self._build_victim_host_factory(local_network_interfaces) @@ -300,34 +300,34 @@ class InfectionMonkey: def _subscribe_events( self, - event_queue: IAgentEventQueue, + agent_event_queue: IAgentEventQueue, propagation_credentials_repository: IPropagationCredentialsRepository, agent_event_serializer_registry: AgentEventSerializerRegistry, ): - event_queue.subscribe_type( + agent_event_queue.subscribe_type( CredentialsStolenEvent, add_credentials_from_event_to_propagation_credentials_repository( propagation_credentials_repository ), ) - event_queue.subscribe_all_events( + agent_event_queue.subscribe_all_events( AgentEventForwarder(self._island_api_client, agent_event_serializer_registry).send_event ) def _build_puppet( self, - event_queue: IAgentEventQueue, + agent_event_queue: IAgentEventQueue, ) -> IPuppet: puppet = Puppet() puppet.load_plugin( "MimikatzCollector", - MimikatzCredentialCollector(event_queue), + MimikatzCredentialCollector(agent_event_queue), PluginType.CREDENTIAL_COLLECTOR, ) puppet.load_plugin( "SSHCollector", - SSHCredentialCollector(self._telemetry_messenger, event_queue), + SSHCredentialCollector(self._telemetry_messenger, agent_event_queue), PluginType.CREDENTIAL_COLLECTOR, ) @@ -341,7 +341,7 @@ class InfectionMonkey: island_api_client=self._island_api_client, ) exploit_wrapper = ExploiterWrapper( - self._telemetry_messenger, event_queue, agent_binary_repository + self._telemetry_messenger, agent_event_queue, agent_binary_repository ) puppet.load_plugin(