from dataclasses import dataclass
from typing import Optional, Literal

@dataclass
class HpingTestConfig:
    target: str
    test_type: Literal['tcp', 'udp', 'icmp'] = 'tcp'
    interface: Optional[str] = None
    spoof_ip: Optional[str] = None
    source_port: int = 502
    dest_port: Optional[int] = None
    dest_port_range: bool = False
    packet_size: int = 64
    interval: str = 'u1000'
    flags: Optional[str] = None  # Комбинированные флаги: "SA", "PA", "FA" и т.д.
    raw_data: Optional[str] = None
    count: Optional[int] = None
    verbose: bool = False
    flood: bool = False