From 6b2eb126b5a12be96b8e0e72cf14ee9be104b61c Mon Sep 17 00:00:00 2001 From: Shay Nehmad Date: Tue, 23 Apr 2019 19:44:47 +0300 Subject: [PATCH] Deleted ENCRYPTED_CONFIG_STRINGS --- monkey/monkey_island/cc/services/config.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/monkey/monkey_island/cc/services/config.py b/monkey/monkey_island/cc/services/config.py index 3f0557c35..5b6b25cac 100644 --- a/monkey/monkey_island/cc/services/config.py +++ b/monkey/monkey_island/cc/services/config.py @@ -67,8 +67,6 @@ class ConfigService: if should_decrypt: if config_key_as_arr in ENCRYPTED_CONFIG_ARRAYS: config = [encryptor.dec(x) for x in config] - elif config_key_as_arr in ENCRYPTED_CONFIG_STRINGS: - config = encryptor.dec(config) return config @staticmethod @@ -225,11 +223,8 @@ class ConfigService: """ Same as decrypt_config but for a flat configuration """ - if is_island: - keys = [config_arr_as_array[2] for config_arr_as_array in - (ENCRYPTED_CONFIG_ARRAYS + ENCRYPTED_CONFIG_STRINGS)] - else: - keys = [config_arr_as_array[2] for config_arr_as_array in ENCRYPTED_CONFIG_ARRAYS] + keys = [config_arr_as_array[2] for config_arr_as_array in ENCRYPTED_CONFIG_ARRAYS] + for key in keys: if isinstance(flat_config[key], collections.Sequence) and not isinstance(flat_config[key], string_types): # Check if we are decrypting ssh key pair @@ -243,7 +238,7 @@ class ConfigService: @staticmethod def _encrypt_or_decrypt_config(config, is_decrypt=False): - for config_arr_as_array in (ENCRYPTED_CONFIG_ARRAYS + ENCRYPTED_CONFIG_STRINGS): + for config_arr_as_array in ENCRYPTED_CONFIG_ARRAYS: config_arr = config parent_config_arr = None