Agent: Pass telemetry_messenger to PBA constructors where it was missing

This commit is contained in:
Shreya Malviya 2022-03-30 13:52:53 +05:30
parent a2bad110a1
commit 3f01b9bcac
3 changed files with 7 additions and 1 deletions

View File

@ -46,7 +46,11 @@ class ClearCommandHistory(PBA):
class ClearCommandHistoryFile(PBA):
def __init__(self, linux_cmds):
super().__init__(name=POST_BREACH_CLEAR_CMD_HISTORY, linux_cmd=linux_cmds)
super().__init__(
self.telemetry_messenger,
name=POST_BREACH_CLEAR_CMD_HISTORY,
linux_cmd=linux_cmds,
)
def run(self):
if self.command:

View File

@ -28,6 +28,7 @@ class HiddenFiles(PBA):
for function_to_get_commands in HIDDEN_FSO_CREATION_COMMANDS:
linux_cmds, windows_cmds = function_to_get_commands()
super(HiddenFiles, self).__init__(
self.telemetry_messenger,
name=POST_BREACH_HIDDEN_FILES,
linux_cmd=" ".join(linux_cmds),
windows_cmd=windows_cmds,

View File

@ -64,6 +64,7 @@ class ModifyShellStartupFiles(PBA):
class ModifyShellStartupFile(PBA):
def __init__(self, linux_cmds, windows_cmds):
super().__init__(
self.telemetry_messenger,
name=POST_BREACH_SHELL_STARTUP_FILE_MODIFICATION,
linux_cmd=linux_cmds,
windows_cmd=windows_cmds,