forked from p15670423/monkey
Little changes based on review
This commit is contained in:
parent
6b4e90e6d0
commit
eea5352084
|
@ -10,8 +10,8 @@ from infection_monkey.utils.hidden_files import\
|
|||
from infection_monkey.utils.environment import is_windows_os
|
||||
|
||||
|
||||
CREATE_HIDDEN = [get_commands_to_hide_files,
|
||||
get_commands_to_hide_folders]
|
||||
HIDDEN_FSO_CREATION_COMMANDS = [get_commands_to_hide_files,
|
||||
get_commands_to_hide_folders]
|
||||
|
||||
|
||||
class HiddenFiles(PBA):
|
||||
|
@ -24,8 +24,8 @@ class HiddenFiles(PBA):
|
|||
|
||||
def run(self):
|
||||
# create hidden files and folders
|
||||
for method_to_create in CREATE_HIDDEN:
|
||||
linux_cmds, windows_cmds = method_to_create()
|
||||
for function_to_get_commands in HIDDEN_FSO_CREATION_COMMANDS:
|
||||
linux_cmds, windows_cmds = function_to_get_commands()
|
||||
super(HiddenFiles, self).__init__(name=POST_BREACH_HIDDEN_FILES,
|
||||
linux_cmd=' '.join(linux_cmds),
|
||||
windows_cmd=windows_cmds)
|
||||
|
|
|
@ -6,7 +6,8 @@ def get_linux_commands_to_hide_files():
|
|||
return [
|
||||
'touch', # create file
|
||||
HIDDEN_FILE,
|
||||
'; echo \"Successfully created hidden file: {}\" |'.format(HIDDEN_FILE), # output
|
||||
'&&'
|
||||
'echo \"Successfully created hidden file: {}\" |'.format(HIDDEN_FILE), # output
|
||||
'tee -a', # and write to file
|
||||
HIDDEN_FILE
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue