forked from p34709852/monkey
Merge pull request #733 from guardicore/feature/pba_linux_bugfixes
Removed unused imports and improved logging in PBA
This commit is contained in:
commit
53707436df
|
@ -2,7 +2,6 @@ from common.data.post_breach_consts import POST_BREACH_SETUID_SETGID
|
|||
from infection_monkey.post_breach.pba import PBA
|
||||
from infection_monkey.post_breach.setuid_setgid.setuid_setgid import \
|
||||
get_commands_to_change_setuid_setgid
|
||||
from infection_monkey.utils.environment import is_windows_os
|
||||
|
||||
|
||||
class ChangeSetuidSetgid(PBA):
|
||||
|
|
|
@ -2,7 +2,6 @@ from common.data.post_breach_consts import POST_BREACH_TRAP_COMMAND
|
|||
from infection_monkey.post_breach.pba import PBA
|
||||
from infection_monkey.post_breach.trap_command.trap_command import \
|
||||
get_trap_commands
|
||||
from infection_monkey.utils.environment import is_windows_os
|
||||
|
||||
|
||||
class TrapCommand(PBA):
|
||||
|
|
|
@ -62,8 +62,10 @@ class PBA(Plugin):
|
|||
exec_funct = self._execute_default
|
||||
result = exec_funct()
|
||||
if self.scripts_were_used_successfully(result):
|
||||
T1064Telem(ScanStatus.USED, "Scripts were used to execute %s post breach action." % self.name).send()
|
||||
T1064Telem(ScanStatus.USED, f"Scripts were used to execute {self.name} post breach action.").send()
|
||||
PostBreachTelem(self, result).send()
|
||||
else:
|
||||
LOG.debug(f"No command available for PBA '{self.name}' on current OS, skipping.")
|
||||
|
||||
def is_script(self):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue