From 602604e408ff60eef8642df54bcd11a69642ad7f Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Mon, 29 Aug 2022 13:54:32 +0530 Subject: [PATCH] Common: Create ExploitationConfiguration using pydantic --- .../agent_sub_configurations.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/monkey/common/agent_configuration/agent_sub_configurations.py b/monkey/common/agent_configuration/agent_sub_configurations.py index 65c60652a..11e4b7b78 100644 --- a/monkey/common/agent_configuration/agent_sub_configurations.py +++ b/monkey/common/agent_configuration/agent_sub_configurations.py @@ -306,6 +306,21 @@ class ExploitationConfiguration: vulnerability: Tuple[PluginConfiguration, ...] +class Pydantic___ExploitationConfiguration: + """ + A configuration for exploitation + + Attributes: + :param options: Exploitation options shared by all exploiters + :param brute_force: Configuration for brute force exploiters + :param vulnerability: Configuration for vulnerability exploiters + """ + + options: Pydantic___ExploitationOptionsConfiguration + brute_force: Tuple[Pydantic___PluginConfiguration, ...] + vulnerability: Tuple[Pydantic___PluginConfiguration, ...] + + @dataclass(frozen=True) class PropagationConfiguration: """