csle_common.dao.emulation_action_result package
Submodules
csle_common.dao.emulation_action_result.nikto_scan_result module
- class csle_common.dao.emulation_action_result.nikto_scan_result.NiktoScanResult(vulnerabilities: List[NiktoVuln], port: int, ip: str, sitename: str)[source]
Bases:
JSONSerializable
DTO representing the result of a NiktoScan
- static from_dict(d: Dict[str, Any]) NiktoScanResult [source]
Converts a dict representation to an instance
- Parameters
d – the dict to convert
- Returns
the created instance
- static from_json_file(json_file_path: str) NiktoScanResult [source]
Reads a json file and converts it to a DTO
- Parameters
json_file_path – the json file path
- Returns
the converted DTO
csle_common.dao.emulation_action_result.nikto_vuln module
- class csle_common.dao.emulation_action_result.nikto_vuln.NiktoVuln(id: str, osvdb_id: int, method: str, iplink: str, namelink: str, uri: str, description: str)[source]
Bases:
JSONSerializable
DTO representing a vulnerability found with a Nikto scan
- static from_dict(d: Dict[str, Any]) NiktoVuln [source]
Converts a dict representation to an instance
- Parameters
d – the dict to convert
- Returns
the created instance
- static from_json_file(json_file_path: str) NiktoVuln [source]
Reads a json file and converts it to a DTO
- Parameters
json_file_path – the json file path
- Returns
the converted DTO
- to_dict() Dict[str, Any] [source]
Converts the object to a dict representation
- Returns
a dict representation of the object
- to_obs() EmulationVulnerabilityObservationState [source]
Converts the object into a VulnerabilityObservationState
- Returns
the created VulnerabilityObservationState object
csle_common.dao.emulation_action_result.nmap_addr_type module
Type of nmap addresses
csle_common.dao.emulation_action_result.nmap_brute_credentials module
- class csle_common.dao.emulation_action_result.nmap_brute_credentials.NmapBruteCredentials(username: str, pw: str, state: str, port: int, protocol: TransportProtocol, service: str)[source]
Bases:
JSONSerializable
A DTO representing credentials found with NMAP Brute-Force Scans
- static from_dict(d: Dict[str, Any]) NmapBruteCredentials [source]
Converts a dict representation to an instance
- Parameters
d – the dict to convert
- Returns
the created instance
- static from_json_file(json_file_path: str) NmapBruteCredentials [source]
Reads a json file and converts it to a DTO
- Parameters
json_file_path – the json file path
- Returns
the converted DTO
- to_dict() Dict[str, Any] [source]
Converts the object to a dict representation
- Returns
a dict representation of the object
- to_obs() Credential [source]
Converts the Object into a Credential Object
- Returns
the created Credential Object
csle_common.dao.emulation_action_result.nmap_hop module
- class csle_common.dao.emulation_action_result.nmap_hop.NmapHop(ttl: int, ipaddr: str, rtt: float, host: str)[source]
Bases:
JSONSerializable
DTO representing a Nmap Hop
- static from_dict(d: Dict[str, Any]) NmapHop [source]
Converts a dict representation into an instance
- Parameters
d – the dict to convert
- Returns
the created instance
csle_common.dao.emulation_action_result.nmap_host_result module
- class csle_common.dao.emulation_action_result.nmap_host_result.NmapHostResult(status: NmapHostStatus = NmapHostStatus.DOWN, ips: Optional[List[str]] = None, mac_addr: Optional[str] = None, hostnames: Optional[List[str]] = None, ports: Optional[List[NmapPort]] = None, os: Optional[NmapOs] = None, os_matches: Optional[List[NmapOs]] = None, vulnerabilities: Optional[List[NmapVuln]] = None, credentials: Optional[List[NmapBruteCredentials]] = None, trace: Optional[NmapTrace] = None)[source]
Bases:
JSONSerializable
A DTO representing a host found with an NMAP scan
- copy() NmapHostResult [source]
- Returns
a copy of the object
- static from_dict(d: Dict[str, Any]) NmapHostResult [source]
Converts a dict representation to an instance
- Parameters
d – the dict to convert
- Returns
the created instance
- static from_json_file(json_file_path: str) NmapHostResult [source]
Reads a json file and converts it to a DTO
- Parameters
json_file_path – the json file path
- Returns
the converted DTO
csle_common.dao.emulation_action_result.nmap_host_status module
Type of nmap host statuses
csle_common.dao.emulation_action_result.nmap_http_enum module
- class csle_common.dao.emulation_action_result.nmap_http_enum.NmapHttpEnum(output: str)[source]
Bases:
JSONSerializable
DTO representing a NMAP HTTP Enum
- static from_dict(d: Dict[str, Any]) NmapHttpEnum [source]
Converts a dict representation to an instance
- Parameters
d – the dict to convert
- Returns
the created instance
- static from_json_file(json_file_path: str) NmapHttpEnum [source]
Reads a json file and converts it to a DTO
- Parameters
json_file_path – the json file path
- Returns
the converted DTO
csle_common.dao.emulation_action_result.nmap_http_grep module
- class csle_common.dao.emulation_action_result.nmap_http_grep.NmapHttpGrep(output: str)[source]
Bases:
JSONSerializable
A DTO representing the output of a Nmap HTTP Grep
- static from_dict(d: Dict[str, Any]) NmapHttpGrep [source]
Converts a dict representation to an instance
- Parameters
d – the dict to convert
- Returns
the created instance
- static from_json_file(json_file_path: str) NmapHttpGrep [source]
Reads a json file and converts it to a DTO
- Parameters
json_file_path – the json file path
- Returns
the converted DTO
csle_common.dao.emulation_action_result.nmap_os module
- class csle_common.dao.emulation_action_result.nmap_os.NmapOs(name: str, vendor: str, osfamily: str, accuracy: int)[source]
Bases:
JSONSerializable
DTO representing the operating system found with an NMAP scan
- static from_dict(d: Dict[str, Any]) NmapOs [source]
Converts a dict representation to an instance
- Parameters
d – the dict to convert
- Returns
the created instance
- static from_json_file(json_file_path: str) NmapOs [source]
Reads a json file and converts it to a DTO
- Parameters
json_file_path – the json file path
- Returns
the converted DTO
csle_common.dao.emulation_action_result.nmap_port module
- class csle_common.dao.emulation_action_result.nmap_port.NmapPort(port_id: int, protocol: TransportProtocol, status: NmapPortStatus = NmapPortStatus.DOWN, service_name: str = 'none', http_enum: Optional[NmapHttpEnum] = None, http_grep: Optional[NmapHttpGrep] = None, vulscan: Optional[NmapVulscan] = None, service_version: str = '', service_fp: str = '')[source]
Bases:
JSONSerializable
DTO Representing a Port found with a NMAP scan
- static from_dict(d: Dict[str, Any]) NmapPort [source]
Converts a dict representation to an instance
- Parameters
d – the dict to convert
- Returns
the created instance
- static from_json_file(json_file_path: str) NmapPort [source]
Reads a json file and converts it to a DTO
- Parameters
json_file_path – the json file path
- Returns
the converted DTO
- to_dict() Dict[str, Any] [source]
Converts the object to a dict representation
- Returns
a dict representation of the object
- to_obs() EmulationPortObservationState [source]
Converts the object into a PortObservationState
- Returns
the created PortObservationState
csle_common.dao.emulation_action_result.nmap_port_status module
Type of nmap port statuses
csle_common.dao.emulation_action_result.nmap_scan_result module
- class csle_common.dao.emulation_action_result.nmap_scan_result.NmapScanResult(hosts: List[NmapHostResult], ips: List[str])[source]
Bases:
JSONSerializable
DTO representing the result of a NMAP Scan
- copy() NmapScanResult [source]
- Returns
a copy of the object
- static from_dict(d: Dict[str, Any]) NmapScanResult [source]
Converts a dict representation to an instance
- Parameters
d – the dict to convert
- Returns
the created instance
- static from_json_file(json_file_path: str) NmapScanResult [source]
Reads a json file and converts it to a DTO
- Parameters
json_file_path – the json file path
- Returns
the converted DTO
csle_common.dao.emulation_action_result.nmap_trace module
- class csle_common.dao.emulation_action_result.nmap_trace.NmapTrace(hops: List[NmapHop])[source]
Bases:
JSONSerializable
DTO Representing an NMAP Trace
- static from_dict(d: Dict[str, Any]) NmapTrace [source]
Converts a dict representation into an instance
- Parameters
d – the dict to convert
- Returns
the created instance
csle_common.dao.emulation_action_result.nmap_vuln module
- class csle_common.dao.emulation_action_result.nmap_vuln.NmapVuln(name: str, port: int, protocol: TransportProtocol, cvss: float, service: str, credentials: Optional[List[Credential]] = None)[source]
Bases:
JSONSerializable
DTO representing a vulnerability found with NMAP
- static from_dict(d: Dict[str, Any]) NmapVuln [source]
Converts a dict representation to an instance
- Parameters
d – the dict to convert
- Returns
the created instance
- static from_json_file(json_file_path: str) NmapVuln [source]
Reads a json file and converts it to a DTO
- Parameters
json_file_path – the json file path
- Returns
the converted DTO
- to_dict() Dict[str, Any] [source]
Converts the object to a dict representation
- Returns
a dict representation of the object
- to_obs() EmulationVulnerabilityObservationState [source]
Converts the object into a VulnerabilityObservationState
- Returns
the created VulnerabilityObservationState
csle_common.dao.emulation_action_result.nmap_vulscan module
- class csle_common.dao.emulation_action_result.nmap_vulscan.NmapVulscan(output: str)[source]
Bases:
JSONSerializable
DTO representing the result of a NMAP Vulscan
- static from_dict(d: Dict[str, Any]) NmapVulscan [source]
Converts a dict representation to an instance
- Parameters
d – the dict to convert
- Returns
the created instance
- static from_json_file(json_file_path: str) NmapVulscan [source]
Reads a json file and converts it to a DTO
- Parameters
json_file_path – the json file path
- Returns
the converted DTO