Common: Fix type hint for variable-length homogeneous tuples

See https://docs.python.org/3/library/typing.html#typing.Tuple
This commit is contained in:
Mike Salvatore 2022-07-26 10:42:20 -04:00
parent eaeb78a821
commit 7be4ea2893
2 changed files with 11 additions and 11 deletions

View File

@ -34,9 +34,9 @@ class InvalidConfigurationError(Exception):
class AgentConfiguration:
keep_tunnel_open_time: float
custom_pbas: CustomPBAConfiguration
post_breach_actions: Tuple[PluginConfiguration]
credential_collectors: Tuple[PluginConfiguration]
payloads: Tuple[PluginConfiguration]
post_breach_actions: Tuple[PluginConfiguration, ...]
credential_collectors: Tuple[PluginConfiguration, ...]
payloads: Tuple[PluginConfiguration, ...]
propagation: PropagationConfiguration
def __post_init__(self):

View File

@ -18,10 +18,10 @@ class PluginConfiguration:
@dataclass(frozen=True)
class ScanTargetConfiguration:
blocked_ips: Tuple[str]
inaccessible_subnets: Tuple[str]
blocked_ips: Tuple[str, ...]
inaccessible_subnets: Tuple[str, ...]
local_network_scan: bool
subnets: Tuple[str]
subnets: Tuple[str, ...]
@dataclass(frozen=True)
@ -32,27 +32,27 @@ class ICMPScanConfiguration:
@dataclass(frozen=True)
class TCPScanConfiguration:
timeout: float
ports: Tuple[int]
ports: Tuple[int, ...]
@dataclass(frozen=True)
class NetworkScanConfiguration:
tcp: TCPScanConfiguration
icmp: ICMPScanConfiguration
fingerprinters: Tuple[PluginConfiguration]
fingerprinters: Tuple[PluginConfiguration, ...]
targets: ScanTargetConfiguration
@dataclass(frozen=True)
class ExploitationOptionsConfiguration:
http_ports: Tuple[int]
http_ports: Tuple[int, ...]
@dataclass(frozen=True)
class ExploitationConfiguration:
options: ExploitationOptionsConfiguration
brute_force: Tuple[PluginConfiguration]
vulnerability: Tuple[PluginConfiguration]
brute_force: Tuple[PluginConfiguration, ...]
vulnerability: Tuple[PluginConfiguration, ...]
@dataclass(frozen=True)