Skip to content

Commit f51f40f

Browse files
authored
fix: improve hostapd checker (#4368)
Update hostapd pattern to avoid raising a wrong version of 1.100 with some proprietary binary which defines the following strings: 192.168.1.100 hostapd_ctrl_interface Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent 978a5bd commit f51f40f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cve_bin_tool/checkers/hostapd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ class HostapdChecker(Checker):
1919
FILENAME_PATTERNS = [r"hostapd"]
2020
VERSION_PATTERNS = [
2121
r"\nhostapd[_a-z]* v([0-9]+\.[0-9]+)",
22-
r"([0-9]+\.[0-9]+)[a-z-]*\r?\nhostapd",
22+
r"([0-9]+\.[0-9]+)[a-z-]*\r?\nhostapd[_a-z]* v",
2323
]
2424
VENDOR_PRODUCT = [("w1.fi", "hostapd")]

test/test_data/hostapd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{
77
"product": "hostapd",
88
"version": "2.10",
9-
"version_strings": ["2.10-devel\nhostapd"],
9+
"version_strings": ["2.10-devel\nhostapd v"],
1010
},
1111
]
1212
package_test_data = [

0 commit comments

Comments
 (0)