diff --git a/monkey/monkey_island/cc/services/config.py b/monkey/monkey_island/cc/services/config.py index afc4742ba..87f949ce8 100644 --- a/monkey/monkey_island/cc/services/config.py +++ b/monkey/monkey_island/cc/services/config.py @@ -52,6 +52,8 @@ SENSITIVE_SSH_KEY_FIELDS = [ SensitiveField(path="public_key", field_encryptor=StringEncryptor), ] +SMB_DOWNLOAD_TIMEOUT = 30 + class ConfigService: default_config = None @@ -584,19 +586,19 @@ class ConfigService: config.pop(flat_config_exploiter_classes_field, None) formatted_exploiters_config = ConfigService._add_smb_download_timeout_to_exploiters( - config, formatted_exploiters_config + formatted_exploiters_config ) return ConfigService._add_supported_os_to_exploiters(formatted_exploiters_config) @staticmethod def _add_smb_download_timeout_to_exploiters( - flat_config: Dict, formatted_config: Dict + formatted_config: Dict, ) -> Dict[str, List[Dict[str, Any]]]: new_config = copy.deepcopy(formatted_config) uses_smb_timeout = {"SmbExploiter", "WmiExploiter"} for exploiter in filter(lambda e: e["name"] in uses_smb_timeout, new_config["brute_force"]): - exploiter["options"]["smb_download_timeout"] = flat_config["smb_download_timeout"] + exploiter["options"]["smb_download_timeout"] = SMB_DOWNLOAD_TIMEOUT return new_config