From 349b183e5d62e7f956714e8b521702dbd95d3df5 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Thu, 29 Sep 2022 13:39:59 -0400 Subject: [PATCH] Common: Represent multiple ports in TCPScanEvent --- monkey/common/agent_events/tcp_scan_event.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/monkey/common/agent_events/tcp_scan_event.py b/monkey/common/agent_events/tcp_scan_event.py index 1f629214e..f7950916a 100644 --- a/monkey/common/agent_events/tcp_scan_event.py +++ b/monkey/common/agent_events/tcp_scan_event.py @@ -1,4 +1,5 @@ from ipaddress import IPv4Address +from typing import Dict from common.types import NetworkPort, PortStatus @@ -10,10 +11,8 @@ class TCPScanEvent(AbstractAgentEvent): An event that occurs when the Agent performs a TCP scan on a host Attributes: - :param port: Port on which the scan was performed - :param port_status: Status of the port (closed/open) + :param ports: The scanned ports and their status (open/closed) """ target: IPv4Address - port: NetworkPort - port_status: PortStatus + ports: Dict[NetworkPort, PortStatus]