diff --git a/chaos_monkey/config.py b/chaos_monkey/config.py index 4b3198203..d699cf64e 100644 --- a/chaos_monkey/config.py +++ b/chaos_monkey/config.py @@ -84,8 +84,10 @@ class Configuration(object): ########################### use_file_logging = True - dropper_log_path = os.path.expandvars("%temp%\~df1562.tmp") if sys.platform == "win32" else '/tmp/user-1562' - monkey_log_path = os.path.expandvars("%temp%\~df1563.tmp") if sys.platform == "win32" else '/tmp/user-1563' + dropper_log_path_windows = os.path.expandvars("%temp%\~df1562.tmp") + dropper_log_path_linux = '/tmp/user-1562' + monkey_log_path_windows = os.path.expandvars("%temp%\~df1563.tmp") + monkey_log_path_linux = '/tmp/user-1563' ########################### # dropper config diff --git a/chaos_monkey/example.conf b/chaos_monkey/example.conf index 28bac42ce..c72d202a5 100644 --- a/chaos_monkey/example.conf +++ b/chaos_monkey/example.conf @@ -7,7 +7,8 @@ ], "current_server": "127.0.0.1:5000", "dropper_date_reference_path": "/bin/sh", - "dropper_log_path": "/tmp/user-1562", + "dropper_log_path_windows": "%temp%\\~df1562.tmp", + "dropper_log_path_linux": "/tmp/user-1562", "dropper_set_date": true, "dropper_target_path": "C:\\Windows\\monkey.exe", "dropper_target_path_linux": "/bin/monkey", @@ -25,7 +26,8 @@ "SMBFinger" ], "max_iterations": 3, - "monkey_log_path": "/tmp/user-1563", + "monkey_log_path_windows": "%temp%\\~df1563.tmp", + "monkey_log_path_linux": "/tmp/user-1563", "ms08_067_exploit_attempts": 5, "ms08_067_remote_user_add": "IUSER_SUPPORT", "ms08_067_remote_user_pass": "Password1!", diff --git a/chaos_monkey/main.py b/chaos_monkey/main.py index 8682508bb..ee360ac34 100644 --- a/chaos_monkey/main.py +++ b/chaos_monkey/main.py @@ -68,10 +68,10 @@ def main(): try: if MONKEY_ARG == monkey_mode: - log_path = WormConfiguration.monkey_log_path + log_path = os.path.expandvars(WormConfiguration.monkey_log_path_windows) if sys.platform == "win32" else WormConfiguration.monkey_log_path_linux monkey_cls = ChaosMonkey elif DROPPER_ARG == monkey_mode: - log_path = WormConfiguration.dropper_log_path + log_path = os.path.expandvars(WormConfiguration.dropper_log_path_windows) if sys.platform == "win32" else WormConfiguration.dropper_log_path_linux monkey_cls = MonkeyDrops else: return True