Common: Create ICMPScanConfiguration using pydantic

This commit is contained in:
Shreya Malviya 2022-08-29 13:45:25 +05:30
parent e7b0e6babf
commit 858b7650ac
1 changed files with 12 additions and 1 deletions

View File

@ -1,7 +1,7 @@
from dataclasses import dataclass from dataclasses import dataclass
from typing import Dict, Tuple from typing import Dict, Tuple
from pydantic import validator from pydantic import PositiveFloat, validator
from common.base_models import MutableInfectionMonkeyBaseModel from common.base_models import MutableInfectionMonkeyBaseModel
@ -194,6 +194,17 @@ class ICMPScanConfiguration:
timeout: float 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) @dataclass(frozen=True)
class TCPScanConfiguration: class TCPScanConfiguration:
""" """