#2888: Add identifier keyword to services.
This commit is contained in:
@@ -46,7 +46,7 @@ class WebBrowser(Application, identifier="WebBrowser"):
|
||||
class ConfigSchema(Application.ConfigSchema):
|
||||
"""ConfigSchema for WebBrowser."""
|
||||
|
||||
type: str = "WEB_BROWSER"
|
||||
type: str = "WEBBROWSER"
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
kwargs["name"] = "WebBrowser"
|
||||
|
||||
@@ -14,7 +14,7 @@ from primaite.utils.validation.ipv4_address import IPV4Address
|
||||
from primaite.utils.validation.port import PORT_LOOKUP
|
||||
|
||||
|
||||
class ARP(Service):
|
||||
class ARP(Service, identifier="ARP"):
|
||||
"""
|
||||
The ARP (Address Resolution Protocol) Service.
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ from primaite.utils.validation.port import PORT_LOOKUP
|
||||
_LOGGER = getLogger(__name__)
|
||||
|
||||
|
||||
class DatabaseService(Service):
|
||||
class DatabaseService(Service, identifier="DatabaseService"):
|
||||
"""
|
||||
A class for simulating a generic SQL Server service.
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ from primaite.utils.validation.port import PORT_LOOKUP
|
||||
_LOGGER = getLogger(__name__)
|
||||
|
||||
|
||||
class DNSServer(Service):
|
||||
class DNSServer(Service, identifier="DNSServer"):
|
||||
"""Represents a DNS Server as a Service."""
|
||||
|
||||
config: "DNSServer.ConfigSchema"
|
||||
|
||||
@@ -16,7 +16,7 @@ from primaite.utils.validation.port import Port, PORT_LOOKUP
|
||||
_LOGGER = getLogger(__name__)
|
||||
|
||||
|
||||
class FTPClient(FTPServiceABC):
|
||||
class FTPClient(FTPServiceABC, identifier="FTPClient"):
|
||||
"""
|
||||
A class for simulating an FTP client service.
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ from primaite.utils.validation.port import is_valid_port, PORT_LOOKUP
|
||||
_LOGGER = getLogger(__name__)
|
||||
|
||||
|
||||
class FTPServer(FTPServiceABC):
|
||||
class FTPServer(FTPServiceABC, identifier="FTPServer"):
|
||||
"""
|
||||
A class for simulating an FTP server service.
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ from primaite.utils.validation.port import PORT_LOOKUP
|
||||
_LOGGER = getLogger(__name__)
|
||||
|
||||
|
||||
class ICMP(Service):
|
||||
class ICMP(Service, identifier="ICMP"):
|
||||
"""
|
||||
The Internet Control Message Protocol (ICMP) service.
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ from primaite.utils.validation.port import Port, PORT_LOOKUP
|
||||
_LOGGER = getLogger(__name__)
|
||||
|
||||
|
||||
class NTPClient(Service):
|
||||
class NTPClient(Service, identifier="NTPClient"):
|
||||
"""Represents a NTP client as a service."""
|
||||
|
||||
config: "NTPClient.ConfigSchema"
|
||||
|
||||
@@ -11,7 +11,7 @@ from primaite.utils.validation.port import PORT_LOOKUP
|
||||
_LOGGER = getLogger(__name__)
|
||||
|
||||
|
||||
class NTPServer(Service):
|
||||
class NTPServer(Service, identifier="NTPServer"):
|
||||
"""Represents a NTP server as a service."""
|
||||
|
||||
config: "NTPServer.ConfigSchema"
|
||||
|
||||
@@ -129,7 +129,7 @@ class RemoteTerminalConnection(TerminalClientConnection):
|
||||
return self.parent_terminal.send(payload=payload, session_id=self.ssh_session_id)
|
||||
|
||||
|
||||
class Terminal(Service):
|
||||
class Terminal(Service, identifier="Terminal"):
|
||||
"""Class used to simulate a generic terminal service. Can be interacted with by other terminals via SSH."""
|
||||
|
||||
config: "Terminal.ConfigSchema"
|
||||
|
||||
@@ -19,7 +19,7 @@ from primaite.utils.validation.port import Port, PORT_LOOKUP
|
||||
_LOGGER = getLogger(__name__)
|
||||
|
||||
|
||||
class WebServer(Service):
|
||||
class WebServer(Service, identifier="WebServer"):
|
||||
"""Class used to represent a Web Server Service in simulation."""
|
||||
|
||||
config: "WebServer.ConfigSchema"
|
||||
|
||||
Reference in New Issue
Block a user