Make setuid/setgid and trap PBAs not crash on windows
This commit is contained in:
parent
55a46baced
commit
28e0a6ec97
|
@ -7,7 +7,6 @@ from infection_monkey.utils.environment import is_windows_os
|
||||||
|
|
||||||
class ChangeSetuidSetgid(PBA):
|
class ChangeSetuidSetgid(PBA):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
if not is_windows_os():
|
|
||||||
linux_cmds = get_commands_to_change_setuid_setgid()
|
linux_cmds = get_commands_to_change_setuid_setgid()
|
||||||
super(ChangeSetuidSetgid, self).__init__(POST_BREACH_SETUID_SETGID,
|
super(ChangeSetuidSetgid, self).__init__(POST_BREACH_SETUID_SETGID,
|
||||||
linux_cmd=' '.join(linux_cmds))
|
linux_cmd=' '.join(linux_cmds))
|
||||||
|
|
|
@ -7,7 +7,6 @@ from infection_monkey.utils.environment import is_windows_os
|
||||||
|
|
||||||
class TrapCommand(PBA):
|
class TrapCommand(PBA):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
if not is_windows_os():
|
|
||||||
linux_cmds = get_trap_commands()
|
linux_cmds = get_trap_commands()
|
||||||
super(TrapCommand, self).__init__(POST_BREACH_TRAP_COMMAND,
|
super(TrapCommand, self).__init__(POST_BREACH_TRAP_COMMAND,
|
||||||
linux_cmd=linux_cmds)
|
linux_cmd=linux_cmds)
|
||||||
|
|
Loading…
Reference in New Issue