From 2ff2e5f597ece09d5f75a9fe9b4467bf44ac182b Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Fri, 24 Jun 2022 08:33:21 +0200 Subject: [PATCH] Agent: Fix running of payloads --- monkey/infection_monkey/master/automated_master.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/monkey/infection_monkey/master/automated_master.py b/monkey/infection_monkey/master/automated_master.py index eeb0b48d7..17012620f 100644 --- a/monkey/infection_monkey/master/automated_master.py +++ b/monkey/infection_monkey/master/automated_master.py @@ -182,7 +182,7 @@ class AutomatedMaster(IMaster): payload_thread = create_daemon_thread( target=self._run_plugins, name="PayloadThread", - args=(config.payloads.items(), "payload", self._run_payload), + args=(config.payloads, "payload", self._run_payload), ) payload_thread.start() payload_thread.join() @@ -205,8 +205,8 @@ class AutomatedMaster(IMaster): self._telemetry_messenger.send_telemetry(PostBreachTelem(pba_data)) def _run_payload(self, payload: Tuple[str, Dict]): - name = payload[0] - options = payload[1] + name = payload.name + options = payload.options self._puppet.run_payload(name, options, self._stop)