Common: Create ICMPScanConfiguration using pydantic
This commit is contained in:
parent
e7b0e6babf
commit
858b7650ac
|
@ -1,7 +1,7 @@
|
|||
from dataclasses import dataclass
|
||||
from typing import Dict, Tuple
|
||||
|
||||
from pydantic import validator
|
||||
from pydantic import PositiveFloat, validator
|
||||
|
||||
from common.base_models import MutableInfectionMonkeyBaseModel
|
||||
|
||||
|
@ -194,6 +194,17 @@ class ICMPScanConfiguration:
|
|||
timeout: float
|
||||
|
||||
|
||||
class Pydantic___ICMPScanConfiguration(MutableInfectionMonkeyBaseModel):
|
||||
"""
|
||||
A configuration for ICMP scanning
|
||||
|
||||
Attributes:
|
||||
:param timeout: Maximum time in seconds to wait for a response from the target
|
||||
"""
|
||||
|
||||
timeout: PositiveFloat
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class TCPScanConfiguration:
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue