forked from p15670423/monkey
Common: Rename all new pydantic configurations appropriately
This commit is contained in:
parent
41e7cfb768
commit
0d6e3809d7
|
@ -7,9 +7,9 @@ from pydantic import PositiveFloat
|
||||||
from common.base_models import MutableInfectionMonkeyBaseModel
|
from common.base_models import MutableInfectionMonkeyBaseModel
|
||||||
|
|
||||||
from .agent_sub_configurations import (
|
from .agent_sub_configurations import (
|
||||||
Pydantic___CustomPBAConfiguration,
|
CustomPBAConfiguration,
|
||||||
Pydantic___PluginConfiguration,
|
PluginConfiguration,
|
||||||
Pydantic___PropagationConfiguration,
|
PropagationConfiguration,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,10 +24,10 @@ class InvalidConfigurationError(Exception):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class Pydantic___AgentConfiguration(MutableInfectionMonkeyBaseModel):
|
class AgentConfiguration(MutableInfectionMonkeyBaseModel):
|
||||||
keep_tunnel_open_time: PositiveFloat
|
keep_tunnel_open_time: PositiveFloat
|
||||||
custom_pbas: Pydantic___CustomPBAConfiguration
|
custom_pbas: CustomPBAConfiguration
|
||||||
post_breach_actions: Tuple[Pydantic___PluginConfiguration, ...]
|
post_breach_actions: Tuple[PluginConfiguration, ...]
|
||||||
credential_collectors: Tuple[Pydantic___PluginConfiguration, ...]
|
credential_collectors: Tuple[PluginConfiguration, ...]
|
||||||
payloads: Tuple[Pydantic___PluginConfiguration, ...]
|
payloads: Tuple[PluginConfiguration, ...]
|
||||||
propagation: Pydantic___PropagationConfiguration
|
propagation: PropagationConfiguration
|
||||||
|
|
|
@ -12,7 +12,7 @@ from .validators import (
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class Pydantic___CustomPBAConfiguration(MutableInfectionMonkeyBaseModel):
|
class CustomPBAConfiguration(MutableInfectionMonkeyBaseModel):
|
||||||
"""
|
"""
|
||||||
A configuration for custom post-breach actions
|
A configuration for custom post-breach actions
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ class Pydantic___CustomPBAConfiguration(MutableInfectionMonkeyBaseModel):
|
||||||
return filename
|
return filename
|
||||||
|
|
||||||
|
|
||||||
class Pydantic___PluginConfiguration(MutableInfectionMonkeyBaseModel):
|
class PluginConfiguration(MutableInfectionMonkeyBaseModel):
|
||||||
"""
|
"""
|
||||||
A configuration for plugins
|
A configuration for plugins
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ class Pydantic___PluginConfiguration(MutableInfectionMonkeyBaseModel):
|
||||||
options: Dict
|
options: Dict
|
||||||
|
|
||||||
|
|
||||||
class Pydantic___ScanTargetConfiguration(MutableInfectionMonkeyBaseModel):
|
class ScanTargetConfiguration(MutableInfectionMonkeyBaseModel):
|
||||||
"""
|
"""
|
||||||
Configuration of network targets to scan and exploit
|
Configuration of network targets to scan and exploit
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ class Pydantic___ScanTargetConfiguration(MutableInfectionMonkeyBaseModel):
|
||||||
return subnet_range
|
return subnet_range
|
||||||
|
|
||||||
|
|
||||||
class Pydantic___ICMPScanConfiguration(MutableInfectionMonkeyBaseModel):
|
class ICMPScanConfiguration(MutableInfectionMonkeyBaseModel):
|
||||||
"""
|
"""
|
||||||
A configuration for ICMP scanning
|
A configuration for ICMP scanning
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ class Pydantic___ICMPScanConfiguration(MutableInfectionMonkeyBaseModel):
|
||||||
timeout: PositiveFloat
|
timeout: PositiveFloat
|
||||||
|
|
||||||
|
|
||||||
class Pydantic___TCPScanConfiguration(MutableInfectionMonkeyBaseModel):
|
class TCPScanConfiguration(MutableInfectionMonkeyBaseModel):
|
||||||
"""
|
"""
|
||||||
A configuration for TCP scanning
|
A configuration for TCP scanning
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ class Pydantic___TCPScanConfiguration(MutableInfectionMonkeyBaseModel):
|
||||||
ports: Tuple[conint(ge=0, le=65535), ...]
|
ports: Tuple[conint(ge=0, le=65535), ...]
|
||||||
|
|
||||||
|
|
||||||
class Pydantic___NetworkScanConfiguration(MutableInfectionMonkeyBaseModel):
|
class NetworkScanConfiguration(MutableInfectionMonkeyBaseModel):
|
||||||
"""
|
"""
|
||||||
A configuration for network scanning
|
A configuration for network scanning
|
||||||
|
|
||||||
|
@ -141,13 +141,13 @@ class Pydantic___NetworkScanConfiguration(MutableInfectionMonkeyBaseModel):
|
||||||
:param targets: Configuration for targets to scan
|
:param targets: Configuration for targets to scan
|
||||||
"""
|
"""
|
||||||
|
|
||||||
tcp: Pydantic___TCPScanConfiguration
|
tcp: TCPScanConfiguration
|
||||||
icmp: Pydantic___ICMPScanConfiguration
|
icmp: ICMPScanConfiguration
|
||||||
fingerprinters: Tuple[Pydantic___PluginConfiguration, ...]
|
fingerprinters: Tuple[PluginConfiguration, ...]
|
||||||
targets: Pydantic___ScanTargetConfiguration
|
targets: ScanTargetConfiguration
|
||||||
|
|
||||||
|
|
||||||
class Pydantic___ExploitationOptionsConfiguration(MutableInfectionMonkeyBaseModel):
|
class ExploitationOptionsConfiguration(MutableInfectionMonkeyBaseModel):
|
||||||
"""
|
"""
|
||||||
A configuration for exploitation options
|
A configuration for exploitation options
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ class Pydantic___ExploitationOptionsConfiguration(MutableInfectionMonkeyBaseMode
|
||||||
http_ports: Tuple[conint(ge=0, le=65535), ...]
|
http_ports: Tuple[conint(ge=0, le=65535), ...]
|
||||||
|
|
||||||
|
|
||||||
class Pydantic___ExploitationConfiguration(MutableInfectionMonkeyBaseModel):
|
class ExploitationConfiguration(MutableInfectionMonkeyBaseModel):
|
||||||
"""
|
"""
|
||||||
A configuration for exploitation
|
A configuration for exploitation
|
||||||
|
|
||||||
|
@ -168,12 +168,12 @@ class Pydantic___ExploitationConfiguration(MutableInfectionMonkeyBaseModel):
|
||||||
:param vulnerability: Configuration for vulnerability exploiters
|
:param vulnerability: Configuration for vulnerability exploiters
|
||||||
"""
|
"""
|
||||||
|
|
||||||
options: Pydantic___ExploitationOptionsConfiguration
|
options: ExploitationOptionsConfiguration
|
||||||
brute_force: Tuple[Pydantic___PluginConfiguration, ...]
|
brute_force: Tuple[PluginConfiguration, ...]
|
||||||
vulnerability: Tuple[Pydantic___PluginConfiguration, ...]
|
vulnerability: Tuple[PluginConfiguration, ...]
|
||||||
|
|
||||||
|
|
||||||
class Pydantic___PropagationConfiguration(MutableInfectionMonkeyBaseModel):
|
class PropagationConfiguration(MutableInfectionMonkeyBaseModel):
|
||||||
"""
|
"""
|
||||||
A configuration for propagation
|
A configuration for propagation
|
||||||
|
|
||||||
|
@ -186,5 +186,5 @@ class Pydantic___PropagationConfiguration(MutableInfectionMonkeyBaseModel):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
maximum_depth: PositiveInt
|
maximum_depth: PositiveInt
|
||||||
network_scan: Pydantic___NetworkScanConfiguration
|
network_scan: NetworkScanConfiguration
|
||||||
exploitation: Pydantic___ExploitationConfiguration
|
exploitation: ExploitationConfiguration
|
||||||
|
|
Loading…
Reference in New Issue