Skip to content

Commit

Permalink
feat(checker): add tcpreplay
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
  • Loading branch information
ffontaine committed Feb 3, 2023
1 parent e3df934 commit 2358497
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 0 deletions.
1 change: 1 addition & 0 deletions cve_bin_tool/checkers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@
"sysstat",
"systemd",
"tcpdump",
"tcpreplay",
"thrift",
"thttpd",
"thunderbird",
Expand Down
22 changes: 22 additions & 0 deletions cve_bin_tool/checkers/tcpreplay.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (C) 2023 Orange
# SPDX-License-Identifier: GPL-3.0-or-later


"""
CVE checker for tcpreplay
https://www.cvedetails.com/product/111655/Broadcom-Tcpreplay.html?vendor_id=5420
"""
from __future__ import annotations

from cve_bin_tool.checkers import Checker


class TcpreplayChecker(Checker):
CONTAINS_PATTERNS: list[str] = []
FILENAME_PATTERNS: list[str] = []
VERSION_PATTERNS = [
r"([0-9]+\.[0-9]+\.[0-9]+)[a-zA-Z %$/\.\:\(\)\r?\n]*tcp(?:prep|replay|rewrite) version"
]
VENDOR_PRODUCT = [("broadcom", "tcpreplay")]
Binary file not shown.
Binary file not shown.
Binary file not shown.
33 changes: 33 additions & 0 deletions test/test_data/tcpreplay.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright (C) 2022 Orange
# SPDX-License-Identifier: GPL-3.0-or-later

mapping_test_data = [
{
"product": "tcpreplay",
"version": "4.4.3",
"version_strings": ["4.4.3\ntcpreplay version"],
}
]
package_test_data = [
{
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/t/",
"package_name": "tcpreplay-4.4.3-2.fc38.aarch64.rpm",
"product": "tcpreplay",
"version": "4.4.3",
"other_products": [],
},
{
"url": "http://ftp.fr.debian.org/debian/pool/main/t/tcpreplay/",
"package_name": "tcpreplay_3.4.4-3_amd64.deb",
"product": "tcpreplay",
"version": "3.4.4",
"other_products": [],
},
{
"url": "https://downloads.openwrt.org/releases/packages-19.07/x86_64/packages/",
"package_name": "tcpreplay_4.3.4-1_x86_64.ipk",
"product": "tcpreplay",
"version": "4.3.4",
"other_products": [],
},
]

0 comments on commit 2358497

Please sign in to comment.