Common: Rename NetworkServiceNameEnum -> NetworkService

"Name" and "Enum" are redundant in this case
This commit is contained in:
Mike Salvatore 2022-10-04 12:10:47 -04:00 committed by vakarisz
parent 8bf1d1f46f
commit f6ed8a997c
3 changed files with 4 additions and 4 deletions

View File

@ -28,7 +28,7 @@ JSONSerializable = Union[ # type: ignore[misc]
]
class NetworkServiceNameEnum(Enum):
class NetworkService(Enum):
UNKNOWN = auto()

View File

@ -6,7 +6,7 @@ from pydantic import Field, validator
from common import OperatingSystem
from common.base_models import MutableInfectionMonkeyBaseModel
from common.transforms import make_immutable_sequence
from common.types import HardwareID, NetworkServiceNameEnum, SocketAddress
from common.types import HardwareID, NetworkService, SocketAddress
from . import MachineID
@ -35,7 +35,7 @@ class Machine(MutableInfectionMonkeyBaseModel):
hostname: str = ""
"""The hostname of the machine"""
network_services: Mapping[SocketAddress, NetworkServiceNameEnum]
network_services: Mapping[SocketAddress, NetworkService]
"""All network services found running on the machine"""
_make_immutable_sequence = validator("network_interfaces", pre=True, allow_reuse=True)(

View File

@ -13,7 +13,7 @@ from infection_monkey.exploit.HostExploiter.HostExploiter import (
_publish_exploitation_event,
_publish_propagation_event,
)
from common.types import NetworkPort, NetworkServiceNameEnum
from common.types import NetworkPort, NetworkService
from infection_monkey.exploit.log4shell_utils.ldap_server import LDAPServerFactory
from monkey_island.cc.models import Machine, Node, Report
from monkey_island.cc.models.networkmap import Arc, NetworkMap