Agent: Use PluginConfiguration in _run_payload()

This commit is contained in:
Mike Salvatore 2022-06-24 15:35:41 -04:00
parent 8886ebc8b8
commit 4f7d8be6ba
1 changed files with 3 additions and 6 deletions

View File

@ -1,7 +1,7 @@
import logging import logging
import threading import threading
import time import time
from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple from typing import Any, Callable, Dict, Iterable, List, Optional
from common.configuration import PluginConfiguration from common.configuration import PluginConfiguration
from common.utils import Timer from common.utils import Timer
@ -201,11 +201,8 @@ class AutomatedMaster(IMaster):
for pba_data in self._puppet.run_pba(pba.name, pba.options): for pba_data in self._puppet.run_pba(pba.name, pba.options):
self._telemetry_messenger.send_telemetry(PostBreachTelem(pba_data)) self._telemetry_messenger.send_telemetry(PostBreachTelem(pba_data))
def _run_payload(self, payload: Tuple[str, Dict]): def _run_payload(self, payload: PluginConfiguration):
name = payload.name self._puppet.run_payload(payload.name, payload.options, self._stop)
options = payload.options
self._puppet.run_payload(name, options, self._stop)
def _run_pbas( def _run_pbas(
self, self,