From 93c110cf72f7cca3e078ab35c25229d4dc4492b7 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Mon, 13 Feb 2023 21:53:00 +0100 Subject: [PATCH] fix: update tor signature (#2681) Update tor signature to avoid catching the following string in tor 0.4.5.10 binary: The v0 control protocol is not supported by Tor 0.1.2.17 and later; upgrade your controller. Signed-off-by: Fabrice Fontaine --- cve_bin_tool/checkers/tor.py | 2 +- test/test_data/tor.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cve_bin_tool/checkers/tor.py b/cve_bin_tool/checkers/tor.py index 5b181a4592..5dac4bfeb7 100644 --- a/cve_bin_tool/checkers/tor.py +++ b/cve_bin_tool/checkers/tor.py @@ -18,7 +18,7 @@ class TorChecker(Checker): CONTAINS_PATTERNS: list[str] = [] FILENAME_PATTERNS: list[str] = [] - VERSION_PATTERNS = [r"Tor ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)"] + VERSION_PATTERNS = [r"on Tor ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)"] VENDOR_PRODUCT = [ ("debian", "tor"), ("tor", "tor"), diff --git a/test/test_data/tor.py b/test/test_data/tor.py index 1ada8f37c8..002de3a80f 100644 --- a/test/test_data/tor.py +++ b/test/test_data/tor.py @@ -2,7 +2,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later mapping_test_data = [ - {"product": "tor", "version": "0.4.7.10", "version_strings": ["Tor 0.4.7.10"]} + {"product": "tor", "version": "0.4.7.10", "version_strings": ["on Tor 0.4.7.10"]} ] package_test_data = [ {