From fa18cb72da6e03e282326762391714579c345899 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Fri, 30 Sep 2022 09:15:50 -0400 Subject: [PATCH] Common: Use NetworkPort in ExploitationOptionsConfiguration --- monkey/common/agent_configuration/agent_sub_configurations.py | 2 +- .../common/agent_configuration/test_agent_configuration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/common/agent_configuration/agent_sub_configurations.py b/monkey/common/agent_configuration/agent_sub_configurations.py index 7d72a5f2f..858dbc29f 100644 --- a/monkey/common/agent_configuration/agent_sub_configurations.py +++ b/monkey/common/agent_configuration/agent_sub_configurations.py @@ -157,7 +157,7 @@ class ExploitationOptionsConfiguration(MutableInfectionMonkeyBaseModel): :param http_ports: HTTP ports to exploit """ - http_ports: Tuple[conint(ge=0, le=65535), ...] + http_ports: Tuple[NetworkPort, ...] class ExploitationConfiguration(MutableInfectionMonkeyBaseModel): diff --git a/monkey/tests/unit_tests/common/agent_configuration/test_agent_configuration.py b/monkey/tests/unit_tests/common/agent_configuration/test_agent_configuration.py index 82a870792..ad32ca32c 100644 --- a/monkey/tests/unit_tests/common/agent_configuration/test_agent_configuration.py +++ b/monkey/tests/unit_tests/common/agent_configuration/test_agent_configuration.py @@ -179,7 +179,7 @@ def test_network_scan_configuration(): def test_exploitation_options_configuration_schema(): - ports = [1, 2, 3] + ports = [0, 1, 2, 3] config = ExploitationOptionsConfiguration(http_ports=ports)