From 9aaf9956f9a4b388880b34b5dfac3faa77da2c63 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Fri, 12 Nov 2021 16:11:35 +0100 Subject: [PATCH 1/4] Agent: Remove serialize config --- monkey/infection_monkey/config.py | 3 --- monkey/infection_monkey/main.py | 12 ------------ 2 files changed, 15 deletions(-) diff --git a/monkey/infection_monkey/config.py b/monkey/infection_monkey/config.py index 24a7d31bd..8fb4b2cb9 100644 --- a/monkey/infection_monkey/config.py +++ b/monkey/infection_monkey/config.py @@ -128,9 +128,6 @@ class Configuration(object): # Configuration servers to try to connect to, in this order. command_servers = ["192.0.2.0:5000"] - # sets whether or not to locally save the running configuration after finishing - serialize_config = False - # sets whether or not to retry failed hosts on next scan retry_failed_explotation = True diff --git a/monkey/infection_monkey/main.py b/monkey/infection_monkey/main.py index a8db2ab6a..bb08f4b4f 100644 --- a/monkey/infection_monkey/main.py +++ b/monkey/infection_monkey/main.py @@ -123,18 +123,6 @@ def main(): try: monkey.start() - if WormConfiguration.serialize_config: - with open(config_file, "w") as config_fo: - json_dict = WormConfiguration.as_dict() - json.dump( - json_dict, - config_fo, - skipkeys=True, - sort_keys=True, - indent=4, - separators=(",", ": "), - ) - return True except Exception as e: logger.exception("Exception thrown from monkey's start function. More info: {}".format(e)) From 3b77c8af4172fe14c28fb3ab5ed2e839c00c93cc Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Fri, 12 Nov 2021 16:12:09 +0100 Subject: [PATCH 2/4] Island: Remove serialize config checkbox --- monkey/monkey_island/cc/services/config_schema/internal.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/monkey/monkey_island/cc/services/config_schema/internal.py b/monkey/monkey_island/cc/services/config_schema/internal.py index f503b1cbf..3e9144539 100644 --- a/monkey/monkey_island/cc/services/config_schema/internal.py +++ b/monkey/monkey_island/cc/services/config_schema/internal.py @@ -60,12 +60,6 @@ INTERNAL = { "monkey propagating to " "a high number of machines", }, - "serialize_config": { - "title": "Serialize config", - "type": "boolean", - "default": False, - "description": "Should the monkey dump its config on startup", - }, "alive": { "title": "Alive", "type": "boolean", From 159b27025d6b9bd58eee08d407b6feae575a35dd Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Fri, 12 Nov 2021 16:12:33 +0100 Subject: [PATCH 3/4] UT: Remove serialize config --- .../data_for_tests/monkey_configs/monkey_config_standard.json | 1 - 1 file changed, 1 deletion(-) diff --git a/monkey/tests/data_for_tests/monkey_configs/monkey_config_standard.json b/monkey/tests/data_for_tests/monkey_configs/monkey_config_standard.json index 10aac025b..0f562c8d9 100644 --- a/monkey/tests/data_for_tests/monkey_configs/monkey_config_standard.json +++ b/monkey/tests/data_for_tests/monkey_configs/monkey_config_standard.json @@ -52,7 +52,6 @@ "monkey": { "victims_max_find": 100, "victims_max_exploit": 100, - "serialize_config": false, "alive": true, "aws_keys": { "aws_access_key_id": "", From cb06f408d4ca99a4be7d63bf8e27cd5d14f10f4a Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Fri, 12 Nov 2021 16:12:53 +0100 Subject: [PATCH 4/4] Changelog: Remove serialize config --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 945fbf435..1ad66f126 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/). - Checkbox to disable/enable sending log to server. #1537 - Checkbox for self deleting a monkey agent on cleanup. #1537 - Checkbox for file logging. #1537 +- Remove serialization of config. #1537 ### Fixed - A bug in network map page that caused delay of telemetry log loading. #1545