From e37ee78184b40eabe7cbb6d0a0f9d7b8f56dbcff Mon Sep 17 00:00:00 2001 From: Nils Weiss Date: Mon, 1 May 2023 14:18:19 +0200 Subject: [PATCH] fix isotpscan bug from baarse --- scapy/contrib/isotp/isotp_scanner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scapy/contrib/isotp/isotp_scanner.py b/scapy/contrib/isotp/isotp_scanner.py index b5b38e3670f..bfd4760fa08 100644 --- a/scapy/contrib/isotp/isotp_scanner.py +++ b/scapy/contrib/isotp/isotp_scanner.py @@ -246,6 +246,7 @@ def scan_extended(sock, # type: SuperSocket """ return_values = dict() # type: Dict[int, Tuple[Packet, int]] scan_block_size = scan_block_size or 1 + r = list(extended_scan_range) for value in scan_range: if noise_ids and value in noise_ids: @@ -254,7 +255,6 @@ def scan_extended(sock, # type: SuperSocket pkt = get_isotp_packet( value, extended=True, extended_can_id=extended_can_id) id_list = [] # type: List[int] - r = list(extended_scan_range) for ext_isotp_id in range(r[0], r[-1], scan_block_size): if stop_event is not None and stop_event.is_set(): break