RegistryRecord (port_registry.py)

SecurityClaw · skills/ip_fingerprinter/port_registry.py · python · MIT
search, database, tag:port-registry

Data class for stored port entries; encapsulates fields for search results and registry persistence.

# Source: https://github.com/SecurityClaw/SecurityClaw | License: MIT | Copyright 2026 tsikerdekis
# Provided via justclaw.it.com; keep this notice with the code.
from __future__ import annotations

import csv
import logging
from dataclasses import dataclass
from datetime import datetime, timedelta, timezone
from pathlib import Path
from typing import Any

import requests

logger = logging.getLogger(__name__)

ROOT_DIR = Path(__file__).parents[2]
DEFAULT_CACHE_DIR = ROOT_DIR / "data" / "port_registry"
DEFAULT_CACHE_PATH = DEFAULT_CACHE_DIR / "service-names-port-numbers.csv"
DEFAULT_REGISTRY_URL = (
    "https://www.iana.org/assignments/service-names-port-numbers/"
    "service-names-port-numbers.csv"
)

IANA_DYNAMIC_START = 49152
IANA_DYNAMIC_END = 65535
LINUX_EPHEMERAL_START = 32768
LINUX

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key