Fix + make linux PBA commands cleaner
This commit is contained in:
parent
e5f92d29b5
commit
8d2aaac65f
|
@ -37,6 +37,3 @@ class ModifyShellStartupFile(PBA):
|
|||
super(ModifyShellStartupFile, self).__init__(name=POST_BREACH_SHELL_STARTUP_FILE_MODIFICATION,
|
||||
linux_cmd=linux_cmds,
|
||||
windows_cmd=windows_cmds)
|
||||
|
||||
def run(self):
|
||||
super(ModifyShellStartupFile, self).run()
|
||||
|
|
|
@ -11,11 +11,9 @@ STARTUP_FILES = [
|
|||
|
||||
def get_linux_commands_to_modify_shell_startup_files():
|
||||
return [
|
||||
'echo \"# Succesfully modified {0}\"',
|
||||
'3<{0} 3<&- |', # check for existence of file
|
||||
'tee -a', # append to file
|
||||
'{0}',
|
||||
'&&',
|
||||
'sed -i \'$d\' {0}', # remove last line of file
|
||||
'3<{0} 3<&- &&', # check for existence of file
|
||||
'echo \"# Succesfully modified {0}\" |',
|
||||
'tee -a {0} &&', # append to file
|
||||
'sed -i \'$d\' {0}', # remove last line of file (undo changes)
|
||||
],\
|
||||
STARTUP_FILES
|
||||
|
|
Loading…
Reference in New Issue