scapy.contrib.automotive.gm.gmlan_scanner

class scapy.contrib.automotive.gm.gmlan_scanner.GMLAN_DCEnumerator[源代码]

基类:GMLAN_Enumerator

class scapy.contrib.automotive.gm.gmlan_scanner.GMLAN_IDOEnumerator[源代码]

基类:GMLAN_Enumerator, StateGeneratingServiceEnumerator

static enter_diagnostic_session(socket: SuperSocket | SingleConversationSocket) bool[源代码]
static enter_state_with_tp(sock: SuperSocket | SingleConversationSocket, conf: AutomotiveTestCaseExecutorConfiguration, kwargs: Dict[str, Any]) bool[源代码]
get_new_edge(socket: SuperSocket | SingleConversationSocket, config: AutomotiveTestCaseExecutorConfiguration) Tuple[EcuState, EcuState] | None[源代码]
get_transition_function(socket: SuperSocket | SingleConversationSocket, edge: Tuple[EcuState, EcuState]) Tuple[Callable[[SuperSocket | SingleConversationSocket, AutomotiveTestCaseExecutorConfiguration, Dict[str, Any]], bool], Dict[str, Any], Callable[[SuperSocket | SingleConversationSocket, AutomotiveTestCaseExecutorConfiguration], bool] | None] | None[源代码]
class scapy.contrib.automotive.gm.gmlan_scanner.GMLAN_PMEnumerator[源代码]

基类:GMLAN_Enumerator, StateGeneratingServiceEnumerator

static enter_state_with_tp(sock: SuperSocket | SingleConversationSocket, conf: AutomotiveTestCaseExecutorConfiguration, kwargs: Dict[str, Any]) bool[源代码]
execute(socket: SuperSocket | SingleConversationSocket, state: EcuState, timeout: int = 1, execution_time: int = 1200, **kwargs: Any) None[源代码]
get_new_edge(socket: SuperSocket | SingleConversationSocket, config: AutomotiveTestCaseExecutorConfiguration) Tuple[EcuState, EcuState] | None[源代码]
get_transition_function(socket: SuperSocket | SingleConversationSocket, edge: Tuple[EcuState, EcuState]) Tuple[Callable[[SuperSocket | SingleConversationSocket, AutomotiveTestCaseExecutorConfiguration, Dict[str, Any]], bool], Dict[str, Any], Callable[[SuperSocket | SingleConversationSocket, AutomotiveTestCaseExecutorConfiguration], bool] | None] | None[源代码]
class scapy.contrib.automotive.gm.gmlan_scanner.GMLAN_RDBIEnumerator[源代码]

基类:GMLAN_Enumerator

static print_information(resp: Packet) str[源代码]
class scapy.contrib.automotive.gm.gmlan_scanner.GMLAN_RDBPIEnumerator[源代码]

基类:GMLAN_Enumerator

class scapy.contrib.automotive.gm.gmlan_scanner.GMLAN_RDEnumerator[源代码]

基类:GMLAN_Enumerator, StateGeneratingServiceEnumerator

class scapy.contrib.automotive.gm.gmlan_scanner.GMLAN_RMBAEnumerator[源代码]

基类:GMLAN_Enumerator

execute(socket: SuperSocket | SingleConversationSocket, state: EcuState, **kwargs: Any) None[源代码]
参数:
  • timeout (integer or float) -- Timeout until a response will arrive after a request

  • count (integer) -- Number of request to be sent in one execution

  • execution_time (int) -- Time in seconds until the execution of this enumerator is stopped.

  • state_allow_list (EcuState or list) -- List of EcuState objects or EcuState object in which the the execution of this enumerator is allowed. If provided, other states will not be executed.

  • state_block_list (EcuState or list) -- List of EcuState objects or EcuState object in which the the execution of this enumerator is blocked.

  • retry_if_none_received (bool) -- Specifies if a request will be send again, if None was received (usually because of a timeout).

  • exit_if_no_answer_received (bool) -- Specifies to finish the execution of this enumerator once None is received.

  • exit_if_service_not_supported (bool) -- Specifies to finish the execution of this enumerator, once the negative return code 'serviceNotSupported' is received.

  • exit_scan_on_first_negative_response (bool) -- Specifies to finish the execution once a negative response is received.

  • retry_if_busy_returncode (bool) -- Specifies to retry a request, if the 'busyRepeatRequest' negative response code is received.

  • debug (bool) -- Enables debug functions during execute.

  • stop_event (Event) -- Signals immediate stop of the execution.

  • scan_range (list or tuple or range or iterable) -- Specifies the identifiers to be scanned.

  • probe_width (int) -- Memory size of a probe.

  • random_probes_len (int) -- Number of probes.

  • sequential_probes_len (int) -- Size of a memory block during sequential probing.

post_execute(socket: SuperSocket | SingleConversationSocket, state: EcuState, global_configuration: AutomotiveTestCaseExecutorConfiguration) None[源代码]
show(dump: bool = False, filtered: bool = True, verbose: bool = False) str | None[源代码]
class scapy.contrib.automotive.gm.gmlan_scanner.GMLAN_SAEnumerator[源代码]

基类:GMLAN_Enumerator, StateGenerator

static evaluate_security_access_response(res: Packet | None, seed: Packet, key: Packet | None) bool[源代码]
execute(socket: SuperSocket | SingleConversationSocket, state: EcuState, **kwargs: Any) None[源代码]
参数:
  • timeout (integer or float) -- Timeout until a response will arrive after a request

  • count (integer) -- Number of request to be sent in one execution

  • execution_time (int) -- Time in seconds until the execution of this enumerator is stopped.

  • state_allow_list (EcuState or list) -- List of EcuState objects or EcuState object in which the the execution of this enumerator is allowed. If provided, other states will not be executed.

  • state_block_list (EcuState or list) -- List of EcuState objects or EcuState object in which the the execution of this enumerator is blocked.

  • retry_if_none_received (bool) -- Specifies if a request will be send again, if None was received (usually because of a timeout).

  • exit_if_no_answer_received (bool) -- Specifies to finish the execution of this enumerator once None is received.

  • exit_if_service_not_supported (bool) -- Specifies to finish the execution of this enumerator, once the negative return code 'serviceNotSupported' is received.

  • exit_scan_on_first_negative_response (bool) -- Specifies to finish the execution once a negative response is received.

  • retry_if_busy_returncode (bool) -- Specifies to retry a request, if the 'busyRepeatRequest' negative response code is received.

  • debug (bool) -- Enables debug functions during execute.

  • stop_event (Event) -- Signals immediate stop of the execution.

  • scan_range (list or tuple or range or iterable) -- Specifies the identifiers to be scanned.

  • keyfunction (Callable[[int], int]) -- Specifies a function to generate the key from a given seed.

static get_key_pkt(seed: Packet, keyfunction: Callable[[int], int], level: int = 1) Packet | None[源代码]
get_new_edge(socket: SuperSocket | SingleConversationSocket, config: AutomotiveTestCaseExecutorConfiguration) Tuple[EcuState, EcuState] | None[源代码]
static get_security_access(sock: SuperSocket | SingleConversationSocket, level: int = 1, seed_pkt: Packet | None = None, keyfunction: Callable[[int], int] | None = None) bool[源代码]
static get_seed_pkt(sock: SuperSocket | SingleConversationSocket, level: int = 1) Packet | None[源代码]
get_transition_function(socket: SuperSocket | SingleConversationSocket, edge: Tuple[EcuState, EcuState]) Tuple[Callable[[SuperSocket | SingleConversationSocket, AutomotiveTestCaseExecutorConfiguration, Dict[str, Any]], bool], Dict[str, Any], Callable[[SuperSocket | SingleConversationSocket, AutomotiveTestCaseExecutorConfiguration], bool] | None] | None[源代码]
pre_execute(socket: SuperSocket | SingleConversationSocket, state: EcuState, global_configuration: AutomotiveTestCaseExecutorConfiguration) None[源代码]
static transition_function(sock: SuperSocket | SingleConversationSocket, _: AutomotiveTestCaseExecutorConfiguration, kwargs: Dict[str, Any]) bool[源代码]
class scapy.contrib.automotive.gm.gmlan_scanner.GMLAN_Scanner(socket: SuperSocket | SingleConversationSocket, reset_handler: Callable[[], None] | None = None, reconnect_handler: Callable[[], SuperSocket | SingleConversationSocket] | None = None, test_cases: List[AutomotiveTestCaseABC | Type[AutomotiveTestCaseABC]] | None = None, **kwargs: Dict[str, Any] | None)[源代码]

基类:AutomotiveTestCaseExecutor

property default_test_case_clss: List[Type[AutomotiveTestCaseABC]]
class scapy.contrib.automotive.gm.gmlan_scanner.GMLAN_ServiceEnumerator[源代码]

基类:GMLAN_Enumerator, StateGeneratingServiceEnumerator

This enumerator scans for all services identifiers of GMLAN. During this scan, corrupted packets might be sent to an ECU and mainly negative responses will be received.

class scapy.contrib.automotive.gm.gmlan_scanner.GMLAN_TDEnumerator[源代码]

基类:GMLAN_Enumerator

class scapy.contrib.automotive.gm.gmlan_scanner.GMLAN_TPEnumerator[源代码]

基类:GMLAN_Enumerator, StateGeneratingServiceEnumerator

Performs a check if TesterPresent is available. If a positive response is received, a new system state is generated and returned.

static cleanup(_: SuperSocket | SingleConversationSocket, configuration: AutomotiveTestCaseExecutorConfiguration) bool[源代码]
static enter(socket: SuperSocket | SingleConversationSocket, configuration: AutomotiveTestCaseExecutorConfiguration, kwargs: Dict[str, Any]) bool[源代码]
get_transition_function(socket: SuperSocket | SingleConversationSocket, edge: Tuple[EcuState, EcuState]) Tuple[Callable[[SuperSocket | SingleConversationSocket, AutomotiveTestCaseExecutorConfiguration, Dict[str, Any]], bool], Dict[str, Any], Callable[[SuperSocket | SingleConversationSocket, AutomotiveTestCaseExecutorConfiguration], bool] | None] | None[源代码]
class scapy.contrib.automotive.gm.gmlan_scanner.GMLAN_WDBIEnumerator[源代码]

基类:GMLAN_Enumerator

execute(socket: SuperSocket | SingleConversationSocket, state: EcuState, **kwargs: Any) None[源代码]
参数:
  • timeout (integer or float) -- Timeout until a response will arrive after a request

  • count (integer) -- Number of request to be sent in one execution

  • execution_time (int) -- Time in seconds until the execution of this enumerator is stopped.

  • state_allow_list (EcuState or list) -- List of EcuState objects or EcuState object in which the the execution of this enumerator is allowed. If provided, other states will not be executed.

  • state_block_list (EcuState or list) -- List of EcuState objects or EcuState object in which the the execution of this enumerator is blocked.

  • retry_if_none_received (bool) -- Specifies if a request will be send again, if None was received (usually because of a timeout).

  • exit_if_no_answer_received (bool) -- Specifies to finish the execution of this enumerator once None is received.

  • exit_if_service_not_supported (bool) -- Specifies to finish the execution of this enumerator, once the negative return code 'serviceNotSupported' is received.

  • exit_scan_on_first_negative_response (bool) -- Specifies to finish the execution once a negative response is received.

  • retry_if_busy_returncode (bool) -- Specifies to retry a request, if the 'busyRepeatRequest' negative response code is received.

  • debug (bool) -- Enables debug functions during execute.

  • stop_event (Event) -- Signals immediate stop of the execution.

  • scan_range (list or tuple or range or iterable) -- Specifies the identifiers to be scanned.

  • rdbi_enumerator (GMLAN_RDBIEnumerator) -- Specifies an instance of a GMLAN_RDBIEnumerator which is used to extract possible data identifiers.

class scapy.contrib.automotive.gm.gmlan_scanner.GMLAN_WDBISelectiveEnumerator[源代码]

基类:StagedAutomotiveTestCase