Common: Use NetworkPort in TCPScanConfiguration

This commit is contained in:
Mike Salvatore 2022-09-30 09:14:22 -04:00
parent 5fc4d52d9f
commit 1a01b7c5dc
2 changed files with 3 additions and 2 deletions

View File

@ -3,6 +3,7 @@ from typing import Dict, Tuple
from pydantic import PositiveFloat, conint, validator
from common.base_models import MutableInfectionMonkeyBaseModel
from common.types import NetworkPort
from .validators import (
validate_ip,
@ -128,7 +129,7 @@ class TCPScanConfiguration(MutableInfectionMonkeyBaseModel):
"""
timeout: PositiveFloat
ports: Tuple[conint(ge=0, le=65535), ...]
ports: Tuple[NetworkPort, ...]
class NetworkScanConfiguration(MutableInfectionMonkeyBaseModel):

View File

@ -27,7 +27,7 @@ SCAN_TARGET_CONFIGURATION = {
TIMEOUT = 2.525
ICMP_CONFIGURATION = {"timeout": TIMEOUT}
PORTS = [8080, 443]
PORTS = [0, 8080, 443]
TCP_SCAN_CONFIGURATION = {"timeout": TIMEOUT, "ports": PORTS}
FINGERPRINTERS = [{"name": "mssql", "options": {}}]