Agent: Return PostBreachData in PBA's run() instead of sending PostBreachTelem

This commit is contained in:
Shreya Malviya 2022-03-25 14:11:04 +05:30 committed by vakarisz
parent 936b9ead05
commit 2e48d9ead9
1 changed files with 2 additions and 2 deletions

View File

@ -2,8 +2,8 @@ import logging
import subprocess
from common.utils.attack_utils import ScanStatus
from infection_monkey.i_puppet.i_puppet import PostBreachData
from infection_monkey.telemetry.attack.t1064_telem import T1064Telem
from infection_monkey.telemetry.post_breach_telem import PostBreachTelem
from infection_monkey.utils.environment import is_windows_os
logger = logging.getLogger(__name__)
@ -35,7 +35,7 @@ class PBA:
T1064Telem(
ScanStatus.USED, f"Scripts were used to execute {self.name} post breach action."
).send()
PostBreachTelem(self, result).send()
return PostBreachData(self.name, self.command, result)
else:
logger.debug(f"No command available for PBA '{self.name}' on current OS, skipping.")