diff --git a/monkey/infection_monkey/monkey.py b/monkey/infection_monkey/monkey.py index 1640c1fa1..3feaebf9f 100644 --- a/monkey/infection_monkey/monkey.py +++ b/monkey/infection_monkey/monkey.py @@ -6,7 +6,10 @@ import sys from pathlib import Path, WindowsPath from typing import List +from pubsub.core import Publisher + import infection_monkey.tunnel as tunnel +from common.event_queue import PyPubSubEventQueue from common.network.network_utils import address_to_ip_port from common.utils.argparse_types import positive_int from common.utils.attack_utils import ScanStatus, UsageEnum @@ -103,6 +106,7 @@ class InfectionMonkey: self._current_depth = self._opts.depth self._master = None self._inbound_tunnel_opened = False + self._event_queue = None @staticmethod def _get_arguments(args): @@ -194,6 +198,8 @@ class InfectionMonkey: def _build_master(self): local_network_interfaces = InfectionMonkey._get_local_network_interfaces() + self._event_queue = PyPubSubEventQueue(Publisher()) + # TODO control_channel and control_client have same responsibilities, merge them control_channel = ControlChannel( self._control_client.server_address, GUID, self._control_client.proxies diff --git a/vulture_allowlist.py b/vulture_allowlist.py index 29359dfe9..7bd2185f2 100644 --- a/vulture_allowlist.py +++ b/vulture_allowlist.py @@ -213,6 +213,7 @@ _make_simulation # unused method (monkey/monkey_island/cc/models/simulation.py: # TODO DELETE AFTER EVENT QUEUE IMPLEMENTATION AbstractEvent tags +_event_queue # TODO DELETE AFTER RESOURCE REFACTORING