From b74f90fe9b406bceaa89251f80bee41a54c2fdd6 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Mon, 29 Aug 2022 13:53:01 +0530 Subject: [PATCH] Common: Create ExploitationOptionsConfiguration using pydantic --- .../agent_configuration/agent_sub_configurations.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/monkey/common/agent_configuration/agent_sub_configurations.py b/monkey/common/agent_configuration/agent_sub_configurations.py index 92abb07c5..65c60652a 100644 --- a/monkey/common/agent_configuration/agent_sub_configurations.py +++ b/monkey/common/agent_configuration/agent_sub_configurations.py @@ -279,6 +279,17 @@ class ExploitationOptionsConfiguration: http_ports: Tuple[int, ...] +class Pydantic___ExploitationOptionsConfiguration: + """ + A configuration for exploitation options + + Attributes: + :param http_ports: HTTP ports to exploit + """ + + http_ports: Tuple[conint(ge=0, le=65535), ...] + + @dataclass(frozen=True) class ExploitationConfiguration: """