From 63c5b4d016889acda425022c26649546f38ceb11 Mon Sep 17 00:00:00 2001 From: Matthias Tafelmeier Date: Fri, 2 Jun 2023 21:15:52 +0200 Subject: [PATCH] update breeder effectuation ssh interaction Has to correctly excerpt target address data. --- breeder/linux_network_stack/effectuation.py | 8 ++++---- breeder/linux_network_stack/root_dag.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/breeder/linux_network_stack/effectuation.py b/breeder/linux_network_stack/effectuation.py index 4179b28f..60ca3fc6 100644 --- a/breeder/linux_network_stack/effectuation.py +++ b/breeder/linux_network_stack/effectuation.py @@ -3,7 +3,7 @@ {% include 'nats_coroutines.py' %} ### --- end coroutines --- ### -def create_target_interaction_dag(dag_id, config, identifier): +def create_target_interaction_dag(dag_id, config, target, identifier): dag = DAG(dag_id, default_args=DEFAULTS, @@ -72,9 +72,9 @@ def run_reconnaissance(): recon_step = run_reconnaissance() _ssh_hook = SSHHook( - remote_host=config.get('effectuation').get('target'), - username=config.get('effectuation').get('user'), - key_file=config.get('effectuation').get('key_file'), + remote_host=target.get('address'), + username=target.get('user'), + key_file=target.get('key_file'), timeout=30, keepalive_interval=10 ) diff --git a/breeder/linux_network_stack/root_dag.py b/breeder/linux_network_stack/root_dag.py index b76e1c5a..9ba44810 100644 --- a/breeder/linux_network_stack/root_dag.py +++ b/breeder/linux_network_stack/root_dag.py @@ -91,5 +91,5 @@ identifier = str(abs(hash(target.get('address'))))[0:6] for run_id in range(0, parallel_runs): dag_id = f'{dag_name}_{run_id}' - globals()[f'{dag_id}_optimization'] = create_optimization_dag(f'{dag_id}_optimization', config, identifier) - globals()[f'{dag_id}_target_interaction'] = create_target_interaction_dag(f'{dag_id}_target_interaction', config, identifier) + globals()[f'{dag_id}_optimization_{identifier}'] = create_optimization_dag(f'{dag_id}_optimization_{identifier}', config, identifier) + globals()[f'{dag_id}_target_{identifier}'] = create_target_interaction_dag(f'{dag_id}_target_interaction_{identifier}', config, target, identifier)