From 1e81ee8049693fb7dbcfa89060ada207aaab352f Mon Sep 17 00:00:00 2001 From: fabian Date: Wed, 13 Nov 2024 17:02:06 +0100 Subject: [PATCH] Improve results handling --- src/gallia/commands/primitive/uds/rdbi.py | 1 + src/gallia/commands/scan/uds/services.py | 3 ++- src/gallia/commands/scan/uds/sessions.py | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gallia/commands/primitive/uds/rdbi.py b/src/gallia/commands/primitive/uds/rdbi.py index 709bc4e05..6dff56ef2 100644 --- a/src/gallia/commands/primitive/uds/rdbi.py +++ b/src/gallia/commands/primitive/uds/rdbi.py @@ -33,6 +33,7 @@ class ReadByIdentifierPrimitive(UDSScanner): def __init__(self, config: ReadByIdentifierPrimitiveConfig): super().__init__(config) self.config: ReadByIdentifierPrimitiveConfig = config + self.result: bytes | None = None async def main(self) -> None: try: diff --git a/src/gallia/commands/scan/uds/services.py b/src/gallia/commands/scan/uds/services.py index eac7da42e..8fd65ceac 100644 --- a/src/gallia/commands/scan/uds/services.py +++ b/src/gallia/commands/scan/uds/services.py @@ -49,8 +49,9 @@ def __init__(self, config: ServicesScannerConfig): super().__init__(config) self.config: ServicesScannerConfig = config - async def main(self) -> None: self.result: list[tuple[int, int]] = [] + + async def main(self) -> None: self.ecu.max_retry = 0 found: dict[int, dict[int, Any]] = {} diff --git a/src/gallia/commands/scan/uds/sessions.py b/src/gallia/commands/scan/uds/sessions.py index 23f6a510a..fea900144 100644 --- a/src/gallia/commands/scan/uds/sessions.py +++ b/src/gallia/commands/scan/uds/sessions.py @@ -50,6 +50,8 @@ def __init__(self, config: SessionsScannerConfig): super().__init__(config) self.config: SessionsScannerConfig = config + self.result: list[int] = [] + async def set_session_with_hooks_handling( self, session: int, use_hooks: bool ) -> NegativeResponse | DiagnosticSessionControlResponse: @@ -100,7 +102,6 @@ async def recover_stack(self, stack: list[int], use_hooks: bool) -> bool: return True async def main(self) -> None: - self.result: list[int] = [] found: dict[int, list[list[int]]] = {0: [[0x01]]} positive_results: list[dict[str, Any]] = [] negative_results: list[dict[str, Any]] = []