mirror of
https://github.com/reconurge/flowsint.git
synced 2026-03-12 09:54:46 -05:00
feat(types): new Port type
This commit is contained in:
@@ -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",
|
||||
|
||||
20
flowsint-types/src/flowsint_types/port.py
Normal file
20
flowsint-types/src/flowsint_types/port.py
Normal file
@@ -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"
|
||||
)
|
||||
Reference in New Issue
Block a user