From 15ac77056a88638394417a684012590361a40aad Mon Sep 17 00:00:00 2001 From: Shreya Date: Fri, 5 Jun 2020 17:43:08 +0530 Subject: [PATCH] PBA changes: Linux --- monkey/infection_monkey/utils/linux/hidden_files.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/monkey/infection_monkey/utils/linux/hidden_files.py b/monkey/infection_monkey/utils/linux/hidden_files.py index 41d555c84..028edf4a1 100644 --- a/monkey/infection_monkey/utils/linux/hidden_files.py +++ b/monkey/infection_monkey/utils/linux/hidden_files.py @@ -6,7 +6,8 @@ def get_linux_commands_to_hide_files(): return [ 'touch', # create file HIDDEN_FILE, - '; echo \"Successfully created hidden file\" >', # write to + '; echo \"Successfully created hidden file: {}\" |'.format(HIDDEN_FILE), # output + 'tee -a', # and write to file HIDDEN_FILE ] @@ -17,7 +18,8 @@ def get_linux_commands_to_hide_folders(): HIDDEN_FOLDER, '; touch', # create file '{}/{}'.format(HIDDEN_FOLDER, 'some-file'), # random file in hidden folder - '; echo \"Successfully created hidden folder\" >', # write to + '; echo \"Successfully created hidden folder: {}\" |'.format(HIDDEN_FOLDER), # output + 'tee -a', # and write to file '{}/{}'.format(HIDDEN_FOLDER, 'some-file') # random file in hidden folder ]