Skip to content

Commit

Permalink
fix: improve wireshark checker
Browse files Browse the repository at this point in the history
Improve wireshark checker to avoid returning strings such as 3.4.1 for
version 3.4.10

While at it, also add a debian test package

Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
  • Loading branch information
ffontaine committed Feb 15, 2023
1 parent 93c110c commit 32fa611
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cve_bin_tool/checkers/wireshark.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ class WiresharkChecker(Checker):
r"Are you a member of the 'wireshark' group\? Try running",
]
FILENAME_PATTERNS = [r"rawshark", r"wireshark"]
VERSION_PATTERNS = [r"Wireshark ([0-9]+\.[0-9]+\.[0-9]+)"]
VERSION_PATTERNS = [r"Wireshark ([0-9]+\.[0-9]+\.[0-9]+)\."]
VENDOR_PRODUCT = [("wireshark", "wireshark")]
Binary file not shown.
9 changes: 8 additions & 1 deletion test/test_data/wireshark.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"product": "wireshark",
"version": "1.10.12",
"version_strings": ["Wireshark 1.10.12"],
"version_strings": ["Wireshark 1.10.12."],
}
]
package_test_data = [
Expand Down Expand Up @@ -37,4 +37,11 @@
"version": "2.6.2",
"other_products": [],
},
{
"url": "http://ftp.fr.debian.org/debian/pool/main/w/wireshark/",
"package_name": "libwireshark16_4.0.3-1_amd64.deb",
"product": "wireshark",
"version": "4.0.3",
"other_products": ["lua", "nghttp2"],
},
]

0 comments on commit 32fa611

Please sign in to comment.