diff --git a/flowsint-types/src/flowsint_types/__init__.py b/flowsint-types/src/flowsint_types/__init__.py index 1eca15d..eedb704 100644 --- a/flowsint-types/src/flowsint_types/__init__.py +++ b/flowsint-types/src/flowsint_types/__init__.py @@ -26,6 +26,7 @@ from .message import Message from .organization import Organization from .phone import Phone from .phrase import Phrase +from .port import Port from .reputation_score import ReputationScore from .risk_profile import RiskProfile from .script import Script @@ -67,6 +68,7 @@ __all__ = [ "Organization", "Phone", "Phrase", + "Port", "ReputationScore", "RiskProfile", "Script", diff --git a/flowsint-types/src/flowsint_types/port.py b/flowsint-types/src/flowsint_types/port.py new file mode 100644 index 0000000..c2ac8bb --- /dev/null +++ b/flowsint-types/src/flowsint_types/port.py @@ -0,0 +1,20 @@ +from pydantic import BaseModel, Field +from typing import Optional + + +class Port(BaseModel): + """Represents an open network port related to an IP address.""" + + number: int = Field(..., description="Port number", title="Port Number") + protocol: Optional[str] = Field( + None, description="Protocol (TCP, UDP, etc.)", title="Protocol" + ) + state: Optional[str] = Field( + None, description="Port state (open, closed, filtered, etc.)", title="State" + ) + service: Optional[str] = Field( + None, description="Service running on the port", title="Service" + ) + banner: Optional[str] = Field( + None, description="Service banner information", title="Banner" + )