Skip to content

Subnets

Classes

CybORG.Simulator.Scenarios.EnterpriseScenarioGenerator.SUBNET

Bases: str, Enum

A class of class attributes that link subnet enums to the corresponding string subnet name.

Source code in /home/onaish/cage-challenge/cage-challenge-4/CybORG/Simulator/Scenarios/EnterpriseScenarioGenerator.py
class SUBNET(str, Enum):
    """A class of class attributes that link subnet enums to the corresponding string subnet name. 
    """
    RESTRICTED_ZONE_A = "restricted_zone_a_subnet"
    OPERATIONAL_ZONE_A = "operational_zone_a_subnet"
    RESTRICTED_ZONE_B = "restricted_zone_b_subnet"
    OPERATIONAL_ZONE_B = "operational_zone_b_subnet"
    CONTRACTOR_NETWORK = "contractor_network_subnet"
    PUBLIC_ACCESS_ZONE = "public_access_zone_subnet"
    ADMIN_NETWORK = "admin_network_subnet"
    OFFICE_NETWORK = "office_network_subnet"
    INTERNET = "internet_subnet"

CybORG.Simulator.Subnet.Subnet

Bases: Entity

Class that holds the details about a subnet.

Attributes:

Name Type Description
name str

name of the subnet

size int

number of hosts in the subnet?

hosts List[str]

a list of the hostnames in the subnet?

nacls Dict[str, Dict[str, str]]

?

cidr IPv4Network

The network object for the subnet

ip_addresses list

?

Functions

contains_ip_address
contains_ip_address(ip_address: str) -> bool

Check if the specified ip address is in the subnet.

Parameters:

Name Type Description Default
ip_address str

host ip address in string form

required

Returns:

Type Description
bool

true if the specified ip address is in the subnet