From 449fe7517ea8dcb1258a1c630f1d39ff3c267f11 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Tue, 28 Sep 2021 16:21:19 +0200 Subject: [PATCH] Agent: Changed proxy schema --- monkey/infection_monkey/control.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/monkey/infection_monkey/control.py b/monkey/infection_monkey/control.py index 7c9a5769a..7b8f46f81 100644 --- a/monkey/infection_monkey/control.py +++ b/monkey/infection_monkey/control.py @@ -35,6 +35,8 @@ PBA_FILE_DOWNLOAD = "https://%s/api/pba/download/%s" # elsewhere. TIMEOUT_IN_SECONDS = 15 +PROXY_SCHEMA = "%s:%s" + class ControlClient(object): proxies = {} @@ -113,7 +115,7 @@ class ControlClient(object): if proxy_find: proxy_address, proxy_port = proxy_find logger.info("Found tunnel at %s:%s" % (proxy_address, proxy_port)) - ControlClient.proxies["https"] = "https://%s:%s" % (proxy_address, proxy_port) + ControlClient.proxies["https"] = PROXY_SCHEMA % (proxy_address, proxy_port) return ControlClient.find_server() else: logger.info("No tunnel found")