From 0a395caff931f623f39c0b70e7ed06fb80475a5d Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Wed, 27 Jul 2022 16:59:58 +0200 Subject: [PATCH] BB: Add add_fingerprinter function to configuration utils --- envs/monkey_zoo/blackbox/test_configurations/utils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/envs/monkey_zoo/blackbox/test_configurations/utils.py b/envs/monkey_zoo/blackbox/test_configurations/utils.py index 5e9ec1484..47880d346 100644 --- a/envs/monkey_zoo/blackbox/test_configurations/utils.py +++ b/envs/monkey_zoo/blackbox/test_configurations/utils.py @@ -28,6 +28,16 @@ def add_exploiters( return replace_exploitation_configuration(agent_configuration, exploitation_configuration) +def add_fingerprinters( + agent_configuration: AgentConfiguration, fingerprinters: Sequence[PluginConfiguration] = [] +) -> AgentConfiguration: + network_scan_configuration = replace( + agent_configuration.propagation.network_scan, fingerprinters=fingerprinters + ) + + return replace_network_scan_configuration(agent_configuration, network_scan_configuration) + + def add_tcp_ports( agent_configuration: AgentConfiguration, tcp_ports: Sequence[int] ) -> AgentConfiguration: