From bd0b1c1d34a96929c837e73c2696b50e72198e5c Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Fri, 22 May 2020 10:53:15 +0300 Subject: [PATCH] Refactored monkey local config keys into a constant --- monkey/infection_monkey/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monkey/infection_monkey/config.py b/monkey/infection_monkey/config.py index 46f59b570..ae466237f 100644 --- a/monkey/infection_monkey/config.py +++ b/monkey/infection_monkey/config.py @@ -13,6 +13,7 @@ GUID = str(uuid.getnode()) EXTERNAL_CONFIG_FILE = os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), 'monkey.bin') SENSITIVE_FIELDS = ["exploit_password_list", "exploit_user_list", "exploit_ssh_keys"] +LOCAL_CONFIG_VARS = ["name", "id", "current_server", "max_depth"] HIDDEN_FIELD_REPLACEMENT_CONTENT = "hidden" @@ -22,7 +23,7 @@ class Configuration(object): for key, value in list(formatted_data.items()): if key.startswith('_'): continue - if key in ["name", "id", "current_server", "max_depth"]: + if key in LOCAL_CONFIG_VARS: continue if self._depth_from_commandline and key == "depth": self.max_depth = value