From 4966c74214a83684d0484fa6b00f6ae8d19c97bf Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Wed, 10 Nov 2021 18:40:35 +0530 Subject: [PATCH] Agent: Remove kill file config option --- monkey/infection_monkey/config.py | 6 ------ monkey/infection_monkey/example.conf | 2 -- monkey/infection_monkey/main.py | 10 ---------- 3 files changed, 18 deletions(-) diff --git a/monkey/infection_monkey/config.py b/monkey/infection_monkey/config.py index 433f11541..8756926f1 100644 --- a/monkey/infection_monkey/config.py +++ b/monkey/infection_monkey/config.py @@ -96,12 +96,6 @@ class Configuration(object): dropper_target_path_win_64 = r"C:\Windows\temp\monkey64.exe" dropper_target_path_linux = "/tmp/monkey" - ########################### - # Kill file - ########################### - kill_file_path_windows = "%windir%\\monkey.not" - kill_file_path_linux = "/var/run/monkey.not" - ########################### # monkey config ########################### diff --git a/monkey/infection_monkey/example.conf b/monkey/infection_monkey/example.conf index d9acee9ed..1cd4dc9d5 100644 --- a/monkey/infection_monkey/example.conf +++ b/monkey/infection_monkey/example.conf @@ -26,8 +26,6 @@ "monkey_dir_name": "monkey_dir", - "kill_file_path_linux": "/var/run/monkey.not", - "kill_file_path_windows": "%windir%\\monkey.not", "dropper_try_move_first": true, "exploiter_classes": [ "SSHExploiter", diff --git a/monkey/infection_monkey/main.py b/monkey/infection_monkey/main.py index 07270a86e..291f35d32 100644 --- a/monkey/infection_monkey/main.py +++ b/monkey/infection_monkey/main.py @@ -78,16 +78,6 @@ def main(): formatted_config = pformat(WormConfiguration.hide_sensitive_info(WormConfiguration.as_dict())) print(f"Loaded Configuration:\n{formatted_config}") - # Make sure we're not in a machine that has the kill file - kill_path = ( - os.path.expandvars(WormConfiguration.kill_file_path_windows) - if sys.platform == "win32" - else WormConfiguration.kill_file_path_linux - ) - if os.path.exists(kill_path): - print("Kill path found, finished run") - return True - try: if MONKEY_ARG == monkey_mode: log_path = get_monkey_log_path()