From b32fcef88e9cfacba48c82d59302209c2ee5f925 Mon Sep 17 00:00:00 2001 From: Nils Weiss Date: Wed, 21 Dec 2022 13:35:52 +0100 Subject: [PATCH] evaluate stop event in path traversal --- scapy/contrib/automotive/scanner/executor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scapy/contrib/automotive/scanner/executor.py b/scapy/contrib/automotive/scanner/executor.py index 89319f0cdcf..8e690198048 100644 --- a/scapy/contrib/automotive/scanner/executor.py +++ b/scapy/contrib/automotive/scanner/executor.py @@ -340,6 +340,10 @@ def enter_state_path(self, path): return True for next_state in path[1:]: + if self._stop_scan_event.is_set(): + self.cleanup_state() + return False + edge = (self.target_state, next_state) if not self.enter_state(*edge): self.state_graph.downrate_edge(edge)