Skip to content

Commit 6bec7bd

Browse files
committed
Added the Bluez checker
modified: checkers/__init__.py new file: checkers/bluez.py
1 parent 43cc422 commit 6bec7bd

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@
1616
"sqlite",
1717
"kerberos",
1818
"icu",
19+
"bluez",
1920
]

cve_bin_tool/checkers/bluez.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env python3
2+
"""
3+
CVE checker for Bluez
4+
References:
5+
https://www.cvedetails.com/vulnerability-list/vendor_id-8316/product_id-35116/Bluez-Bluez.html
6+
7+
"""
8+
from ..util import regex_find
9+
10+
# def get_version(lines, filename):
11+
def get_version(lines, filename):
12+
"""Bluetoothctl will work for Version 5.0+"""
13+
regex = [r"bluetoothctl: ([5]+\.[0-9]+\.[0-9]+)"]
14+
version_info = dict()
15+
if filename[::-1].startswith(("bluetoothctl")[::-1]):
16+
version_info["is_or_contains"] = "is"
17+
18+
if "is_or_contains" in version_info:
19+
version_info["modulename"] = "bluetoothctl"
20+
version_info["version"] = regex_find(lines, *regex)
21+
elif "libbluetooth.so" in filename:
22+
version_info["is_or_contains"] = "is"
23+
24+
return version_info

0 commit comments

Comments
 (0)