From ca0972f84737b238643c6fdce1b5ca94be228e0f Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Wed, 30 Mar 2022 14:01:12 +0530 Subject: [PATCH] Agent: Pass None to telemetry_messenger arg in nested PBA classes This is not the most ideal way but it gets the job done without the unnecessary complexity of passing the telemetry messenger through different classes and functions when it's not needed. --- .../post_breach/actions/clear_command_history.py | 2 +- .../post_breach/actions/modify_shell_startup_files.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/infection_monkey/post_breach/actions/clear_command_history.py b/monkey/infection_monkey/post_breach/actions/clear_command_history.py index c668550c4..e92185fbf 100644 --- a/monkey/infection_monkey/post_breach/actions/clear_command_history.py +++ b/monkey/infection_monkey/post_breach/actions/clear_command_history.py @@ -47,7 +47,7 @@ class ClearCommandHistory(PBA): class ClearCommandHistoryFile(PBA): def __init__(self, linux_cmds): super().__init__( - self.telemetry_messenger, + telemetry_messenger=None, name=POST_BREACH_CLEAR_CMD_HISTORY, linux_cmd=linux_cmds, ) diff --git a/monkey/infection_monkey/post_breach/actions/modify_shell_startup_files.py b/monkey/infection_monkey/post_breach/actions/modify_shell_startup_files.py index 1310d2140..1a78aa3f0 100644 --- a/monkey/infection_monkey/post_breach/actions/modify_shell_startup_files.py +++ b/monkey/infection_monkey/post_breach/actions/modify_shell_startup_files.py @@ -64,7 +64,7 @@ class ModifyShellStartupFiles(PBA): class ModifyShellStartupFile(PBA): def __init__(self, linux_cmds, windows_cmds): super().__init__( - self.telemetry_messenger, + telemetry_messenger=None, name=POST_BREACH_SHELL_STARTUP_FILE_MODIFICATION, linux_cmd=linux_cmds, windows_cmd=windows_cmds,