forked from p15670423/monkey
Island: Refactor logic to start threads in AWSService
This commit is contained in:
parent
680dbca574
commit
825c7b9ecf
|
@ -84,15 +84,13 @@ class AWSService:
|
||||||
results_queue = Queue()
|
results_queue = Queue()
|
||||||
command_threads = []
|
command_threads = []
|
||||||
for i in instances:
|
for i in instances:
|
||||||
command_threads.append(
|
t = Thread(
|
||||||
Thread(
|
target=self._run_agent_on_managed_instance,
|
||||||
target=self._run_agent_on_managed_instance,
|
args=(results_queue, i["instance_id"], i["os"], island_ip),
|
||||||
args=(results_queue, i["instance_id"], i["os"], island_ip),
|
daemon=True,
|
||||||
daemon=True,
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
t.start()
|
||||||
[thread.start() for thread in command_threads]
|
command_threads.append(t)
|
||||||
|
|
||||||
for thread in command_threads:
|
for thread in command_threads:
|
||||||
thread.join()
|
thread.join()
|
||||||
|
|
Loading…
Reference in New Issue