Agent: Remove usage of CredentialsTelem from master

This commit is contained in:
Shreya Malviya 2022-09-15 12:10:17 +05:30
parent 0a73ca717c
commit b00e0ff427
1 changed files with 1 additions and 4 deletions

View File

@ -11,7 +11,6 @@ from infection_monkey.i_control_channel import IControlChannel, IslandCommunicat
from infection_monkey.i_master import IMaster from infection_monkey.i_master import IMaster
from infection_monkey.i_puppet import IPuppet from infection_monkey.i_puppet import IPuppet
from infection_monkey.model import VictimHostFactory from infection_monkey.model import VictimHostFactory
from infection_monkey.telemetry.credentials_telem import CredentialsTelem
from infection_monkey.telemetry.messengers.i_telemetry_messenger import ITelemetryMessenger from infection_monkey.telemetry.messengers.i_telemetry_messenger import ITelemetryMessenger
from infection_monkey.telemetry.post_breach_telem import PostBreachTelem from infection_monkey.telemetry.post_breach_telem import PostBreachTelem
from infection_monkey.utils.propagation import maximum_depth_reached from infection_monkey.utils.propagation import maximum_depth_reached
@ -194,9 +193,7 @@ class AutomatedMaster(IMaster):
def _collect_credentials(self, collector: PluginConfiguration): def _collect_credentials(self, collector: PluginConfiguration):
credentials = self._puppet.run_credential_collector(collector.name, collector.options) credentials = self._puppet.run_credential_collector(collector.name, collector.options)
if credentials: if not credentials:
self._telemetry_messenger.send_telemetry(CredentialsTelem(credentials))
else:
logger.debug(f"No credentials were collected by {collector}") logger.debug(f"No credentials were collected by {collector}")
def _run_pba(self, pba: PluginConfiguration): def _run_pba(self, pba: PluginConfiguration):