From e4bdc964103de75d04a23fcd65014556da90fafa Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Thu, 2 Dec 2021 11:51:14 +0200 Subject: [PATCH] Agent: move _set_propagation_depth and _add_default_server_to_config from constructor to start Moved because these methods don't initialize the parameters, they change the global WormConfiguration object which is logic/behavior --- monkey/infection_monkey/monkey.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/monkey/infection_monkey/monkey.py b/monkey/infection_monkey/monkey.py index 771ed00b5..cc3c5156e 100644 --- a/monkey/infection_monkey/monkey.py +++ b/monkey/infection_monkey/monkey.py @@ -109,9 +109,7 @@ class InfectionMonkey: # Sets island's IP and port for monkey to communicate to if not self._is_default_server_set(): raise Exception( - "Monkey couldn't find server with {} default tunnel.".format( - self._opts.tunnel - ) + "Monkey couldn't find server with {} default tunnel.".format(self._opts.tunnel) ) self._set_default_port() @@ -190,7 +188,7 @@ class InfectionMonkey: logger.info("Monkey cleanup started") try: if self._is_upgrade_to_64_needed(): - logger.debug("Detected upgrade to 64bit") + logger.debug("Cleanup not needed for 32 bit agent on 64 bit system(it didn't run)") return if self._master: