Merge pull request #2192 from guardicore/2176-initialize-event-queue

Initialize IEventQueue
This commit is contained in:
Mike Salvatore 2022-08-12 10:14:20 -04:00 committed by GitHub
commit dc0f865f9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -6,7 +6,10 @@ import sys
from pathlib import Path, WindowsPath from pathlib import Path, WindowsPath
from typing import List from typing import List
from pubsub.core import Publisher
import infection_monkey.tunnel as tunnel import infection_monkey.tunnel as tunnel
from common.event_queue import PyPubSubEventQueue
from common.network.network_utils import address_to_ip_port from common.network.network_utils import address_to_ip_port
from common.utils.argparse_types import positive_int from common.utils.argparse_types import positive_int
from common.utils.attack_utils import ScanStatus, UsageEnum from common.utils.attack_utils import ScanStatus, UsageEnum
@ -194,6 +197,8 @@ class InfectionMonkey:
def _build_master(self): def _build_master(self):
local_network_interfaces = InfectionMonkey._get_local_network_interfaces() local_network_interfaces = InfectionMonkey._get_local_network_interfaces()
_event_queue = PyPubSubEventQueue(Publisher())
# TODO control_channel and control_client have same responsibilities, merge them # TODO control_channel and control_client have same responsibilities, merge them
control_channel = ControlChannel( control_channel = ControlChannel(
self._control_client.server_address, GUID, self._control_client.proxies self._control_client.server_address, GUID, self._control_client.proxies

View File

@ -213,6 +213,7 @@ _make_simulation # unused method (monkey/monkey_island/cc/models/simulation.py:
# TODO DELETE AFTER EVENT QUEUE IMPLEMENTATION # TODO DELETE AFTER EVENT QUEUE IMPLEMENTATION
AbstractEvent AbstractEvent
tags tags
_event_queue
# TODO DELETE IN #2176 # TODO DELETE IN #2176
CredentialsStolenEvent CredentialsStolenEvent