diff --git a/monkey/common/types.py b/monkey/common/types.py index 049c7b7de..00b77ca10 100644 --- a/monkey/common/types.py +++ b/monkey/common/types.py @@ -28,7 +28,7 @@ JSONSerializable = Union[ # type: ignore[misc] ] -class NetworkServiceNameEnum(Enum): +class NetworkService(Enum): UNKNOWN = auto() diff --git a/monkey/monkey_island/cc/models/machine.py b/monkey/monkey_island/cc/models/machine.py index 9175b49a2..96fc35e80 100644 --- a/monkey/monkey_island/cc/models/machine.py +++ b/monkey/monkey_island/cc/models/machine.py @@ -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)( diff --git a/vulture_allowlist.py b/vulture_allowlist.py index 62deedcd9..0dbb29f50 100644 --- a/vulture_allowlist.py +++ b/vulture_allowlist.py @@ -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