From 49b72e86515d579389d0fdc531268e879002f4aa Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Tue, 24 May 2022 15:59:29 -0400 Subject: [PATCH] Agent: Remove ControlChannel's dependency on WormConfiguration --- monkey/infection_monkey/master/control_channel.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/monkey/infection_monkey/master/control_channel.py b/monkey/infection_monkey/master/control_channel.py index ad8361c62..53e2cee0b 100644 --- a/monkey/infection_monkey/master/control_channel.py +++ b/monkey/infection_monkey/master/control_channel.py @@ -4,7 +4,6 @@ import logging import requests from common.common_consts.timeouts import SHORT_REQUEST_TIMEOUT -from infection_monkey.config import WormConfiguration from infection_monkey.control import ControlClient from infection_monkey.custom_types import PropagationCredentials from infection_monkey.i_control_channel import IControlChannel, IslandCommunicationError @@ -50,7 +49,7 @@ class ControlChannel(IControlChannel): def get_config(self) -> dict: try: response = requests.get( # noqa: DUO123 - "https://%s/api/agent/%s" % (WormConfiguration.current_server, self._agent_id), + f"https://{self._control_channel_server}/api/agent/{self._agent_id}", verify=False, proxies=ControlClient.proxies, timeout=SHORT_REQUEST_TIMEOUT,