From c58782d073d0f5a30af5358eb07555573a214857 Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Wed, 24 Jul 2024 17:04:59 -0700 Subject: [PATCH 01/42] created new files for native lib detection --- surfactant/infoextractors/native_lib_file.py | 37 + .../infoextractors/native_lib_patterns.cfg | 774 ++++++++++++++++++ 2 files changed, 811 insertions(+) create mode 100644 surfactant/infoextractors/native_lib_file.py create mode 100644 surfactant/infoextractors/native_lib_patterns.cfg diff --git a/surfactant/infoextractors/native_lib_file.py b/surfactant/infoextractors/native_lib_file.py new file mode 100644 index 00000000..fc11a996 --- /dev/null +++ b/surfactant/infoextractors/native_lib_file.py @@ -0,0 +1,37 @@ +import json +import pathlib +import re +from typing import Any, Dict, List + +from loguru import logger + +import surfactant.plugin +from surfactant.sbomtypes import SBOM, Software + +#START WITH CHECKING IF THEY'RE PE, ELF, OR MACH-O FILES +def supports_file(filetype) -> bool: + if filetype == "PE": + return filetype == "PE" + + if filetype == "ELF": + return filetype == "ELF" + + if filetype == "MACH-O": + return filetype == "MACH-O" + +@surfactant.plugin.hookimpl +def extract_file_info(sbom: SBOM, software: Software, filename: str, filetype: str) -> object: + if not supports_file(filetype): + return None + return extract_native_lib_info(filename) + +def extract_native_lib_info(filename): + native_lib_info: Dict[str, Any] = {"nativeLibraries": []} + native_lib_file = pathlib.Path(__file__).parent / "native_lib_patterns.cfg" + + try: + with open(native_lib_file, "r") as regex: + database = json.load(regex) + except FileNotFoundError: + logger.warning(f"File not found: {native_lib_file}") + return None \ No newline at end of file diff --git a/surfactant/infoextractors/native_lib_patterns.cfg b/surfactant/infoextractors/native_lib_patterns.cfg new file mode 100644 index 00000000..b819c373 --- /dev/null +++ b/surfactant/infoextractors/native_lib_patterns.cfg @@ -0,0 +1,774 @@ +7-zip;;unknown;"7-Zip\ [0-9]\.[0-9]+\ \ Copyright\ \(c\)\ .*\ Igor\ Pavlov\ \ ";"sed -r 's/7-Zip\ ([0-9](\.[0-9]+)+?)\ .*/7-zip:\1/'"; +7-zip;;unknown;"^p7zip\ Version\ [0-9]+(\.[0-9]+)+?\ ";"sed -r 's/p7zip\ Version\ ([0-9]+(\.[0-9]+)+?).*/p7zip:\1/'"; +accessdb;;unknown;"accessdb\ [0-9]\.[0-9]+\.[0-9]+\.[0-9]+$";"sed -r 's/accessdb\ ([0-9](\.[0-9]+)+?)$/accessdb:\1/'"; +acpi;;unknown;"acpi\ [0-9](\.[0-9]+)+?$";"sed -r 's/acpi\ ([0-9](\.[0-9]+)+?)$/acpi:\1/'"; +acpid;;unknown;"acpid-[0-9](\.[0-9]+)+?$";"sed -r 's/acpid-([0-9](\.[0-9]+)+?)$/acpid:\1/'"; +afpd;;unknown;"^afpd\ [0-9](\.[0-9]+)+?\ -\ Apple\ Filing\ Protocol\ \(AFP\)\ daemon\ of\ Netatalk$";"sed -r 's/afpd\ ([0-9](\.[0-9]+)+?)\ .*\ Netatalk$/netatalk:afpd:\1/'"; +afpd;live;unknown;"^Netatalk\ [0-9](\.[0-9]+)+?\ \(name:\ .*\)$";"sed -r 's/Netatalk\ ([0-9](\.[0-9]+)+?)\ .*/netatalk:afpd:\1/'"; +agesa;;unknown;"AGESA\ Ontar2PIV[0-9](\.[0-9]+)+?$";"sed -r 's/AGESA\ Ontar2PIV([0-9](\.[0-9]+)+?)/agesa:\1/'"; +aircrack-ng;;GPL-2.0-only;"^\ \ Air[a-z]*-ng\ [0-9](\.[0-9]+)+?\ -\ \(C\)\ ";"sed -r 's/\ \ Air[a-z]*-ng\ ([0-9](\.[0-9]+)+?)\ .*/aircrack-ng:\1/'"; +aircrack-ng;;GPL-2.0-only;"^\ \ ivsTools\ [0-9](\.[0-9]+)+?\ -\ \(C\)\ ";"sed -r 's/\ \ ivsTools\ ([0-9](\.[0-9]+)+?)\ .*/aircrack-ng:\1/'"; +aircrack-ng;;GPL-2.0-only;"^\ \ makeivs-ng\ [0-9](\.[0-9]+)+?\ -\ \(C\)\ ";"sed -r 's/\ \ makeivs-ng\ ([0-9](\.[0-9]+)+?)\ .*/aircrack-ng:\1/'"; +aircrack-ng;;GPL-2.0-only;"^\ \ Packetforge-ng\ [0-9](\.[0-9]+)+?\ -\ \(C\)\ ";"sed -r 's/\ \ Packetforge-ng\ ([0-9](\.[0-9]+)+?)\ .*/aircrack-ng:\1/'"; +alsa;;unknown;"alsactl\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/alsactl\ version\ ([0-9](\.[0-9]+)+?)$/alsa:\1/'"; +ambashell;;unknown"^AmbaShell\ Test\ Command\ \[Version\ [0-9]\.[0-9]+(\.[0-9]+)?\]$";"sed -r 's/AmbaShell\ Test\ Command\ \[Version\ ([0-9](\.[0-9]+)+?)$/ambashell:\1/'"; +amixer;;unknown;"amixer\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/amixer\ version\ ([0-9](\.[0-9]+)+?)$/alsa:\1/'"; +amule;;GPL-2.0-only;"aMuleD\ [0-9](\.[0-9]+)+?\ compiled\ with\ ";"sed -r 's/aMuleD\ ([0-9](\.[0-9]+)+?)\ .*/amuled:\1/'"; +apache;;Apache-2.0;"^Server version: Apache/[0-9](\.[0-9]+)+?";"sed -r 's/^Server version: Apache\/([0-9](\.[0-9]+)+?)/apache:\1/g'"; +apstats;;unknown;"apstats\ v[0-9](\.[0-9]+)+?:\ Display\ Access\ Point\ Statistics\.";"sed -r 's/apstats\ v([0-9](\.[0-9]+)+?):\ .*/apstats:\1/'"; +apt;;GPL-3.0-only;"apt\ [0-9]+(\.[0-9]+)+?\ ";"sed -r 's/apt\ ([0-9]+(\.[0-9]+)+?)\ .*/apt:\1/'"; +apt;;GPL-3.0-only;"apt-Version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/apt-Version\ ([0-9](\.[0-9]+)+?)\ .*/apt:\1/'"; +apparmor;;GPL-2.0-only;"^AppArmor\ parser\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/AppArmor\ parser\ version\ ([0-9](\.[0-9]+)+?)$/apparmor:\1/'"; +arp;;GPL-3.0-only;"^arp\ [0-9](\.[0-9]+)+?\ \(.*\)$";"sed -r 's/arp\ ([0-9](\.[0-9]+)+?).*/arp:\1/'"; +arptables;;GPL-2.0-only;"arptables\ v[0-9](\.[0-9]+)+?-[0-9]:\ ";"sed -r 's/arptables\ v([0-9](\.[0-9]+)+?-[0-9]):\ /arptables:\1/'"; +asterisk;;GPL-2.0-only;"^Asterisk\ [0-9]+\.[0-9](\.[0-9]+)+?,\ Copyright";"sed -r 's/Asterisk\ ([0-9]+(\.[0-9]+)+?),\ .*/asterisk:\1/'"; +atftp;;GPL-2.0-only;"^atftp-[0-9]+(\.[0-9]+)+?\ ";"sed -r 's/atftp-([0-9](\.[0-9]+)+?)/aftp:\1/'"; +tftp-hpa;;BSD-3-Clause;"^tftp-hpa\ [0-9](\.[0-9]+)+?,\ with\ remap,\ without\ tcpwrappers$";"sed -r 's/tftp-hpa\ ([0-9](\.[0-9]+)+?),\ .*/tftp-hpa:\1/'"; +avahi-autoipd;;LGPL-2.0-or-later;"^avahi-[a-z]+\ [0-9](\.[0-9]+)+?$";"sed -r 's/avahi-[a-z]+\ ([0-9](\.[0-9]+)+?)$/avahi:avahi:\1/'"; +babeld;;MIT;"^babeld\ [Vv]ersion\ [0-9]+(\.[0-9]+)+$";"sed -r 's/babeld\ [Vv]ersion\ ([0-9]+(\.[0-9]+)+?)$/babeld:\1/'"; +bash;;GPL-3.0-only;"[Bb]ash.*version\ [0-9](\.[0-9]+)+?";"sed -r 's/[Bb]ash.*version\ ([0-9](\.[0-9]+)+?).*/bash:\1/'"; +bash;;GPL-3.0-only;"[Bb]ash,\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/[Bb]ash,\ version\ ([0-9](\.[0-9]+)+?).*/bash:\1/'"; +batctl;;GPL-3.0-only,mit;"^batctl\ 20[0-9]+\.[0-9]+\.[0-9]+$";"sed -r 's/batctl\ (20[0-9]+(\.[0-9]+)+?)$/batctl:\1/'"; +bc;;GPL-3.0-or-later;"^bc\ [0-9](\.[0-9]+)+?$";"sed -r 's/bc\ ([0-9](\.[0-9]+)+?)/bc:\1/'"; +bcrelay;;unknown;"BCrelay\ v[0-9](\.[0-9]+)+?";"sed -r 's/BCrelay\ v([0-9](\.[0-9]+)+?).*/bcrelay:\1/'"; +bftpd;strict;GPL-2.0-only;"^[0-9](\.[0-9]+)+?$";"sed -r 's/([0-9](\.[0-9]+)+?)$/bftpd:\1/'"; +bftpd;live;GPL-2.0-only;"^Bftpd\ [0-9](\.[0-9]+)+?$";"sed -r 's/Bftpd\ ([0-9](\.[0-9]+)+?)$/bftpd:\1/'"; +bgpd;;unknown;"bgpd\ [Vv]ersion\ [0-9]+(\.[0-9]+)+$";"sed -r 's/bgpd\ [Vv]ersion\ ([0-9]+(\.[0-9]+)+?)$/bgpd:\1/'"; +binary;;unknown;"^Binary\ V[0-9](\.[0-9]+)+?\ ";"sed -r 's/Binary\ V([0-9](\.[0-9]+)+?)\ .*/binary:\1/'"; +binutils;;GPL-3.0-only;"\(GNU\ Binutils.*\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ Binutils.*\)\ ([0-9](\.[0-9]+)+?)$/gnu:binutils:\1/'"; +binutils;;GPL-3.0-only;"\(GNU\ Binutils\ for\ Debian\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ Binutils\ for\ Debian\)\ ([0-9](\.[0-9]+)+?)$/gnu:binutils:\1/'"; +bird;;unknown;"^BIRD\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/BIRD\ version\ ([0-9](\.[0-9]+)+?)$/bird:\1/'"; +blkid;;unknown;"^blkid\ [0-9](\.[0-9]+)+?\ \(.*\)$";"sed -r 's/blkid\ ([0-9](\.[0-9]+)+?)\ .*/blkid:\1/'"; +blockman;;unknown;"^blockman\ [0-9](\.[0-9]+)+?\.blockman\ build-[0-9]+$";"sed -r 's/blockman\ ([0-9](\.[0-9]+)+?)\..*/blockman:\1/'"; +boa;;unknown;"Boa\ HTTPd\ [0-9](\.[0-9]+)+?(rc[0-9]+)?";"sed -r 's/Boa\ HTTPd\ ([0-9](\.[0-9]+)+?(rc[0-9]+)?)/boa:boa:\1/'"; +booster;;unknown;"BoosterMainFunction:305:\ Version:\ [0-9](\.[0-9])+?";"sed -r 's/BoosterMainFunction:305:\ Version:\ ([0-9](\.[0-9]+)+?).*/booster:\1/'"; +bootlogd;;unknown;"\ bootlogd\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/\ bootlogd\ ([0-9](\.[0-9]+)+?)\ .*/bootlogd:\1/'"; +bpalogin;;GPL-2.0-only;"BPALogin\ v[0-9](\.[0-9])+?\ -\ portable\ BigPond\ Broadband\ login\ client$";"sed -r 's/BPALogin\ v([0-9](\.[0-9]+)+?)\ .*/bpalogin:\1/'"; +bpalogin;;GPL-2.0-only;"^BPALogin\ v[0-9](\.[0-9]+)+?\ -\ lightweight\ portable\ BIDS2\ login\ client$";"sed -r 's/BPALogin\ v([0-9](\.[0-9]+)+?)\ .*/bpalogin:\1/'"; +brctl;;unknown;"^brctl,\ [0-9](\.[0-9])+?$";"sed -r 's/brctl,\ ([0-9](\.[0-9]+)+?)$/brctl:\1/'"; +bridge-utils;;unknown;"bridge-utils,\ [0-9](\.[0-9])+?$";"sed -r 's/bridge-utils,\ ([0-9](\.[0-9]+)+?)$/bridge-utils:\1/'"; +bridge-utility;;unknown;"^bridge\ utility,\ [0-9](\.[0-9]+)+?$";"sed -r 's/bridge\ utility,\ ([0-9](\.[0-9]+)+?)$/bridge-utility:\1/'"; +brltty;;LGPL-2.1-only;"BRLTTY\ [0-9]\.[0-9]+\.[0-9]+\ rev\ BRLTTY-[0-9]\.[0-9]+\.[0-9]+\ ";"sed -r 's/BRLTTY\ ([0-9](\.[0-9]+)+?).*/brltty:\1/'"; +brltty;;LGPL-2.1-only;"BRLTTY\ [0-9]\.[0-9]+\ rev\ BRLTTY-[0-9]\.[0-9]+\ ";"sed -r 's/BRLTTY\ ([0-9](\.[0-9]+)+?).*/brltty:\1/'"; +btconfig;;unknown;"btconfig\ -\ BTCONFIG\ Tool\ ver\ [0-9](\.[0-9]+)+?$";"sed -r 's/btconfig\ -\ BTCONFIG\ Tool\ ver\ ([0-9](\.[0-9]+)+?)$/btconfig:\1/'"; +btrfs;;unknown;"^Btrfs\ Btrfs\ v[0-9](\.[0-9]+)+?$";"sed -r 's/Btrfs\ Btrfs\ v([0-9](\.[0-9]+)+?).*/btrfs:\1/'"; +buildroot;;unknown;"getconf\ \(Buildroot\)\ [0-9]\.[0-9]+$";"sed -r 's/.*\(Buildroot\)\ ([0-9](\.[0-9]+)+?)/buildroot:\1/'"; +busybox;;GPL-2.0-only;"BusyBox\ v[0-9](\.[0-9]+)+?\ ";"sed -r 's/BusyBox\ v([0-9](\.[0-9]+)+?)\ .*/busybox:\1/'"; +busybox;;GPL-2.0-only;"BusyBox\ v[0-9](\.[0-9]+)+?\ \([0-9]+-.*\)";"sed -r 's/BusyBox\ v([0-9](\.[0-9]+)+?)\ .*/busybox:\1/'"; +busybox;;GPL-2.0-only;"BusyBox\ v[0-9](\.[0-9]+)+?.*\ multi-call\ binary";"sed -r 's/BusyBox\ v([0-9](\.[0-9]+)+?).*/busybox:\1/'"; +busybox;;GPL-2.0-only;"BusyBox\ v[0-9](\.[0-9]+)+?.*\ Built-in\ shell";"sed -r 's/BusyBox\ v([0-9](\.[0-9]+)+?)\ .*/busybox:\1/'"; +busybox;live;GPL-2.0-only;"^BusyBox\ http\ [0-9](\.[0-9]+)+?$";"sed -r 's/BusyBox\ http\ ([0-9](\.[0-9]+)+?)$/busybox:\1/'"; +bzip2;;bzip2-1.0.6;"^bzip2,\ a\ block-sorting\ file\ compressor\.\ \ Version\ [0-9](\.[0-9]+)+?,\ ";"sed -r 's/bzip2,\ a\ block-sorting\ file\ compressor\.\ \ Version\ ([0-9](\.[0-9]+)+?),\ .*/bzip2:\1/'"; +bzip2;;bzip2-1.0.6;"bzip2recover\ [0-9](\.[0-9]+)+?:\ extracts";"sed -r 's/bzip2recover\ ([0-9](\.[0-9]+)+?):\ .*/bzip2:\1/'"; +cape;;unknown;"^cape\ [0-9](\.[0-9])+?$";"sed -r 's/cape\ ([0-9](\.[0-9]+)+?)$/cape:\1/'"; +candump;;GPL-2.0-only;"^candump\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/candump\ ([0-9]+(\.[0-9]+)+?)$/can-utils:\1/'"; +cansequence;;GPL-2.0-only;"^cansequence\ [0-9](\.[0-9]+)+?$";"sed -r 's/cansequence\ ([0-9]+(\.[0-9]+)+?)$/can-utils:\1/'"; +ccrypt;;GPL-2.0-or-later;"ccrypt\ [0-9](\.[0-9]+)+?\.\ Secure\ encryption\ and\ decryption\ of\ files\ and\ streams\.";"sed -r 's/ccrypt\ ([0-9]+(\.[0-9]+)+?).*/ccrypt:\1/'"; +ccrypt;multi_grep;GPL-2.0-or-later;'"^ccrypt$"&&"^\%s\ \%s\.\ Secure\ encryption\ and\ decryption\ of\ files\ and\ streams\.$"&&"[0-9](\.[0-9]+)+?";"sed -r 's/([0-9]+(\.[0-9]+)+?)/ccrypt:\1/'"; +cdialog;;unknown;"^cdialog\ .+\ version\ [0-9]\.[0-9]-[0-9]+";"sed -r 's/cdialog\ .*\ version\ ([0-9]+(\.[0-9]+)+?).*/cdialog:\1/'"; +chillispot;;unknown;"^chillispot\ [0-9](\.[0-9]+)+?$";"sed -r 's/chillispot\ ([0-9]+(\.[0-9]+)+?).*/chillispot:\1/'"; +chrony;;unknown;"^chrony[cd]\ \(chrony\)\ version\ [0-9]\.[0-9]+";"sed -r 's/chrony[cd]\ \(chrony\)\ version\ ([0-9]+(\.[0-9]+)+?)/chrony:\1/'"; +cifs-utils;;unknown;"mount\.cifs\ version\:\ [0-9]\.[0-9]+";"sed -r 's/mount\.cifs\ version:\ ([0-9]+(\.[0-9]+)+?).*/cifs-utils:\1/'"; +clear_console;;unknown;"^clear_console:\ Version\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/clear_console:\ Version\ ([0-9]+(\.[0-9]+)+?)$/clear_console:\1/'"; +comgt;;unknown;"comgt\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/comgt\ version\ ([0-9](\.[0-9]+)+?).*/comgt:\1/'"; +conntrack;;unknown;"conntrack\ v[0-9](\.[0-9]+)+?\ \(conntrack-tools\)";"sed -r 's/conntrack\ v([0-9](\.[0-9]+)+?).*/conntrack-tools:\1/'"; +coreutils;;GPL-3.0-only;"\(GNU\ coreutils\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ coreutils\)\ ([0-9](\.[0-9]+)+?)$/gnu:coreutils:\1/'"; +coreboot;;GPL-2.0-only;"coreboot\ toolchain\ v[0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9a-z]+";"sed -r 's/coreboot\ toolchain\ v([0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9a-z]+)/coreboot:\1/'"; +coreboot;;GPL-2.0-only;"COREBOOT_VERSION: [0-9]\.[0-9]+?(-[0-9]+)?(-[0-9a-z]+)?(-dirty)?";"sed -r 's/COREBOOT_VERSION: ([0-9]\.[0-9]+?(-[0-9]+)?(-[0-9a-z]+)?(-dirty)?)/coreboot:\1/'" +coova;;GPL-3.0-only;"^coova-chilli\ [0-9](\.[0-9]+)+?$";"sed -r 's/coova-chilli\ ([0-9](\.[0-9]+)+?)$/:coova-chilli:\1/'"; +cp443-1;;proprietary;"^\@\(\#1\)\ CP443-1\ GX20\ V\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/\@\(\#1\)\ CP443-1\ GX20\ v\ ([0-9]\.[0-9]\.[0-9]).*/simatic_cp443-1_firmware \1/'"; +cp443-1;;proprietary;"^\ Firmware\ Update\ V[0-9](\.[0-9]+)+?\ for\ the\ communication\ processor\ CP443-1$";"sed -r 's/Firmware\ Update\ V([0-9]\.[0-9]\.[0-9]+)\ for\ the\ communication\ processor\ CP443-1/simatic_cp443-1_firmware \1/'"; +crtmpserver;;unknown;"C++\ RTMP\ Server\ .*\ version\ v[0-9](\.[0-9])+?\ r\.[0-9]+";"sed -r 's/C++\ RTMP\ Server\ .*\ version\ v([0-9]+(\.[0-9]+)+?).*/crtmpserver:\1/'"; +cryptsetup;;unknown;"cryptsetup\ [0-9](\.[0-9]+)+?$";"sed -r 's/cryptsetup\ ([0-9](\.[0-9]+)+?)$/cryptsetup:\1/'"; +cups;;unknown;"^cups\ BJNP\ backend\ -\ version\ [0-9]\.[0-9]$";"sed -r 's/cups\ BJNP\ backend\ -\ version\ ([0-9](\.[0-9]+)+?)$/cups:\1/'"; +curl;;curl;"^curl\ [0-9](\.[0-9]+)+?";"sed -r 's/curl\ ([0-9](\.[0-9]+)+?).*/curl:\1/'"; +cvtsudoers;;unknown;"cvtsudoers\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/cvtsudoers\ version\ ([0-9](\.[0-9]+)+?)$/sudo:\1/'"; +dbus-tools;;unknown;"D-Bus\ [ a-zA-Z0-9]+\ [0-9](\.[0-9]+)+?";"sed -r 's/D-Bus\ .*\ ([0-9](\.[0-9]+)+?).*/freedesktop:dbus:\1/'"; +dbus-tools;;unknown;"dbus-run-session\ [0-9](\.[0-9]+)+?$";"sed -r 's/dbus-run-session\ ([0-9](\.[0-9]+)+?)$/freedesktop:dbus:\1/'"; +ddnsd;;unknown;"ddnsd\ version\ [0-9]\.[0-9]";"sed -r 's/ddnsd\ version\ ([0-9](\.[0-9]+)+?).*/ddnsd:\1/'"; +ddrescue;;GPL-2.0-or-later;"^GNU\ ddrescue\ [0-9](\.[0-9]+)+?$";"sed -r 's/GNU\ ddrescue\ ([0-9](\.[0-9]+)+?)$/gnu:ddrescue:\1/'"; +debootstrap;;unknown;"debootstrap\ [0-9](\.[0-9]+)+?$";"sed -r 's/debootstrap\ ([0-9](\.[0-9]+)+?)$/debootstrap:\1/'"; +debugfs;;unknown;"^debugfs\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/debugfs\ ([0-9](\.[0-9]+)+?).*/e2fsprogs:\1/'"; +debugreiserfs;;unknown;"debugreiserfs\ [0-9](\.[0-9]+)+?$";"sed -r 's/debugreiserfs\ ([0-9](\.[0-9]+)+?)$/debugreiserfs:\1/'"; +depmod;;unknown;"depmod\ [0-9](\.[0-9]+)+?\ --\ part\ of\ module-init-tools$";"sed -r 's/depmod\ ([0-9](\.[0-9]+)+?)\ .*/depmod:\1/'"; +insmod;;unknown;"insmod\ [0-9](\.[0-9]+)+?\ --\ part\ of\ module-init-tools$";"sed -r 's/insmod\ ([0-9](\.[0-9]+)+?)\ .*/insmod:\1/'"; +modinfo;;unknown;"modinfo\ [0-9](\.[0-9]+)+?\ --\ part\ of\ module-init-tools$";"sed -r 's/modinfo\ ([0-9](\.[0-9]+)+?)\ .*/modinfo:\1/'"; +modprobe;;unknown;"modprobe\ [0-9](\.[0-9]+)+?\ --\ part\ of\ module-init-tools$";"sed -r 's/modprobe\ ([0-9](\.[0-9]+)+?)\ .*/modprobe:\1/'"; +davfs2;;GPL-3.0-only;"^davfs2\ [0-9](\.[0-9]+)+?$";"sed -r 's/davfs2\ ([0-9](\.[0-9]+)+?)$/davfs2:\1/'"; +delphi;;unknown;"^Embarcadero Delphi for Win32 compiler version [0-9]+\.[0-9]\ \([0-9]+\.[0-9]\.[0-9]+\.[0-9]+\)$";"sed -r 's/^Embarcadero Delphi for Win32 compiler version [0-9]+\.[0-9]\ \(([0-9]+\.[0-9]\.[0-9]+\.[0-9]+)\)$/embarcadero:embarcadero_delphi_xe6:\1/'"; +dhcpcd;;unknown;"DHCP\ Client\ Daemon\ v\.[0-9](\.[0-9]+)+?(-p[0-9]+)?";"sed -r 's/DHCP\ Client\ Daemon\ v\.([0-9](\.[0-9]+)+?(-p[0-9]+)?).*/dhcpcd:\1/'"; +dhcpfwd;;unknown;"dhcp-forwarder\ [0-9](\.[0-9])+?$";"sed -r 's/dhcp-forwarder\ ([0-9](\.[0-9]+)+?)$/dhcp-forwarder:\1/'"; +dhtest;;GPL-2.0-only;"dhtest\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/dhtest\ version\ ([0-9](\.[0-9]+)+?)$/dhtest:\1/'"; +diffutils;;unknown;"\(GNU\ diffutils\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ diffutils\)\ ([0-9](\.[0-9]+)+?)$/gnu:diffutils:\1/'"; +dig;;unknown;"^DiG\ [0-9]+(\.[0-9]+)+?(-P[0-9])?$";"sed -r 's/DiG\ ([0-9]+(\.[0-9]+)+?(-P[0-9])?)$/dig:\1/'"; +discover;;unknown;"^discover\ [0-9](\.[0-9]+)+?$";"sed -r 's/discover\ ([0-9](\.[0-9]+)+?)$/discover:\1/'"; +dmeventd;;unknown;"^dmeventd\ version:\ [0-9]\.[0-9]+\.[0-9]+\ ";"sed -r 's/dmeventd\ version:\ ([0-9](\.[0-9]+)+?)/dmeventd:\1/'"; +dmidecode;;unknown;"dmidecode\ [0-9]\.[0-9]+";"sed -r 's/dmidecode\ ([0-9](\.[0-9]+)+?)/dmidecode:\1/'"; +dnrd;;unknown;"dnrd\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/dnrd\ version\ ([0-9](\.[0-9]+)+?)$/dnrd:\1/'"; +dnsmasq;;GPL-3.0-only;"dnsmasq-[0-9]\.[0-9]+$";"sed -r 's/dnsmasq-([0-9](\.[0-9]+)+?)$/dnsmasq:\1/'"; +dnsmasq;;GPL-3.0-only;"dnsmasq\ [0-9]\.[0-9]+$";"sed -r 's/dnsmasq\ ([0-9](\.[0-9]+)+?)$/dnsmasq:\1/'"; +dnsmasq;;GPL-3.0-only;"^[dD]nsmasq\ version\ [0-9]\.[0-9]+";"sed -r 's/[dD]nsmasq\ version\ ([0-9](\.[0-9]+)+?).*/dnsmasq:\1/'"; +dos2unix;;bsd-style;"dos2unix\ [0-9](\.[0-9]+)+?";"sed -r 's/dos2unix\ ([0-9](\.[0-9]+)+?)/dos2unix:\1/'"; +unix2dos;;bsd-style;"unix2dos\ [0-9](\.[0-9]+)+?";"sed -r 's/unix2dos\ ([0-9]+(\.[0-9]+)+?)/unix2dos:\1/'"; +dosfsck;;unknown;"dosfsck\ [0-9](\.[0-9]+)+?";"sed -r 's/dosfsck\ ([0-9](\.[0-9]+)+?).*/dosfstools:\1/'"; +dpiclass;;unknown;"dpiclass\ [0-9]\.[0-9]\.[0-9]\ \(c\)\ 20[0-9][0-9]\ NETDUMA\ Software$";"sed -r 's/dpiclass\ ([0-9](\.[0-9]+)+?).*/dpiclass:\1/'"; +dpkg;;GPL-2.0-only;"dpkg-deb\ version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/dpkg-deb\ version\ ([0-9](\.[0-9]+)+?)\ .*/dpkg:\1/'"; +dpkg;;GPL-2.0-only;"dpkg-divert\ version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/dpkg-divert\ version\ ([0-9](\.[0-9]+)+?)\ .*/dpkg:\1/'"; +dpkg;;GPL-2.0-only;"dpkg-split\ version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/dpkg-split\ version\ ([0-9](\.[0-9]+)+?)\ .*/dpkg:\1/'"; +dpkg;;GPL-2.0-only;"dpkg-trigger\ version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/dpkg-trigger\ version\ ([0-9](\.[0-9]+)+?)\ .*/dpkg:\1/'"; +drflocs;;unknown;"^drflocs\ [0-9](\.[0-9]+)+?\ release$";"sed -r 's/drflocs\ ([0-9](\.[0-9]+)+?)\ .*/drflocs:\1/'"; +dropbear;;MIT;"^Dropbear\ multi-purpose\ version\ 20[0-9][0-9]\.[0-9][0-9]$";"sed -r 's/Dropbear\ multi-purpose\ version\ ([0-9]+(\.[0-9]+)+?)$/dropbear_ssh:\1/'"; +dropbear;;MIT;"^Dropbear\ multi-purpose\ version\ [0-9]\.[0-9]+$";"sed -r 's/Dropbear\ multi-purpose\ version\ ([0-9]+(\.[0-9]+)+?)$/dropbear_ssh:\1/'"; +dropbear;;MIT;"Dropbear\ sshd\ [0-9]\.[0-9]+$";"sed -r 's/Dropbear\ sshd\ ([0-9]+(\.[0-9]+)+?)$/dropbear_ssh:\1/'"; +dropbear;;MIT;"^Dropbear\ client\ [0-9]\.[0-9]+$";"sed -r 's/Dropbear\ client\ ([0-9]+(\.[0-9]+)+?)$/dropbear_ssh:\1/'"; +dropbear;;MIT;"Dropbear\ sshd\ v[0-9]+\.[0-9]+$";"sed -r 's/Dropbear\ sshd\ v([0-9]+(\.[0-9]+)+?)$/dropbear_ssh:\1/'"; +dropbear;;MIT;"Dropbear\ SSH\ multi-purpose\ v[0-9]+\.[0-9]+";"sed -r 's/Dropbear\ SSH\ multi-purpose\ v([0-9]+(\.[0-9]+)+?).*/dropbear_ssh:\1/'"; +dropbear;;MIT;"^Dropbear\ SSH\ multi-purpose\ v20[0-9][0-9]\.[0-9]+$";"sed -r 's/Dropbear\ SSH\ multi-purpose\ v([0-9]+(\.[0-9]+)+?)$/dropbear_ssh:\1/'"; +dropbear;;MIT;"^Dropbear\ sshd\ v20[0-9][0-9]\.[0-9][0-9]$";"sed -r 's/Dropbear\ sshd\ v([0-9]+(\.[0-9]+)+?)$/dropbear_ssh:\1/'"; +dropbear;;MIT;"^Dropbear\ v20[0-9][0-9]\.[0-9][0-9]$";"sed -r 's/Dropbear\ v([0-9]+(\.[0-9]+)+?)$/dropbear_ssh:\1/'"; +dropbear;live;MIT;"Dropbear\ sshd\ 20[0-9]+\.[0-9]+\ \(protocol\ 2\.0\)$";"sed -r 's/Dropbear\ sshd\ (20[0-9]+(\.[0-9]+)+?).*/dropbear_ssh:\1/'"; +dumpe2fs;;unknown;"dumpe2fs\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/dumpe2fs\ ([0-9](\.[0-9]+)+?).*/e2fsprogs:\1/'"; +dumpimage;;GPL-2.0-or-later;"^dumpimage\ version\ 20[0-9]+(\.[0-9]+)+?";"sed -r 's/dumpimage\ version\ ([0-9]+(\.[0-9]+)+?).*/uboot:dumpimage:\1/'"; +dxml;;unknown;"^dxml\ version\ [0-9]\.[0-9]b[0-9]+$";"sed -r 's/dxml\ version\ ([0-9](\.[0-9]+)+?(b[0-9]+)?)$/dxml:\1/'"; +dxmlc;;unknown;"^dxmlc\ version\ [0-9]\.[0-9]b[0-9]+$";"sed -r 's/dxmlc\ version\ ([0-9](\.[0-9]+)+?(b[0-9]+)?)$/dxml:\1/'"; +dyndns;;unknown;"DynDns\ Update\ v[0-9]\.[0-9]+.*\ AlphaNetworks,Inc\.";"sed -r 's/DynDns\ Update\ v([0-9](\.[0-9]+)+?).*\ AlphaNetworks.*/alphanetworks:dyndns:\1/'"; +e2fsck;;unknown;"e2fsck\ [0-9](\.[0-9]+)+?";"sed -r 's/e2fsck\ ([0-9](\.[0-9]+)+?).*/e2fsprogs:\1/'"; +e2image;;unknown;"e2image\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/e2image\ ([0-9](\.[0-9]+)+?).*/e2fsprogs:\1/'"; +easyroaming;;unknown;"^Easy\ Roaming\ Version\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/Easy\ Roaming\ Version\ ([0-9]+(\.[0-9]+)+?)$/easyroaming:\1/'"; +ebtables;;GPL-2.0-or-later;"ebtables\ v[0-9](\.[0-9]+)+?\ ";"sed -r 's/ebtables\ v([0-9](\.[0-9]+)+?)\ .*/ebtables:\1/'"; +ebtables;;GPL-2.0-or-later;"ebtables\ v[0-9](\.[0-9]+)+?-rc[0-9]\ ";"sed -r 's/ebtables\ v([0-9](\.[0-9]+)+?-rc[0-9])\ .*/ebtables:\1/'"; +ebtables;;GPL-2.0-or-later;"ebtables\ v[0-9](\.[0-9]+)+?-[0-9]\ ";"sed -r 's/ebtables\ v([0-9](\.[0-9]+)+?-[0-9])\ .*/ebtables:\1/'"; +ecmh;;BSD-3-Clause;"Easy\ Cast\ du\ Multi\ Hub\ \(ecmh\)\ [0-9]+\.[0-9]+\.[0-9]+\ by\ Jeroen\ Massar\ ";"sed -r 's/Easy\ Cast\ du\ Multi\ Hub\ \(ecmh\)\ ([0-9]+(\.[0-9]+)+?).*/ecmh:\1/'"; +eeprog;;GPL-2.0-or-later;"eeprog\ [0-9](\.[0-9]+)+?,\ a\ [0-9]+Cxx\ EEPROM\ reader/writer$";"sed -r 's/\eeprog\ ([0-9](\.[0-9]+)+?),\ .*/eeprog:\1/'"; +eglibc;;LGPL-2.1-only;"\(.*\ EGLIBC\ .*\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(.*\ EGLIBC\ .*\)\ ([0-9](\.[0-9]+)+?)$/eglibc:\1/'"; +eglibc;;LGPL-2.1-only;"\(EGLIBC\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(EGLIBC\)\ ([0-9](\.[0-9]+)+?)$/eglibc:\1/'"; +eglibc;;LGPL-2.1-only;"\ \(Debian\ EGLIBC\ [0-9](\.[0-9]+)+?-[0-9]\)\ .*\ [0-9]\.[0-9]";"sed -r 's/zdump\ \(Debian\ EGLIBC\ ([0-9](\.[0-9]+)+?)-[0-9]\)\ )$/eglibc:\1/'"; +eglibc;;LGPL-2.1-only;"\(Debian\ EGLIBC\ [0-9](\.[0-9]+)+?-[0-9]\)\ ([0-9](\.[0-9]+)+?).*";"sed -r 's/\(Debian\ EGLIBC\ [0-9](\.[0-9]+)+?-[0-9]+.*\)\ ([0-9](\.[0-9]+)+?)/eglibc:\2/"; +eject;;unknown;"[Ee]ject\ Version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/[Ee]ject\ Version\ ([0-9](\.[0-9]+)+?)\ .*/eject:\1/'"; +elog;;unknown;"event\ log\ utility\ v[0-9](\.[0-9]+)+?";"sed -r 's/event\ log\ utility\ v([0-9](\.[0-9]+)+?).*/elog:\1/'"; +embedthis;;unknown;"^Embedthis\ Appweb\ [0-9](\.[0-9]+)+?";"sed -r 's/Embedthis\ Appweb\ ([0-9](\.[0-9]+)+?).*/embedthis:appweb:\1/'"; +espeakup;;unknown;"ESpeakup\ [0-9](\.[0-9]+)+?$";"sed -r 's/ESpeakup\ ([0-9](\.[0-9]+)+?)$/espeakup:\1/'"; +ethswctl.c;;unknown;"^ethswctl\.c:v[0-9](\.[0-9]+)+?";"sed -r 's/ethswctl\.c:v([0-9](\.[0-9]+)+?).*/ethswctl:\1/'"; +ethtool;;unknown;"ethtool\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/ethtool\ version\ ([0-9](\.[0-9]+)+?).*/ethtool:\1/'"; +libext2fs;;unknown;"^EXT2FS\ Library\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/EXT2FS\ Library\ version\ ([0-9](\.[0-9]+)+?)$/e2fsprogs:\1/'"; +ez-ipupdate;;GPL-2.0-only;"[0-9](\.[0-9]+)+?\ -\ $Id:\ ez-ipupdate.c,v\ [0-9]\.[0-9]+";"sed -r 's/([0-9](\.[0-9]+)+?)\ -\ $Id:\ ez-ipupdate.c,v\ [0-9]\.[0-9]+/ez-ipupdate:\1/'"; +ez-ipupdate;;GPL-2.0-only;"ez-ipupdate:\ -\ [0-9](\.[0-9]+)+?";"sed -r 's/ez-ipupdate:\ -\ ([0-9](\.[0-9]+)+?)/ez-ipupdate:\1/'"; +fdisk;;GPL-2.0-only;"^fdisk\ v[0-9](\.[0-9]+)+?([a-z])?$";"sed -r 's/fdisk\ v([0-9](\.[0-9]+)+?([a-z])?)$/fdisk:\1/'"; +ffmpeg;;LGPL-2.1-or-later;"^ffmpeg version [0-9](\.[0-9]+)+? Copyright \(c\) 20[0-9]+-20[0-9]+ the FFmpeg developers";"sed -r 's/^ffmpeg version ([0-9](\.[0-9]+)+?) Copyright \(c\) 20[0-9]+-20[0-9]+ the FFmpeg developers$/ffmpeg:ffmpeg:\1/'"; +file;;unknown;"file-[0-9](\.[0-9]+)+?$";"sed -r 's/file-([0-9](\.[0-9]+)+?)$/file:\1/'"; +flash_eraseall;;unknown;"flash_eraseall\ \$Revision:\ [0-9](\.[0-9]+)+?\ \$";"sed -r 's/flash_eraseall\ \$Revision:\ ([0-9](\.[0-9]+)+?).*/mtd-utils:\1/'"; +flash_erase;;unknown;"flash_erase\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/flash_erase\ version\ ([0-9](\.[0-9]+)+?).*/mtd-utils:\1/'"; +flatfsd;;unknown;"flatfsd\ [0-9](\.[0-9])+?mtd";"sed -r 's/flatfsd\ ([0-9](\.[0-9]+)+?)mtd/uclinux:flatfsd:\1/'"; +flex;;unknown;"^flex\ [0-9](\.[0-9]+)+?$";"sed -r 's/flex\ ([0-9](\.[0-9]+)+?)$/flex:\1/'"; +flex;;unknown;"flex\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/flex\ ([0-9](\.[0-9]+)+?)$/flex:\1/'"; +flowman;;unknown;"^flowman\ [0-9]\.[0-9]\.[0-9]\.flowman\ build-[0-9]+$";"sed -r 's/flowman\ ([0-9](\.[0-9]+)+?).*/flowman:\1/'"; +fota;;unknown;"^fota\ client\ version:\ [0-9](\.[0-9]+)+?\.$";"sed -r 's/fota\ client\ version\:\ ([0-9](\.[0-9]+)+)?\.$/fota_client:\1/'"; +fota;;unknown;"^fota\ tz\ client\ version:\ [0-9](\.[0-9]+)+?\.$";"sed -r 's/fota\ tz\ client\ version\:\ ([0-9](\.[0-9]+)+?)\.$/fota_client:\1/'"; +freebsd;;BSD-2-Clause;"FreeBSD\ [0-9]+(\.[0-9])+?-RELEASE\ ";"sed -r 's/FreeBSD\ ([0-9]+(\.[0-9]+)+?)-RELEASE\ $/freebsd:\1/'"; +freebsd;;BSD-2-Clause;"FreeBSD\ [0-9]+(\.[0-9])+?-RELEASE-p[0-9]\ ";"sed -r 's/FreeBSD\ ([0-9]+(\.[0-9]+)+?)-RELEASE-([a-z]([0-9]+))\ $/freebsd:\1:\3/'"; +freeradius;;GPL-2.0-only;"^radiusd:\ FreeRADIUS\ Version\ [0-9](\.[0-9]+)+?";"sed -r 's/radiusd:\ FreeRADIUS\ Version\ ([0-9](\.[0-9]+)+?).*/freeradius:\1/'"; +freeradius;;GPL-2.0-only;"^FreeRADIUS\ Version\ [0-9](\.[0-9]+)+?";"sed -r 's/FreeRADIUS\ Version\ ([0-9](\.[0-9]+)+?).*/freeradius:\1/'"; +freeradius-radclient;;GPL-2.0-only;"radclient:\ [0-9]\.[0-9]+\.[0-9]+\ built\ on\ ";"sed -r 's/radclient:\ ([0-9](\.[0-9]+)+?).*/freeradius:radclient:\1/'"; +ftop;;unknown;"^ftptop\/[0-9](\.[0-9]+)+?$";"sed -r 's/ftptop\/([0-9](\.[0-9]+)+?)$/ftptop:\1/'"; +libfuse;;GPL-2.0-only;"FUSE\ library\ version:\ [0-9](\.[0-9]+)+?";"sed -r 's/FUSE\ library\ version:\ ([0-9](\.[0-9]+)+?)/libfuse:\1/'"; +fuser;;unknown;"fuser\ \(PSmisc\)\ [0-9]+(\.[0-9]+)+?";"sed -r 's/fuser\ \(PSmisc\)\ ([0-9]+(\.[0-9]+)+?)/fuser:\1/'"; +fusermount;;unknown;"fusermount\ version:\ [0-9](\.[0-9])+?";"sed -r 's/fusermount\ version:\ ([0-9](\.[0-9]+)+?).*/fusermount:\1/'"; +gctwimax;;unknown;"GCTwimax\ [0-9](\.[0-9])+?rc[0-9]";"sed -r 's/GCTwimax\ ([0-9](\.[0-9]+)+?(rc[0-9])?).*/gctwimax:\1/'"; +gdb;;GPL-3.0-only;"GNU\ gdb\ \(Debian\ [0-9](\.[0-9]+)+?-[0-9]+\)\ ";"sed -r 's/GNU\ gdb\ \(Debian\)\ ([0-9](\.[0-9]+)+?)/gdb:\1/'"; +gdb;;GPL-3.0-only;"GNU\ gdb\ \(GDB\)\ [0-9](\.[0-9]+)+?";"sed -r 's/GNU\ gdb\ \(GDB\)\ ([0-9](\.[0-9]+)+?)/gdb:\1/'"; +gdbserver;;GPL-3.0-only;"^GNU\ gdbserver\ [0-9](\.[0-9]+)+?$";"sed -r 's/GNU\ gdbserver\ ([0-9](\.[0-9]+)+?)$/gdb:\1/'"; +gdbserver;;GPL-3.0-only;"^GNU\ gdbserver\ \(GDB\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/GNU\ gdbserver\ \(GDB\)\ ([0-9](\.[0-9]+)+?)$/gdb:\1/'"; +genksyms;;unknown;"genksyms\ version\ [0-9]\.[0-9]+\.[0-9]+$";"sed -r 's/genksyms\ version\ ([0-9](\.[0-9]+)+?)$/genksyms:\1/'"; +glibc;;LGPL-2.1-or-later;"\(Debian\ GLIBC.*\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(Debian\ GLIBC.*\)\ ([0-9](\.[0-9]+)+?)$/gnu:glibc:\1/'"; +glibc;;LGPL-2.1-or-later;"GNU\ C\ Library\ \(Debian\ GLIBC.*\)\ stable\ release\ version\ [0-9](\.[0-9]+)+?,\ ";"sed -r 's/GNU\ C\ Library\ \(Debian\ GLIBC.*\)\ stable\ release\ version\ ([0-9](\.[0-9]+)+?),\ .*/gnu:glibc:\1/'"; +glibc;;LGPL-2.1-or-later;"GNU\ C\ Library\ \(.*\)\ stable\ release\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/GNU\ C\ Library\ \(.*\)\ stable\ release\ version\ ([0-9](\.[0-9]+)+?)/gnu:glibc:\1/'"; +glibc;;LGPL-2.1-or-later;"^GNU\ C\ Library\ \(GNU\ libc\)\ stable\ release\ version\ [0-9](\.[0-9]+)+?\.$";"sed -r 's/GNU\ C\ Library\ \(GNU\ libc\)\ stable\ release\ version\ ([0-9](\.[0-9]+)+?).*/gnu:glibc:\1/'"; +glibc;;LGPL-2.1-or-later;"GNU\ C\ Library\ \(GLIBC\)\ stable\ release\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/GNU\ C\ Library\ \(GLIBC\)\ stable\ release\ version\ ([0-9](\.[0-9]+)+?).*/gnu:glibc:\1/'"; +glibc;;LGPL-2.1-or-later;"GNU\ C\ Library\ stable\ release\ version\ [0-9](\.[0-9]+)+?,\ ";"sed -r 's/GNU\ C\ Library\ stable\ release\ version\ ([0-9](\.[0-9]+)+?),\ .*/gnu:glibc:\1/'"; +glibc;;LGPL-2.1-or-later;"ldconfig\ \(GNU\ libc\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/ldconfig\ \(GNU\ libc\)\ ([0-9](\.[0-9]+)+?)$/gnu:glibc:\1/'"; +glibc;;LGPL-2.1-or-later;"GNU\ C\ Library\ development\ release\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/GNU\ C\ Library\ development\ release\ version\ ([0-9](\.[0-9]+)+?)$/gnu:glibc:\1/'"; +glibc;;LGPL-2.1-or-later;"GNU\ C\ Library\ \(.*\)\ stable\ release\ version\ [0-9](\.[0-9]+)+?(\.)?$";"sed -r 's/GNU\ C\ Library\ \(.*\)\ stable\ release\ version\ ([0-9](\.[0-9]+)+?)(\.)?$/gnu:glibc:\1/'"; +gnu_cpio;;GPL-3.0-only;"\(GNU\ cpio\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ cpio\)\ ([0-9](\.[0-9]+)+?)$/gnu:cpio:\1/'"; +gnu_findutils;;GPL-3.0-only;"\(GNU\ findutils\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ findutils\)\ ([0-9](\.[0-9]+)+?)$/gnu:findutils:\1/'"; +gnu_findutils;;GPL-3.0-only;"\(GNU\ findutils\)\ [0-9](\.[0-9]+)+?-[a-z]+$";"sed -r 's/\(GNU\ findutils\)\ ([0-9](\.[0-9]+)+?-[a-z]+)$/gnu:findutils:\1/'"; +gnu_fribidi;;LGPL-2.1-only;"^\(GNU FriBidi\) [0-9](\.[0-9]+)+?$";"sed -r 's/^\(GNU FriBidi\) ([0-9](\.[0-9]+)+?)$/gnu:fribidi:\1/'"; +gnu_gettext-runtime;;unknown;"\(GNU\ gettext-runtime\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ gettext-runtime\)\ ([0-9](\.[0-9]+)+?)$/gnu:gettext-runtime:\1/'"; +gnu_groff;;GPL-3.0-only;"\(GNU\ groff\)\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ groff\)\ version\ ([0-9](\.[0-9]+)+?)$/gnu:groff:\1/'"; +gnu_groff;;GPL-3.0-only;"^GNU\ refer\ \(groff\)\ version\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/GNU\ refer\ \(groff\)\ version\ ([0-9]+(\.[0-9]+)+?)$/gnu:groff:\1/'"; +gnu_inetutils;;GPL-3.0-only;"\(GNU\ inetutils\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ inetutils\)\ ([0-9](\.[0-9]+)+?)$/gnu:inetutils:\1/'"; +gnu_mtools;;GPL-3.0-only;"\(GNU\ mtools\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ mtools\)\ ([0-9](\.[0-9]+)+?)$/gnu:mtools:\1/'"; +gnutls;;LGPL-2.1-or-later;"Enabled\ GnuTLS\ [0-9](\.[0-9]+)+?\ logging\.\.\.";"sed -r 's/Enabled\ GnuTLS\ ([0-9](\.[0-9]+)+?)\ .*/gnutls:\1/'"; +gnutls;;LGPL-2.1-or-later;"Project-Id-Version:\ gnutls\ [0-9](\.[0-9]+)+?$";"sed -r 's/Project-Id-Version:\ gnutls\ ([0-9](\.[0-9]+)+?)$/gnutls:\1/'"; +goahead;;commercial;"^CONFIG_SET\ \(\/runtime\/VerInfo\/Web,\ [0-9](\.[0-9])+?(b[0-9]+)?\)\ error\!$";"sed -r 's/CONFIG_SET\ \(\/runtime\/VerInfo\/Web,\ ([0-9](\.[0-9]+)+?(b[0-9]+)?)\)\ error\!$/goahead:\1/'"; +goahead;;commercial;"^goahead\ \ [0-9](\.[0-9]+)+?\ start$";"sed -r 's/goahead\ \ ([0-9](\.[0-9]+)+?)\ start$/goahead:\1/'"; +gpg;;GPL-3.0-only;"gpg.*\(GnuPG\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/gpg.*\(GnuPG\)\ ([0-9](\.[0-9]+)+?)$/gnupg:\1/'"; +gpgsplit;;GPL-3.0-only;"gpgsplit\ \(GnuPG\)\ [0-9](\.[0-9]+)+?";"sed -r 's/gpg.*\(GnuPG\)\ ([0-9](\.[0-9]+)+?)/gnupg:\1/'"; +grep;;GPL-3.0-only;"\(GNU\ grep\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ grep\)\ ([0-9](\.[0-9]+)+?)$/gnu:grep:\1/'"; +grep;;GPL-3.0-only;"GNU\ grep\ [0-9](\.[0-9]+)+?";"sed -r 's/GNU\ grep\ ([0-9](\.[0-9]+)+?).*/gnu:grep:\1/'"; +grub2;;GPL-3.0-only;"\ \(GRUB\)\ [0-9](\.[0-9]+)+?";"sed -r 's/\ \(GRUB\)\ 2((\.[0-9]+)+?).*/grub2:2\1/'"; +grub;;GPL-3.0-only;"\ \(GRUB\)\ [0-9](\.[0-9]+)+?";"sed -r 's/\ \(GRUB\)\ ([0-9](\.[0-9]+)+?).*/grub:\1/'"; +grubinst;;unknown;"grubinst\ version\ :\ [0-9](\.[0-9]+)+?$";"sed -r 's/grubinst\ version\ :\ ([0-9](\.[0-9]+)+?)$/grubinst:\1/'"; +gsoap;;GPL-2.0-only;"gSOAP\/[0-9](.[0-9]+)+?";"sed -r 's/gSOAP\/([0-9](\.[0-9]+)+?).*/gsoap:\1/'"; +gzip;;unknown;"gzip\ [0-9](\.[0-9]+)+?$";"sed -r 's/gzip\ ([0-9](\.[0-9]+)+?)$/gzip:\1/'"; +gzip;multi_grep;unknown;'"^GZIP$"&&"^Written\ by\ Jean-loup\ Gailly\.$"&&"^Report\ bugs\ to\ \.$"&&"^[0-9](\.[0-9]+)+?$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/gzip:\1/'"; +gzip;strict;unknown;"Version:\ [0-9](\.[0-9]+)+?$";"sed -r 's/Version:\ ([0-9](\.[0-9]+)+?)$/gzip:\1/'"; +haserl;;unknown;"^This\ is\ haserl\ version\ [0-9](\.[0-9]+)+?\ \(http\:\/\/haserl\.sourceforge\.net\)$";"sed -r 's/This\ is\ haserl\ version\ ([0-9](\.[0-9]+)+?)\ .*/haserl:\1/'"; +hciemu;;GPL-2.0-only;"hciemu\ -\ HCI\ emulator\ ver\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/hciemu\ -\ HCI\ emulator\ ver\ ([0-9]+(\.[0-9]+)+?)$/bluez_project:hciemu:\1/'"; +hcitool;;GPL-2.0-only;"hcitool\ -\ HCI\ Tool\ ver\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/hcitool\ -\ HCI\ Tool\ ver\ ([0-9]+(\.[0-9]+)+?)$/bluez_project:hcitool:\1/'"; +hdparm;;unknown;"hdparm\ v[0-9](\.[0-9]+)+?";"sed -r 's/hdparm\ v([0-9](\.[0-9]+)+?).*/hdparm:\1/'"; +hostapd;;GPL-2.0-only;"hostapd\ v[0-9](\.[0-9]+)+?$";"sed -r 's/hostapd\ v([0-9](\.[0-9]+)+?)$/hostapd:\1/'"; +hostapd;;GPL-2.0-only;"^hostapd\ v[0-9](\.[0-9]+)+?(-devel)?$";"sed -r 's/hostapd\ v([0-9](\.[0-9]+)+?)(-devel)?$/hostapd:\1/'"; +hostapd;;GPL-2.0-only;"hostapd\ v[0-9](\.[0-9]+)+?\.x$";"sed -r 's/hostapd\ v([0-9](\.[0-9]+)+?).*$/hostapd:\1/'"; +hostapd_cli;;GPL-2.0-only;"hostapd_cli\ v[0-9](\.[0-9]+)+?\.x$";"sed -r 's/hostapd_cli\ v([0-9](\.[0-9]+)+?).*$/hostapd:\1/'"; +htop;;GPL-2.0-only;"^htop\ [0-9](\.[0-9]+)+?\ -\ \(C\)\ 20[0-9]+-20[0-9]+\ Hisham\ Muhammad$";"sed -r 's/htop\ ([0-9](\.[0-9]+)+?)\ .*$/htop:\1/'"; +httpd;;unknown;"goahead\ \ [0-9](\.[0-9]+)+?\ start";"sed -r 's/goahead\ ([0-9](\.[0-9]+)+?)\ start.*/goahead:\1/'"; +i2cdetect;;unknown;"i2cdetect\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/i2cdetect\ version\ ([0-9](\.[0-9]+)+?).*$/i2c-tools:\1/'"; +i2cdump;;unknown;"i2cdump\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/i2cdump\ version\ ([0-9](\.[0-9]+)+?).*$/i2c-tools:\1/'"; +i2cget;;unknown;"i2cget\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/i2cget\ version\ ([0-9](\.[0-9]+)+?).*$/i2c-tools:\1/'"; +i2cio;;unknown;"^i2cio\ [0-9](\.[0-9]+)+?,\ ";"sed -r 's/i2cio\ ([0-9](\.[0-9]+)+?).*$/i2c-tools:\1/'"; +i2cset;;unknown;"i2cset\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/i2cset\ version\ ([0-9](\.[0-9]+)+?).*$/i2c-tools:\1/'"; +ifconfig;;unknown;"ifconfig\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/ifconfig\ ([0-9](\.[0-9]+)+?).*$/ifconfig:\1/'"; +ifdown;;unknown;"ifdown\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/ifdown\ version\ ([0-9](\.[0-9]+)+?).*/ifupdown:\1/'"; +ifquery;;unknown;"ifquery\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/ifquery\ version\ ([0-9](\.[0-9]+)+?).*/ifquery:\1/'"; +ifup;;unknown;"ifup\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/ifup\ version\ ([0-9](\.[0-9]+)+?).*/ifupdown:\1/'"; +igmpproxy;;unknown;"igmpproxy,\ Version\ [0-9](\.[0-9]+)+?";"sed -r 's/igmpproxy,\ Version\ ([0-9](\.[0-9]+)+?).*$/igmpproxy:\1/'"; +igmpproxy;;unknown;"igmpproxy\ versoin\ [0-9](\.[0-9])+?(\ beta)?";"sed -r 's/igmpproxy\ versoin\ ([0-9](\.[0-9]+)+?).*$/igmpproxy:\1/'"; +igmpproxy;;unknown;"^igmpproxy\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/igmpproxy\ ([0-9]+(\.[0-9]+)+?)$/igmpproxy:\1/'"; +imagemagick;;imagemagick-lic;"^Version:\ ImageMagick\ [0-9](\.[0-9]+)+?(-[0-9]+)?\ ";"sed -r 's/Version:\ ImageMagick\ ([0-9](\.[0-9]+)+?(-[0-9]+)?)\ /imagemagick:\1/'"; +inadyn;;GPL-2.0-only;"^Inadyn\ version\ [0-9]+(\.[0-9]+)+?\ ";"sed -r 's/Inadyn\ version\ ([0-9]+(\.[0-9]+)+?)/inadyn:\1/'"; +inadyn;strict;GPL-2.0-only;"Version:\ [0-9]\.[0-9]+-ADV$";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?(-ADV)?)$/inadyn:\1/'"; +info-zip;;Info-ZIP;"\([a-z]+\ UnZip\),\ version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/\([a-z]+\ UnZip\),\ version\ ([0-9](\.[0-9]+)+?)/info-zip:unzip:\1/'"; +info-zip;;Info-ZIP;"UnZip\ [0-9](\.[0-9]+)+?\ of\ [0-9]+\ .*\ [0-9]+,\ by\ Info-ZIP\.\ \ Maintained\ by\ C\.\ Spieler\.\ \ Send";"sed -r 's/UnZip\ ([0-9](\.[0-9]+)+?)\ .*/info-zip:unzip:\1/'"; +info-zip;;Info-ZIP;"UnZip\ [0-9](\.[0-9]+)+?\ of\ .*\ by\ Debian\.\ Original\ by\ Info-ZIP\.";"sed -r 's/UnZip\ ([0-9](\.[0-9]+)+?).*/info-zip:unzip:\1/'"; +info-zip;;Info-ZIP;"Zip\ [0-9](\.[0-9]+)+?\ .*,\ by Info-ZIP";"sed -r 's/Zip\ ([0-9](\.[0-9]+)+?).*/info-zip:zip:\1/'"; +info-zip;;Info-ZIP;"ZipCloak\ [0-9](\.[0-9]+)+?\ .*,\ by Info-ZIP";"sed -r 's/ZipCloak\ ([0-9](\.[0-9]+)+?).*/info-zip:zipcloak:\1/'"; +info-zip;;Info-ZIP;"ZipInfo\ [0-9](\.[0-9]+)+?\ of\ .*\ by\ Greg\ Roelofs\ and\ the\ Info-ZIP\ group\.";"sed -r 's/ZipInfo\ ([0-9](\.[0-9]+)+?).*/info-zip:zip:\1/'"; +info-zip;;Info-ZIP;"ZipNote\ [0-9](\.[0-9]+)+?\ .*,\ by Info-ZIP";"sed -r 's/ZipNote\ ([0-9](\.[0-9]+)+?).*/info-zip:zipnote:\1/'"; +inno_setup;;unknown;"^Inno\ Setup\ Messages\ \([0-9]\.[0-9]\.[0-9]\)\ \(u\)";"sed -r 's/^Inno\ Setup\ Messages\ \(([0-9]\.[0-9]\.[0-9])\)\ \(u\)/jrsoftware:inno_setup:\1/'"; +inotifywatch;;unknown;"^inotifywatch\ [0-9](\.[0-9]+)+?$";"sed -r 's/inotifywatch\ ([0-9](\.[0-9]+)+?)$/inotify-tools:\1/'"; +inotifywait;;unknown;"^inotifywait\ [0-9](\.[0-9]+)+?$";"sed -r 's/inotifywait\ ([0-9](\.[0-9]+)+?)$/inotify-tools:\1/'"; +intel_trusted_device_setup;;unknown;"^Intel\(R\)\ Trusted\ Device\ Setup\ Extension\ Version\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/Intel\(R\)\ Trusted\ Device\ Setup\ Extension\ Version\ ([0-9]+(\.[0-9]+)+?)/intel:trusted_device_setup:\1/'"; +nichestack;;proprietary;^Interniche\ Stack\ v[0-9](\.[0-9]+)+$";"sed -r 's/Interniche\ Stack\ v([0-9](\.[0-9]+)+?)$/hcc-embedded:nichestack:\1/'"; +io-control;;unknown;"FUSE\ library\ version:\ [0-9](\.[0-9]+)+?";"sed -r 's/FUSE\ library\ version:\ ([0-9](\.[0-9]+)+?).*/fuse:\1/'"; +iotgoat;;MIT;"^iotgoat\ v[0-9]\.[0-9]$";"sed -r 's/iotgoat\ v([0-9](\.[0-9]+)+?)$/iotgoat:\1/'"; +iperf;;unknown;"iperf\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/iperf\ version\ ([0-9](\.[0-9]+)+?).*/iperf:\1/'"; +iplink;;commercial;"^ipLink Version: [0-9]\.[0-9]\.[0-9]$";"sed -r 's/ipLink\ Version:\ ([0-9](\.[0-9]+)+?)$/ipcomm:iplink:\1/'"; +iproute2;;GPL-2.0-only;"\ iproute2-[0-9]+(\.[0-9]+)+?$";"sed -r 's/\ iproute2-([0-9]+(\.[0-9]+)+?)$/iproute2:\1/'"; +iproute2;;GPL-2.0-only;"iproute2-ss[0-9]+";"sed -r 's/iproute2-ss([0-9]+).*/iproute2:\1/'"; +iproute2;;GPL-2.0-only;"iproute2-ss(040823)";"sed -r 's/iproute2-ss(040823).*/iproute2:2\.6\.8-\1/'"; +ipsec;;unknown;"^ipsec\ _copyright\ [0-9](\.[0-9]+)+?$";"sed -r 's/ipsec\ _copyright\ ([0-9](\.[0-9]+)+?)$/ipsec:\1/'"; +ipsec;;unknown;"^ipsec\ eroute\ [0-9](\.[0-9]+)+?$";"sed -r 's/ipsec\ eroute\ ([0-9](\.[0-9]+)+?)$/ipsec:\1/'"; +ipsec;;unknown;"^ipsec\ ranbits\ [0-9](\.[0-9]+)+?$";"sed -r 's/ipsec\ ranbits\ ([0-9](\.[0-9]+)+?)$/ipsec:\1/'"; +ipset;;unknown;"^ipset\ v[0-9](\.[0-9]+)+?$";"sed -r 's/ipset\ v([0-9](\.[0-9]+)+?)$/ipset:\1/'"; +ipset;;unknown;"ipset\ v[0-9](\.[0-9]+)+?,\ protocol\ version:\ [0-9]";"sed -r 's/ipset\ v([0-9](\.[0-9]+)+?).*/ipset:\1/'"; +iptables;;GPL-2.0-only;"iptables\ v[1-9](\.[0-9]+)+?([a-z])?$";"sed -r 's/iptables\ v([0-9](\.[0-9]+)+?([a-z])?)$/iptables:\1/'"; +iptables;;GPL-2.0-only;"iptables\ v[1-9](\.[0-9]+)+?([a-z])?";"sed -r 's/iptables\ v([0-9](\.[0-9]+)+?([a-z])?).*/iptables:\1/'"; +iptables;multi_grep;GPL-2.0-only;'"^can't initialize iptables table `%s': %s$"&&"^[1-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/iptables:\1/'"; +ip6tables;;GPL-2.0-only;"ip6tables\ v[1-9](\.[0-9]+)+?$";"sed -r 's/ip6tables\ v([0-9](\.[0-9]+)+?)$/iptables:\1/'"; +iptunnel;;unknown;"iptunnel\ [0-9](\.[0-9]+)+?";"sed -r 's/iptunnel\ ([0-9](\.[0-9]+)+?).*/iptunnel:\1/'"; +ipunz;;commercial;"^ipunz V[0-9]\.[0-9]$";"sed -r 's/ipunz\ V([0-9](\.[0-9]+)+?)$/ipcomm:ipunz:\1/'"; +ipzip;;commercial;"^ipzip V[0-9]\.[0-9]$";"sed -r 's/ipzip\ V([0-9](\.[0-9]+)+?)$/ipcomm:ipzip:\1/'"; +iputils;;unknown;"iputils-s{,3}[0-9]+";"sed -r 's/iputils-s{,3}([0-9]+)$/iputils:\1/'"; +isc-dhclient;;ISC;"Internet\ Systems\ Consortium\ DHCP\ Client\ [0-9](\.[0-9]+)+?([a-z][0-9])?$";"sed -r 's/Internet\ Systems\ Consortium\ DHCP\ Client\ ([0-9](\.[0-9]+)+?([a-z][0-9])?)$/isc:dhcp_client:\1/'"; +isc-dhclient;;ISC;"isc-dhclient-[0-9](\.[0-9]+)+?$";"sed -r 's/isc-dhclient-([0-9](\.[0-9]+)+?)$/isc:dhcp_client:\1/'"; +isc-dhclient;;ISC;"isc-dhclient-[0-9](\.[0-9]+)+?-([ABPabp]|rc|RC)[0-3]$";"sed -r 's/isc-dhclient-([0-9](\.[0-9]+)+?(-([ABPabp]|rc|RC)[0-3])?)$/isc:dhcp_client:\1/'"; +isc-dhclient;;ISC;"isc-dhclient-[0-9](\.[0-9]+)+?-ESV-R[0-9]$";"sed -r 's/isc-dhclient-([0-9](\.[0-9]+)+?(-ESV-R[0-9])?)$/isc:dhcp_client:\1/'"; +isc-dhcpd;no_static;ISC;"Internet\ Systems\ Consortium\ DHCP\ Server\ [0-9](\.[0-9]+)+?([a-z][0-9])?$";"sed -r 's/Internet\ Systems\ Consortium\ DHCP\ Server\ ([0-9](\.[0-9]+)+?([a-z][0-9])?)$/isc:dhcp:\1/'"; +isc-dhcpd;no_static;ISC;"Internet\ Systems\ Consortium\ DHCP\ Server\ [0-9](\.[0-9]+)+?([a-z][0-9])?$";"sed -r 's/Internet\ Systems\ Consortium\ DHCP\ Server\ ([0-9](\.[0-9]+)+?([a-z][0-9])?)$/isc:dhcpd:\1/'"; +isc-dhcpd;no_static;ISC;"isc-dhcpd-[0-9](\.[0-9]+)+?$";"sed -r 's/isc-dhcpd-([0-9](\.[0-9]+)+?)$/isc:dhcp:\1/'"; +isc-dhcpd;no_static;ISC;"isc-dhcpd-[0-9](\.[0-9]+)+?$";"sed -r 's/isc-dhcpd-([0-9](\.[0-9]+)+?)$/isc:dhcpd:\1/'"; +ischroot;;unknown;"ischroot,\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/ischroot,\ version\ ([0-9](\.[0-9]+)+?).*/ischroot:\1/'"; +isisd;;unknown;"^ISISd\ version\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/ISISd\ version\ ([0-9]+(\.[0-9]+)+?)$/isisd:\1/'"; +iwconfig;;unknown;"iwconfig\ \ Version\ [0-9]+$";"sed -r 's/iwconfig(\ )+Version\ ([0-9]+)$/wireless_tools:\2/'"; +iwconfig;;unknown;"iwconfig\ \ Wireless-Tools\ version\ [0-9]+";"sed -r 's/iwconfig(\ )+Wireless-Tools\ version\ ([0-9]+).*/wireless_tools:\2/'"; +iwevent;;unknown;"iwevent\ \ \ Wireless-Tools\ version\ [0-9]+";"sed -r 's/iwevent(\ )+Wireless-Tools\ version\ ([0-9]+).*/wireless_tools:\2/'"; +iwlist;;unknown;"iwlist\ \ \ \ Wireless-Tools\ version\ [0-9]+";"sed -r 's/iwlist(\ )+Wireless-Tools\ version\ ([0-9]+).*/wireless_tools:\2/'"; +iwpriv;;unknown;"iwpriv\ \ \ \ Version\ [0-9]+";"sed -r 's/iwpriv(\ )+Version\ ([0-9]+).*/wireless_tools:\2/'"; +jcpd;;unknown;"^jcpd\ version\ [0-9](\.[0-9]+)+?\ \(JCP\ Ver\ [0-9](\.[0-9]+)+?\)\ started$";"sed -r 's/jcpd\ version\ ([0-9](\.[0-9]+)+?)\ .*/jcpd:\1/'"; +jffsdump;;unknown;"jffs[0-9]?dump\ [0-9](\.[0-9]+)+?$";"sed -r 's/jffs[0-9]?dump\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; +jfsutils;;unknown;"jfs_fscklog\ version\ [0-9](\.[0-9]+)+?,\ ";"sed -r 's/jfs_fscklog\ version\ ([0-9](\.[0-9]+)+?),\ .*/jfsutils:\1/'"; +jfsutils;;unknown;"jfs_tune\ version\ [0-9](\.[0-9]+)+?,\ ";"sed -r 's/jfs_tune\ version\ ([0-9](\.[0-9]+)+?),\ .*/jfsutils:\1/'"; +jigglyp0f;;unknown;"^jigglyp0f\ [0-9](\.[0-9]+)+?$";"sed -r 's/jigglyp0f\ ([0-9](\.[0-9]+)+?)$/jigglyp0f:\1/'"; +jq;;unknown;"^jq-[0-9](\.[0-9]+)+?$";"sed -r 's/jq-([0-9](\.[0-9]+)+?)$/jq_project:jq:\1/'"; +jquery;;MIT;"jQuery\ JavaScript\ Library\ v[0-9](\.[0-9]+)+?";"sed -r 's/jQuery\ JavaScript\ Library\ v([0-9](\.[0-9]+)+?)$/jquery:\1/'"; +jquery;;MIT;"jQuery\ v[0-9](\.[0-9]+)+?\ jquery\.com\ ";"sed -r 's/jQuery\ v([0-9](\.[0-9]+)+?)\ .*/jquery:\1/'"; +kbd;;unknown;"\ from\ kbd\ [0-9](\.[0-9]+)+?";"sed -r 's/\ from\ kbd\ ([0-9](\.[0-9]+)+?).*/kbd-project:kbd:\1/'"; +keepalived;;unknown;"^Keepalived\ v[0-9](\.[0-9]+)+a?\ ";"sed -r 's/Keepalived\ v([0-9](\.[0-9]+)+?)/keepalived:\1/'"; +sentron_pac;multi_grep;unknown;'"^PAC3200$"&&"^Siemens AG$"&&"^V[0-9](\.[0-9]+)+?$"';"sed -r 's/V([0-9](\.[0-9]+)+?)$/siemens:sentron_pac3200:\1/'"; +sentron_pac;multi_grep;unknown;'"^PAC4200$"&&"^Siemens AG$"&&"^V[0-9](\.[0-9]+)+?$"';"sed -r 's/V([0-9](\.[0-9]+)+?)$/siemens:sentron_pac4200:\1/'"; +sentron_pac;multi_grep;unknown;'"^PAC2200$"&&"^Siemens AG$"&&"^V[0-9](\.[0-9]+)+?$"';"sed -r 's/V([0-9](\.[0-9]+)+?)$/siemens:sentron_pac2200:\1/'"; +sentron_pac;multi_grep;unknown;'"^PAC[0-9]+$"&&"^Siemens AG$"&&"^V[0-9](\.[0-9]+)+?$"';"sed -r 's/V([0-9](\.[0-9]+)+?)$/siemens:sentron_pac:\1/'"; +sysklogd;;GPL-3.0-only;"klogd\ [0-9](\.[0-9]+)+?$";"sed -r 's/klogd\ ([0-9](\.[0-9]+)+?)$/klogd:\1/'"; +sysklogd;;GPL-3.0-only;"klogd\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/klogd\ version\ ([0-9](\.[0-9]+)+?).*/klogd:\1/'"; +kmod;;unknown;"kmod\ version\ [0-9]+$";"sed -r 's/kmod\ version\ ([0-9]+)$/kmod:\1/'"; +kmod;;unknown;"^depmod\ (version\ )?[0-9](\.[0-9]+)+?$";"sed -r 's/depmod\ (version\ )?([0-9](\.[0-9]+)+?)$/kmod:\2/'"; +kmod;;unknown;"^insmod\ (version\ )?[0-9](\.[0-9]+)+?$";"sed -r 's/insmod\ (version\ )?([0-9](\.[0-9]+)+?)$/kmod:\2/'"; +kmod;;unknown;"^lsmod\ (version\ )?[0-9](\.[0-9]+)+?$";"sed -r 's/lsmod\ (version\ )?([0-9](\.[0-9]+)+?)$/kmod:\2/'"; +kmod;;unknown;"^modinfo\ (version\ )?[0-9](\.[0-9]+)+?$";"sed -r 's/modinfo\ (version\ )?([[0-9](\.[0-9]+)+?)$/kmod:\2/'"; +roaring-l2tpd;;GPL-2.0-only;"l2tpd\ Version\ [0-9]\.[0-9]+\ Copyright\ [0-9]+\ Roaring\ Penguin\ Software\ Inc\.";"sed -r 's/l2tpd\ Version\ ([0-9](\.[0-9]+)+?).*Roaring\ Penguin\ Software\ Inc\./roaring_penguin:l2tpd:\1/'"; +l2tpd;;GPL-2.0-only;"l2tpd\ version\ [0-9](\.[0-9]+)+?\ started\ on\ ";"sed -r 's/l2tpd\ version\ ([0-9](\.[0-9]+)+?)\ .*/roaring_penguin:l2tpd:\1/'"; +l2tpd;;GPL-2.0-only;"l2tpd\ Version\ [0-9](\.[0-9]+)+?(-rtn)?\ Copyright\ [0-9]+\ Roaring\ Penguin\ Software\ Inc\.";"sed -r 's/l2tpd\ Version\ ([0-9](\.[0-9]+)+?).*/roaring_penguin:l2tpd:\1/'"; +openldap;;OLDAP-2.8;"OpenLDAP:\ ldap[a-z]+\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/OpenLDAP:\ ldap[a-z]+\ ([0-9](\.[0-9]+)+?)\ .*/openldap:\1/'"; +ld-musl-armhf.so.1;strict;unknwon;"^Version\ [0-9](\.[0-9]+)+?$";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?)$/musl-libc:musl:\1/'"; +lesskey;;GPL-3.0-only;"lesskey\ \ version\ [0-9]+$";"sed -r 's/lesskey\ \ version\ ([0-9]+)$/less:\1/'"; +less;;GPL-3.0-only AND BSD-2-Clause;"^less\ [0-9]+\ ";"sed -r 's/less\ ([0-9]+).*/less:\1/'"; +less;;GPL-3.0-only AND BSD-2-Clause;"^less\ [0-9]+$";"sed -r 's/less\ ([0-9]+)$/less:\1/'"; +libarchive;;unknown;"libarchive\ [0-9](\.[0-9]+)+?";"sed -r 's/libarchive\ ([0-9](\.[0-9]+)+?)/libarchive:\1/'"; +libcurl;;curl;"CLIENT\ libcurl\ [0-9](\.[0-9]+)+?";"sed -r 's/CLIENT\ libcurl\ ([0-9](\.[0-9]+)+?).*/libcurl:\1/'"; +libcurl;;curl;"^libcurl\/[0-9](\.[0-9]+)+?$";"sed -r 's/libcurl\/([0-9](\.[0-9]+)+?)$/libcurl:\1/'"; +libdbus;;unknown;"^libdbus\ [0-9](\.[0-9]+)+?$";"sed -r 's/libdbus\ ([0-9](\.[0-9]+)+?)$/freedesktop:dbus:\1/'"; +libdev;multi_grep;unknown;'"^libdev$"&&"libev:\ loop\ to\ be\ embedded\ is\ not\ embeddable"&&"^[0-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/libdev:\1/'"; +libexpat;;MIT;"expat_[0-9]\.[0-9]+\.[0-9]+$";"sed -r 's/expat_([0-9](\.[0-9]+)+?)$/expat:\1/'"; +libgcrypt;;LGPL-2.1-or-later;"[Ll]ibgcrypt\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/[Ll]ibgcrypt\ ([0-9](\.[0-9]+)+?)\ .*/libgcrypt:\1/'"; +libgcrypt;;LGPL-2.1-or-later;"[Ll]ibgcrypt\ [0-9](\.[0-9]+)+?$";"sed -r 's/[Ll]ibgcrypt\ ([0-9](\.[0-9]+)+?)$/libgcrypt:\1/'"; +libgcrypt;;LGPL-2.1-or-later;"[Ll]ibgcrypt\ [0-9](\.[0-9]+)+?(-[a-z]+)?$";"sed -r 's/[Ll]ibgcrypt\ ([0-9](\.[0-9]+)+?(-[a-z]+)?)$/libgcrypt:\1/'"; +libgcrypt;;LGPL-2.1-or-later;"^This\ is\ Libgcrypt\ [0-9]\.([0-9]+)+?\ -\ The\ GNU\ Crypto\ Library$";"sed -r 's/This\ is\ [Ll]ibgcrypt\ ([0-9](\.[0-9]+)+?)\ .*/libgcrypt:\1/'"; +libgmp;multi_grep;LGPL-3.0-only OR GPL-2.0-only;'"^GNU MP assertion failed: %s$"&&"^[0-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/gmplib:\1/'"; +libgpiod;;LGPL-2.1-only;"^gpiofind\ \(libgpiod\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/gpiofind\ \(libgpiod\)\ [0-9](\.[0-9]+)+?)$/libgpiod:\1/'"; +libgpiod;;LGPL-2.1-only;"^gpioinfo\ \(libgpiod\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/gpioinfo\ \(libgpiod\)\ [0-9](\.[0-9]+)+?)$/libgpiod:\1/'"; +libgpiod;;LGPL-2.1-only;"^gpiomon\ \(libgpiod\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/gpiomon\ \(libgpiod\)\ [0-9](\.[0-9]+)+?)$/libgpiod:\1/'"; +libsoup;;LGPL-2.0-or-later;"^libsoup\/[0-9](\.[0-9]+)+?$";"sed -r 's/^libsoup\/([0-9](\.[0-9]+)+?)$/libsoup:\1/'"; +libharfbuzz.so.0;multi_grep;MIT;'"^void hb_serialize_context_t::resolve_links()$"&&"^hb_blob_destroy$"&&"^[0-9]\.[0-9](\.[0-9]+)+?$"';"sed -r 's/^([0-9]\.[0-9](\.[0-9]+)+?)/harfbuzz_project:harfbuzz:\1/'"; +libidn2;multi_grep;unknown;'"^IDN2_UNKNOWN$"&&"^[0-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/libidn2:\1/'"; +libjpeg;;BSD-3-Clause AND IJG AND Zlib;"Independent\ JPEG\ Group.s\ CJPEG,\ version\ [0-9][a-z]\ \ [0-9]+-[A-Za-z]+-[0-9]+$";"sed -r 's/Independent\ JPEG\ Group.s\ CJPEG,\ version\ ([0-9][a-z])\ .*/libjpeg:\1/'"; +libjpeg-turbo;;BSD-3-Clause AND IJG AND Zlib;"^libjpeg-turbo\ version\ [0-9](\.[0-9]+)+?\ \(build\ [0-9]+\)$";"sed -r 's/libjpeg-turbo\ version\ ([0-9](\.[0-9]+)+?)\ .*/libgjpeg-turbo:\1/'"; +libjson-c;multi_grep;MIT;'"^INTERNAL ERROR: _json_c_visit"&&"^[0-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/json-c:\1/'"; +liblz4.so;multi_grep;unknown;'"^LZ4_freeStreamHC$"&&"^liblz4.so.1$"&&"^[0-9](\.[0-9]+)+?$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/liblz4:\1/'"; +liblzma;;public-domain;"liblzma\ [0-9](\.[0-9]+)+?$";"sed -r 's/liblzma\ ([0-9](\.[0-9]+)+?)$/liblzma:\1/'"; +liblzma;multi_grep;public-domain;'"^g\[TNIEB\?=:864310\.\-\,\+\*\)\('&\%\\$\#\"\"\!"&&"^lzma_index_stream_padding$"&&"^[0-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/liblzma:\1/'"; +libmicrohttpd.so.12;strict;LGPL-2.1-or-later;"^[0-9]\.[0-9](\.[0-9]+)+?$";"sed -r 's/^([0-9]\.[0-9](\.[0-9]+)+?)/gnu:libmicrohttpd:\1/'"; +libnghttp2;multi_grep;MIT;'"^stream->state == NGHTTP2_STREAM_IDLE$"&&"^[0-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/nghttp2:\1/'"; +libnss3;multi_grep;unknown;'"nss_DumpCertificateCacheInfo"&&"^[0-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/libnss3:\1/'"; +libopencv_core;multi_grep;unknown;'"^OpenCV\(%s\) Error: %s \(%s\) in %s, file %s, line %d$"&&"General\ configuration\ for\ OpenCV\ [0-9](\.[0-9]+)+?\ =+"';"sed -r 's/^General configuration for OpenCV ([0-9]+\.[0-9]+\.[0-9]+) .*/opencv:\1/'"; +libpcap;;BSD-3-Clause;"^libpcap\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/libpcap\ version\ ([0-9](\.[0-9]+)+?)$/libpcap:\1/'"; +libpcre;multi_grep;BSD-3-Clause;'"^this version of PCRE is"&&"^[0-9]+\.[0-9]+ [0-9]{4}-[0-9]{2}-[0-9]{2}$"';"sed -r 's/^([0-9]+\.[0-9]+) [0-9]{4}-[0-9]{2}-[0-9]{2}$/pcre:\1/'"; +libpng;;Libpng;"libpng\ version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/libpng\ version\ ([0-9](\.[0-9]+)+?)\ .*/libpng:\1/'"; +libreswan;;GPL-2.0-only;"^Libreswan\ [\.0-9]+";"sed -r 's/Libreswan\ ([0-9](\.[0-9]+)+?).*/libreswan:\1/'"; +libsensors;;unknown;"libsensors\ version\ [\.0-9]+$";"sed -r 's/libsensors\ version\ ([0-9](\.[0-9]+)+?)$/libsensors:\1/'"; +libtiff;;unknown;"^LIBTIFF,\ Version\ [0-9](\.[0-9]+)+?$";"sed -r 's/LIBTIFF,\ Version\ ([0-9](\.[0-9]+)+?)$/libtiff:libtiff:\1/'"; +libtasn;multi_grep;unknown;'"LIBTASN1 ERROR:"&&"^[0-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/libtasn1:\1/'"; +libxml2;multi_grep;MIT;'"^Fatal: program compiled against libxml %d using libxml %d$"&&"^2[0-9]{4}$"';"sed -r 's/^2([0-9]{2})([0-9]{2})$/libxml2:2.\1.\2/'"; +lighttpd;;bsd;"^lighttpd\/[0-9](\.[0-9]+)+?\ .*\ -\ a\ light\ and\ fast\ webserver$";"sed -r 's/lighttpd\/([0-9](\.[0-9]+)+?)\ .*/lighttpd:\1/'"; +lighttpd;live;bsd;"^lighttpd\/[0-9](\.[0-9]+)+?(-devel-[0-9]+[A-Z])?$";"sed -r 's/lighttpd\/([0-9](\.[0-9]+)+?).*/lighttpd:\1/'"; +lighttpd;;BSD-3-Clause;"^lighttpd-[0-9](\.[0-9]+)+?\ \-\ a\ light\ and\ fast\ webserver$";"sed -r 's/lighttpd-([0-9](\.[0-9]+)+?)\ .*/lighttpd:\1/'"; +lighttpd;;BSD-3-Clause;"^lighttpd-[0-9](\.[0-9]+)+?\ \(.*\)\ \-\ a\ light\ and\ fast\ webserver$";"sed -r 's/lighttpd-([0-9](\.[0-9]+)+?)\ .*/lighttpd:\1/'"; +lighttpd;;BSD-3-Clause;"lighttpd-[0-9](\.[0-9]+)+?$";"sed -r 's/lighttpd-([0-9](\.[0-9]+)+?)$/lighttpd:\1/'"; +lighttpd;;BSD-3-Clause;"^lighttpd [0-9](\.[0-9]+)+?";"sed -r 's/lighttpd ([0-9](\.[0-9]+)+?)/lighttpd:\1/'"; +lighttpd;;BSD-3-Clause;"^lighttpd\/[0-9](\.[0-9]+)+?(-devel)?(-[0-9]+[A-Za-z]+)?.*\ -\ a\ light\ and\ fast\ webserver$";"sed -r 's/lighttpd\/([0-9](\.[0-9]+)+?).*/lighttpd:\1/'"; +lighttpd;;BSD-3-Clause;"^server\ started\ \(lighttpd\/[0-9](\.[0-9]+)+?\)$";"sed -r 's/server\ started\ \(lighttpd\/([0-9](\.[0-9]+)+?)\)$/lighttpd:\1/'"; +linux_kernel;;GPL-2.0-only;"^Linux-[1-6]\.[0-9]+\.[0-9]+";"sed -r 's/Linux-([1-6](\.[0-9]+)+?).*/linux_kernel:\1/'"; +linux_kernel;;GPL-2.0-only;"Linux\ kernel\ version\ [1-6]\.[0-9]+\.[0-9]+\ ";"sed -r 's/Linux\ kernel\ version\ ([1-6](\.[0-9]+)+?)\ .*/linux_kernel:\1/'"; +linux_kernel;;GPL-2.0-only;"Linux\ kernel\ version\ [1-6]\.[0-9]+\.[0-9]+$";"sed -r 's/Linux\ kernel\ version\ ([1-6](\.[0-9]+)+?)$/linux_kernel:\1/'"; +linux_kernel;;GPL-2.0-only;"Linux\ version\ [1-6]\.[0-9]+\.[0-9]+\ ";"sed -r 's/Linux\ version\ ([1-6](\.[0-9]+)+?)\ .*/linux_kernel:\1/'"; +linux_kernel;;GPL-2.0-only;"Linux\ version\ [1-6]\.[0-9]+\.[0-9]+$";"sed -r 's/Linux\ version\ ([1-6](\.[0-9]+)+?)$/linux_kernel:\1/'"; +linuxptp;multi_grep;GPL-2.0-only;'"^PTP_CLOCK_GETCAPS$"&&"^PTP_PIN_SETFUNC2\ failed:\ \%m$"&&"^[0-9](\.[0-9]+)+?$"';"sed -r 's/([0-9](\.[0-9]+)+?)/linuxptp_project:linuxptp:\1/'"; +lldpd;;unknown;"^Version:\ lldpd\ [0-9](\.[0-9]+)+$";"sed -r 's/Version:\ lldpd\ ([0-9](\.[0-9]+)+?)$/lldpd:\1/'"; +llmnresp;;unknown;"^llmnresp\ versoin\ [0-9](\.[0-9]+)+?$";"sed -r 's/llmnresp\ versoin\ ([0-9](\.[0-9]+)+?)$/llmnresp:\1/'"; +lnstat;;unknown;"lnstat\ Version\ [0-9]\.[0-9]+(\ [0-9]+)?$";"sed -r 's/lnstat\ Version\ ([0-9](\.[0-9]+)+?).*/lnstat:\1/'"; +loadkeys;;unknown;"loadkeys\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/loadkeys\ version\ ([0-9](\.[0-9]+)+?)/loadkeys:\1/'"; +localedef;;unknown;"localedef\ \(.*\)\ [0-9](\.[0-9]+)+?";"sed -r 's/localedef\ \(.*\)\ ([0-9](\.[0-9]+)+?)/localedef:\1/'"; +logd;;unknown;"^logd\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/logd\ version\ ([0-9](\.[0-9]+)+?).*/logd:\1/'"; +logger;;unknown;"logger\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/logger\ version\ ([0-9](\.[0-9]+)+?).*/logger:\1/'"; +logrotate;;unknown;"logrotate\ [0-9](\.[0-9]+)+?\ -\ Copyright.*Red\ Hat,\ Inc\.$";"sed -r 's/logrotate\ ([0-9](\.[0-9]+)+?).*/logrotate:\1/'"; +logrotate;;unknown;"logrotate\ [0-9](\.[0-9]+)+?$";"sed -r 's/logrotate\ ([0-9](\.[0-9]+)+?)$/logrotate:\1/'"; +lrzsz;;unknown;"lrzsz.\ [\.rc0-9]+$";"sed -r 's/lrzsz.\ ([\.rc0-9]+)$/lrzsz:\1/'"; +lsattr;;unknown;"lsattr\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/lsattr\ ([0-9](\.[0-9]+)+?)\ .*/lsattr:\1/'"; +lsof;;lsof;"lsof\ [0-9](\.[0-9]+)+?$";"sed -r 's/lsof\ ([0-9](\.[0-9]+)+?)$/lsof:\1/'"; +lspci;;unknown;"lspci\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/lspci\ version\ ([0-9](\.[0-9]+)+?)/pciutils:\1/'"; +lsusb;;unknown;"lsusb\ \(usbutils\)\ [0-9]+";"sed -r 's/lsusb\ \(usbutils\)\ ([0-9]+)/usbutils:\1/'"; +# this looks false positive prone: +# lua;;MIT;"^Lua\ [0-9](\.[0-9]+)+?$";"sed -r 's/Lua\ ([0-9](\.[0-9]+)+?)$/lua:\1/'"; +lua;;MIT;"^\$Lua:\ Lua\ [0-9](\.[0-9]+)+?\ .*";"sed -r 's/.*Lua\ ([0-9](\.[0-9]+)+?)\ .*/lua:\1/'"; +lua;;MIT;"^liblua\.so\.[0-9](\.[0-9]+)+?$";"sed -r 's/liblua\.so\.([0-9](\.[0-9]+)+?)$/lua:\1/'"; +lua;;MIT;"^Lua\ [0-9](\.[0-9]+)+?\ \ Copyright\ .*";"sed -r 's/^Lua\ ([0-9](\.[0-9]+)+?)\ \ .*/lua:\1/'"; +lvm2;;unknown;"^lvmetad\ version:\ [0-9](\.[0-9]+)+?";"sed -r 's/lvmetad\ version:\ ([0-9](\.[0-9]+)+?)/lvm:lvmetad:\1/'"; +lvm2;;unknown;"^lvmpolld\ version:\ [0-9](\.[0-9]+)+?";"sed -r 's/lvmpolld\ version:\ ([0-9](\.[0-9]+)+?)/lvm:lvmpolld:\1/'"; +macping;;GPL-2.0-only;"MAC-Ping\ [0-9](\.[0-9]+)+?";"sed -r 's/MAC-Ping\ ([0-9](\.[0-9]+)+?).*/mac-ping:\1/'"; +mactelnet;;GPL-2.0-only;"MAC-Telnet\ [0-9](\.[0-9]+)+?";"sed -r 's/MAC-Telnet\ ([0-9](\.[0-9]+)+?).*/mac-telnet:\1/'"; +madwimax;;unknown;"madwimax\ [0-9](\.[0-9]+)+?";"sed -r 's/madwimax\ ([0-9](\.[0-9]+)+?)/madwimax:\1/'"; +mailsend;;unknown;"mailsend\ v[0-9](\.[0-9]+)+?([a-z][0-9]+)?$";"sed -r 's/mailsend\ v([0-9](\.[0-9]+)+?([a-z][0-9]+)?)$/mailsend:\1/'"; +mailsend;;unknown;"^mailsend\ Version\:\ .*\ v[0-9](\.[0-9]+)+?([a-z][0-9]+)?$";"sed -r 's/mailsend\ Version:\ .*\ v([0-9](\.[0-9]+)+?([a-z][0-9]+)?)$/mailsend:\1/'"; +make;;unknown;"GNU\ Make\ [0-9](\.[0-9]+)+?$";"sed -r 's/GNU\ Make\ ([0-9](\.[0-9]+)+?)$/gnu:make:\1/'"; +makedevs;;unknown;"^makedevs\ revision\ [0-9](\.[0-9]+)+?$";"sed -r 's/makedevs\ revision\ ([0-9](\.[0-9]+)+?)$/makedevs:\1/'"; +man-db;;GPL-3.0-or-later;"catman\ [0-9](\.[0-9]+)+?$";"sed -r 's/catman\ ([0-9](\.[0-9]+)+?)$/man-db:\1/'"; +man-db;;GPL-3.0-or-later;"globbing\ [0-9](\.[0-9]+)+?$";"sed -r 's/globbing\ ([0-9](\.[0-9]+)+?)$/man-db:\1/'"; +man-db;;GPL-3.0-or-later;"lexgrog\ [0-9](\.[0-9]+)+?$";"sed -r 's/lexgrog\ ([0-9](\.[0-9]+)+?)$/man-db:\1/'"; +man-db;;GPL-3.0-or-later;"mandb\ [0-9](\.[0-9]+)+?$";"sed -r 's/mandb\ ([0-9](\.[0-9]+)+?)$/man-db:\1/'"; +man-db;;GPL-3.0-or-later;"manpath\ [0-9](\.[0-9]+)+?$";"sed -r 's/manpath\ ([0-9](\.[0-9]+)+?)$/man-db:\1/'"; +mbim-proxy;;unknown;"^mbim-proxy\ [0-9](\.[0-9]+)+$";"sed -r 's/mbim-proxy\ ([0-9](\.[0-9]+)+?)$/mbim-proxy:\1/'"; +mcad;;unknown;"Management\ Console\ Agent\ v[0-9]\.[0-9]+\ \(c\)\ Ubiquiti\ Networks,\ Inc\.$";"sed -r 's/Management\ Console\ Agent\ v([0-9](\.[0-9]+)+?)\ .*/ubiquiti:console_agent:\1/'"; +mdadm;;unknown;"^mdadm\ -\ v[0-9](\.[0-9]+)+?\ -\ ";"sed -r 's/mdadm\ -\ v([0-9](\.[0-9]+)+?)\ .*/mdadm:\1/'"; +mdns-repeater;;unknown;"mDNS\ repeater\ \(version\ [0-9](\.[0-9]+)+?\)$";"sed -r 's/mDNS\ repeater\ \(version\ ([0-9](\.[0-9]+)+?)\)$/mdnsrepeater:\1/'"; +memtester;;gpl;"memtester\ version\ [0-4](\.[0-9]+)+?\ ";"sed -r 's/memtester\ version\ ([0-4](\.[0-9]+)+?)\ /memtester:\1/'"; +memtester;;proprietary;"memtester\ version\ [5-9](\.[0-9]+)+?\ ";"sed -r 's/memtester\ version\ ([5-9](\.[0-9]+)+?)\ /memtester:\1/'"; +midnight_commander;;GPL-3.0-only;"GNU\ Midnight\ Commander\ [0-9](\.[0-9]+)+?";"sed -r 's/GNU\ Midnight\ Commander\ ([0-9](\.[0-9]+)+?)/gnu:midnight_commander:\1/'"; +mii-tool;;GPL-2.0-only;"mii-tool\.c\ [0-9]\.[0-9]+\ .*\ \(David\ Hinds\)";"sed -r 's/mii-tool\.c\ ([0-9](\.[0-9]+)+?)\ .*/net-tools:mii-tool:\1/'"; +mikrotik-routeros;;;"MikroTik\ routerOS\ V[0-9]\.[0-9]+\ \(c\) [0-9]+-[0-9].*";"sed -r 's/.*MikroTik\ routerOS\ V([0-9]\.[0-9]+)\ .*/mikrotik:routeros:\1/'"; +minicom;;GPL-2.0-only;"minicom\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/minicom\ version\ ([0-9](\.[0-9]+)+?)$/minicom:\1/'"; +minidlna;;GPL-2.0-only;"^Starting\ MiniDLNA\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/Starting\ MiniDLNA\ version\ ([0-9](\.[0-9]+)+?)/minidlna:\1/'"; +minidlna;live;GPL-2.0-only;"^MiniDLNA\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/MiniDLNA\ ([0-9](\.[0-9]+)+?)\ .*/minidlna:\1/'"; +minidlna;multi_grep;unknown;'"MiniDLNA is already running. EXITING."&&"^[0-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/minidlna:\1/'"; +mini_httpd;;unknown;"mini_httpd\/[0-9](\.[0-9]+)+?(\ [0-9]+)?";"sed -r 's/mini_httpd\/([0-9](\.[0-9]+)+?).*/acme:mini_httpd:\1/'"; +mini_httpd;live;unknown;"mini_httpd\ [0-9](\.[0-9]+)+?(\ [0-9]+)?";"sed -r 's/mini_httpd\ ([0-9](\.[0-9]+)+?).*/acme:mini_httpd:\1/'"; +miniupnpd;;unknown;"SERVER:.*UPnP\/[0-9](\.[0-9]+)+?\ MiniUPnPd\/[0-9](\.[0-9]+)+?$";"sed -r 's/SERVER:.*UPnP\/[0-9](\.[0-9]+)+?\ MiniUPnPd\/([0-9](\.[0-9]+)+?)$/miniupnpd:\2/'"; +miniupnpd;live;unknown;"MiniUPnP\ [0-9](\.[0-9]+)+?\ ;"sed -r 's/MiniUPnP\ ([0-9](\.[0-9]+)+?)\ .*/miniupnpd:\1/'"; +miniupnpd;;unknown;"^miniupnpd\ [0-9](\.[0-9]+)+?\ ;"sed -r 's/^miniupnpd\ ([0-9](\.[0-9]+)+?)\ .*/miniupnpd:\1/'"; +mkconfig;;unknown;"^mkconfig\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/mkconfig\ version\ ([0-9](\.[0-9]+)+?)$/mkconfig:\1/'"; +mke2fs;;unknown;"^mke2fs\ [0-9](\.[0-9]+)+?";"sed -r 's/mke2fs\ ([0-9](\.[0-9]+)+?)/e2fsprogs:\1/'"; +mkfs.jffs;;unknown;"mkfs\.jffs[0-9]:\ error!:\ revision\ [0-9]\.[0-9]+$";"sed -r 's/mkfs\.jffs[0-9]:\ error!:\ revision\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; +mkfs.jffs2;;unknown;"mkfs\.jffs2.*revision\ [0-9]\.[0-9]+$";"sed -r 's/mkfs\.jffs[0-9].*revision\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; +mkfs.jffs2;;unknown;"mkfs\.jffs2\ revision\ [0-9](\.[0-9]+)+?";"sed -r 's/mkfs\.jffs[0-9]\ revision\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; +mkfs.xfs;;unknown;"^mkfs\.xfs\ version\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/mkfs\.xfs\ version\ ([0-9]+(\.[0-9]+)+?)$/xfsprogs:\1/'"; +mkfs.fat;;GPL-3.0-only;"^mkfs\.fat\ [0-9]+(\.[0-9]+)+?";"sed -r 's/mkfs\.fat\ ([0-9]+(\.[0-9]+)+?).*/dosfstools:\1/'"; +mkdosfs;;GPL-3.0-only;"^mkdosfs\ [0-9](\.[0-9]+)+?\ \([0-9]+\ .*\ [0-9]+\)$";"sed -r 's/mkdosfs\ ([0-9](\.[0-9]+)+?).*/mkdosfs:\1/'"; +fsck.fat;;GPL-3.0-only;"^fsck\.fat\ [0-9]+(\.[0-9]+)+?";"sed -r 's/fsck\.fat\ ([0-9]+(\.[0-9]+)+?).*/dosfstools:\1/'"; +fatlabel;;GPL-3.0-only;"^fatlabel\ [0-9]+(\.[0-9]+)+?";"sed -r 's/fatlabel\ ([0-9]+(\.[0-9]+)+?).*/dosfstools:\1/'"; +mklost_plus_found;;unknown;"^mklost\+found\ [0-9]+(\.[0-9]+)+?\ \(.*\)$";"sed -r 's/mklost\+found\ ([0-9]+(\.[0-9]+)+?).*/e2fsprogs:\1/'"; +mkntfs;;GPL-2.0-only;"mkntfs\ (v)?[0-9]+(\.[0-9]+)+?";"sed -r 's/mkntfs\ v?([0-9]+(\.[0-9]+)+?).*/ntfsprogs:\1/'"; +mkpasswd;;unknown;"mkpasswd\ [0-9](\.[0-9]+)+?";"sed -r 's/mkpasswd\ ([0-9](\.[0-9]+)+?).*/mkpasswd:\1/'"; +mkreiserfs;;unknown;"mkreiserfs\ [0-9](\.[0-9]+)+?$";"sed -r 's/mkreiserfs\ ([0-9](\.[0-9]+)+?)$/reiserfsck:\1/'"; +modem;strict;unknown;"Version\ [0-9]\.[0-9]+\.[0-9]+";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?)$/modem:\1/'"; +module-init-tools;;unknown;"module-init-tools\ [0-9]\.[0-9]+$";"sed -r 's/module-init-tools\ ([0-9](\.[0-9]+)+?)$/module-init-tools:\1/'"; +mosquitto;;EPL-2.0;"^mosquitto\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/mosquitto\ version\ ([0-9](\.[0-9]+)+?).*/eclipse:mosquitto:\1/'"; +mount;;unknown;"^mount:\ mount-[0-9](\.[0-9]+)+?([a-z])?$";"sed -r 's/mount:\ mount-([0-9](\.[0-9]+)+?([a-z])?)$/mount:\1/'"; +# The mongo shell is included as part of the MongoDB server installation: +mongodb;;unknown;"^MongoDB\ shell\ version\ v[0-9](\.[0-9]+)+?$";"sed -r 's/MongoDB\ shell\ version v([0-9](\.[0-9]+)+?)$/mongodb:mongodb:\1/'"; +mongodb;;unknown;"^db\ version\ v[0-9](\.[0-9]+)+?$";"sed -r 's/db\ version\ v([0-9](\.[0-9]+)+?)$/mongodb:mongodb:\1/'"; +mpicalc;;unknown;"mpicalc\ [0-9]\.[0-9]+";"sed -r 's/mpicalc\ ([0-9](\.[0-9]+)+?)/mpicalc:\1/'"; +msmtp;;unknown;"^msmtp version [0-9](\.[0-9]+)+?$";"sed -r 's/^msmtp version ([0-9](\.[0-9]+)+?)$/martin_lambers:msmtp:\1/'"; +mtd-utils;;GPL-2.0-only;"mtdinfo\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/mtdinfo\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; +mtd-utils;;GPL-2.0-only;"\(mtd-utils\)\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/\(mtd-utils\)\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; +mtd-utils;;GPL-2.0-only;"nanddump\ [0-9](\.[0-9]+)+?$";"sed -r 's/nanddump\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; +mtd-utils;;GPL-2.0-only;"nanddump\ \$Revision:\ [0-9](\.[0-9]+)+?\ \$$";"sed -r 's/nanddump\ \$Revision:\ ([0-9](\.[0-9]+)+?)\ .*/mtd-utils:\1/'"; +mtd-utils;;GPL-2.0-only;"nandwrite\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/nandwrite\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; +mtd-utils;;GPL-2.0-only;"ubiattach\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/ubiattach\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; +mtd-utils;;GPL-2.0-only;"ubiblock\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/ubiblock\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; +mtd-utils;;GPL-2.0-only;"ubicrc32\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/ubicrc32\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; +mtd-utils;;GPL-2.0-only;"ubidetach\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/ubidetach\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; +mtd-utils;;GPL-2.0-only;"ubiformat\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/ubiformat\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; +mtd-utils;;GPL-2.0-only;"ubimkvol\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/ubimkvol\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; +mtd-utils;;GPL-2.0-only;"ubinfo\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/ubinfo\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; +mtd-utils;;GPL-2.0-only;"ubinize\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/ubinize\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; +mtd-utils;;GPL-2.0-only;"ubirmvol\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/ubirmvol\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; +mtd-utils;;GPL-2.0-only;"ubiupdatevol\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/ubiupdatevol\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; +mtd-utils;;GPL-2.0-only;"ubiupdatevol\ version\ [0-9](\.[0-9]+)+?\ -\ a\ tool\ to\ write\ data\ to\ UBI\ volumes\.$";"sed -r 's/ubiupdatevol\ version\ ([0-9](\.[0-9]+)+?)\ .*/mtd-utils:\1/'"; +mtr;strict;unknown;"^mtr\ [0-9]\.[0-9]+$";"sed -r 's/mtr\ ([0-9](\.[0-9]+)+?)$/mtr:mtr:\1/'"; +nameresolv;;unknown;"nameresolv\ versoin\ [0-9](\.[0-9]+)+?$";"sed -r 's/nameresolv\ versoin\ ([0-9](\.[0-9]+)+?)$/nameresolv:\1/'"; +nano;;GPL-3.0-only;"GNU\ nano,\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/GNU\ nano,\ version\ ([0-9](\.[0-9]+)+?)$/gnu:nano:\1/'"; +nano;;GPL-3.0-only;"GNU\ nano,\ version\ [0-9](\.[0-9]+)+?\ \(compiled\ .*\)$";"sed -r 's/GNU\ nano,\ version\ ([0-9](\.[0-9]+)+?)\ .*/gnu:nano:\1/'"; +nbtscan;;unknown;"^NBTscan\ version\ [0-9](\.[0-9]+)+?\.\ Copyright\ \(C\)\ 1999-200[0-9]\ Alla\ Bezroutchko\.$";"sed -r 's/NBTscan\ version\ ([0-9](\.[0-9]+)+?).*/nbtscan:\1/'"; +nc.traditional;strict;unknown;"\[v[0-9]\.[0-9]+-[0-9]+\]$";"sed -r 's/\[v([0-9](\.[0-9]+)+?(-[0-9]+)?)\]$/nc.traditional:\1/'"; +ncurses;;X11;"ncurses\ [0-9](\.[0-9]+)+?";"sed -r 's/ncurses\ ([0-9](\.[0-9]+)+?).*/gnu:ncurses:\1/'"; +nero_boot_loader;;unknown;"^Nero\ Boot-Loader\ V[0-9]+\.[0-9]+$";"sed -r 's/Nero\ Boot-Loader\ V([0-9]+\.[0-9]+)/nero:boot_loader:\1/'"; +netatalk;;GPL-2.0-only;"^cnid_dbd\ \(Netatalk\ [0-9](\.[0-9]+)+?\)$";"sed -r 's/cnid_dbd\ \(Netatalk\ ([0-9](\.[0-9]+)+?)\)$/netatalk:\1/'"; +ndppd;;GPL-3.0-only;"ndppd\ \(NDP\ Proxy\ Daemon\)\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/ndppd\ \(NDP\ Proxy\ Daemon\)\ version\ ([0-9](\.[0-9]+)+?).*/ndppd:\1/'"; +#netgear_facebook_captive_portal;;unknown;"NETGEAR\ Facebook\ Captive\ Portal\ version\ [0-9](\.[0-9]+)?";"NA"; +netio;;unknown;"NETIO\ -\ Network\ Throughput\ Benchmark,\ Version\ [0-9](\.[0-9]+)+?";"sed -r 's/NETIO\ -\ Network\ Throughput\ Benchmark,\ Version\ ([0-9](\.[0-9]+)+?).*/netio:\1/'"; +netstat-nat;strict;unknown;"^Version\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?)/netstat-nat:\1/'"; +netstat;;unknown;"netstat\ [0-9]\.[0-9]+";"sed -r 's/netstat\ ([0-9](\.[0-9]+)+?)/netstat:\1/'"; +nettle;;unknown;"nettle-hash\ \(nettle\ [0-9](\.[0-9]+)+?\)$";"sed -r 's/nettle-hash\ \(nettle\ ([0-9](\.[0-9]+)+?)\)$/nettle:\1/'"; +net-tools;;unknown;"net-tools\ [0-9]\.[0-9]+";"sed -r 's/net-tools\ ([0-9](\.[0-9]+)+?)/net-tools:\1/'"; +nginx;;BSD-2-Clause;"^nginx\ version:\ nginx\/[0-9](\.[0-9]+)+?$";"sed -r 's/nginx\ version:\ nginx\/([0-9](\.[0-9]+)+?)$/nginx:\1/'"; +ngrep;;unknown;"^ngrep:\ V[0-9]\.[0-9]+,\ \$Revision\:\ [0-9]+\.[0-9]+\ \$$";"sed -r 's/ngrep:\ V([0-9](\.[0-9]+)+?),\ .*/ngrep:\1/'"; +nmbd;strict;GPL-3.0-only;"Version\ [0-9]\.[0-9]\.[0-9]+([a-z])?$";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?([a-z])?)$/samba:\1/'"; +nmcli;;unknown;"nmcli\ tool,\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/nmcli\ tool,\ version\ ([0-9](\.[0-9]+)+?)$/nmcli:\1/'"; +nodedetect;;unknown;"^nodedetect\ [0-9](\.[0-9]+)+?$";"sed -r 's/nodedetect\ ([0-9](\.[0-9]+)+?)$/nodedetect:\1/'"; +ntfs-3g;;GPL-2.0-only;"^ntfs-3g\ [0-9]+(\.[0-9]+)+?\ integrated\ FUSE\ 27$";"sed -r 's/ntfs-3g\ ([0-9]+(\.[0-9]+)+?)\ .*/ntfs-3g:\1/'"; +ntfs-3g;;GPL-2.0-only;"ntfslabel\ v[0-9](\.[0-9]+)+?\ ";"sed -r 's/ntfslabel\ v([0-9]+(\.[0-9]+)+?)\ .*/ntfs-3g:\1/'"; +ntfsck;;GPL-2.0-only;"ntfsck\ [0-9]+\.[0-9]\.[0-9]+";"sed -r 's/ntfsck\ ([0-9]+(\.[0-9]+)+?).*/ntfsprogs:\1/'"; +#ntpdate;;unknown;"ntpdate\ [0-9](\.[0-9]+)+?$";"sed -r 's/ntpdate\ ([0-9](\.[0-9]+)+?)$/ntpdate:\1/'"; +ntpdate;;unknown;"ntpdate\ [0-9](\.[0-9]+)+?([a-z][0-9]+)?";"sed -r 's/ntpdate\ ([0-9](\.[0-9]+)+?)([a-z][0-9]+)?$/ntp:ntp:\1:\3/'"; +ntpd;;unknown;"ntpd\ [0-9](\.[0-9]+)+?(p[0-9]+)?\ for\ ";"sed -r 's/ntpd\ ([0-9](\.[0-9]+)+?)(p[0-9]+)?.*/ntp:ntp:\1:\3/'"; +ntpd;;unknown;"ntpd\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/ntpd\ ([0-9](\.[0-9]+)+?)/ntp:ntp:\1/'"; +ntpd;;unknown;"ntpd\ -\ NTP\ daemon\ program\ -\ Ver\.\ [0-9](\.[0-9]+)+?([a-z][0-9]+)?$";"sed -r 's/ntpd\ -\ NTP\ daemon\ program\ -\ Ver\.\ ([0-9](\.[0-9]+)+?)([a-z][0-9]+)?$/ntp:ntp:\1:\3/'"; +ntpdc;;unknown;"^ntpdc\ .*\ Ver\.\ [0-9](\.[0-9]+)+?$";"sed -r 's/ntpdc\ .*\ Ver\.\ ([0-9](\.[0-9]+)+?)/ntp:\1/'"; +ntp-keygen;;unknown;"^ntp-keygen\ [0-9](\.[0-9]+)+?";"sed -r 's/ntp-keygen\ ([0-9](\.[0-9]+)+?).*/ntp-keygen:\1/'"; +ntp;;unknown;"ntp[a-z]+\ -\ .*\ NTP\ query\ program\ -\ Ver\.\ [0-9](\.[0-9]+)+?([a-z][0-9]+)?$";"sed -r 's/ntp[a-z]+\ -\ .*\ NTP\ query\ program\ -\ Ver\.\ ([0-9](\.[0-9]+)+?)([a-z][0-9]+)?/ntp:ntp:\1:\3/'"; +ntp;;unknown;"ntp[dpq]\ [0-9](\.[0-9]+)+?(p[0-9]+)?$";"sed -r 's/ntp[dpq]\ ([0-9](\.[0-9]+)+?)+(p[0-9]+)?$/ntp:ntp:\1:\3/'"; +ookla;;unknown;"^Version:\ ookla\ [0-9](\.[0-9]+)+?$";"sed -r 's/Version:\ ookla\ ([0-9]+(\.[0-9]+)+?)$/ookla:\1/'"; +ookla;;unknown;"^ookla\ v[0-9](\.[0-9]+)+?$";"sed -r 's/ookla\ v([0-9]+(\.[0-9]+)+?)$/ookla:\1/'"; +ookla;;unknown;"^ookla-nano-c\ -\ [0-9](\.[0-9]+)+?$";"sed -r 's/ookla-nano-c\ -\ ([0-9]+(\.[0-9]+)+?)$/ookla:\1/'"; +opennhrp;;unknown;"^OpenNHRP\ [0-9](\.[0-9]+)+$";"sed -r 's/OpenNHRP\ ([0-9]+(\.[0-9]+)+?)$/opennhrp:\1/'"; +openrc;;unknown;"\ \(OpenRC\)\ [0-9](\.[0-9]+)+?([a-z][0-9]+)?$";"sed -r 's/\ \(OpenRC\)\ \ ([0-9]+(\.[0-9]+)+?([a-z][0-9]+)?)$/openrc:\1/'"; +openser;;unknown;"^version:\ openser\ [0-9](\.[0-9]+)+?\ \([a-z]+\/[a-z]+\)$";"sed -r 's/version:\ openser\ ([0-9]+(\.[0-9]+)+?).*/openser:\1/'"; +openssh;;SSH-OpenSSH;"OpenSSH_[0-9](\.[0-9]+)+?([a-z][0-9]+)?,\ ";"sed -r 's/OpenSSH_([0-9](\.[0-9]+)+?([a-z][0-9]+)?).*$/openssh:\1/'"; +openssh;;SSH-OpenSSH;"OpenSSH_[0-9](\.[0-9]+)+?([a-z][0-9]+)?\ ";"sed -r 's/OpenSSH_([0-9](\.[0-9]+)+?([a-z][0-9]+)?).*$/openssh:\1/'"; +openssh;multi_grep;SSH-OpenSSH;'"^ssh_msg_recv: read: bad msg_len %u$"&&"^OpenSSH_[0-9.]+p[0-9]$"';"sed -r 's/(OpenSSH_)(.*)/openssh:\2/'"; +# we run into false positives in static analysis: +openssh;no_static;SSH-OpenSSH;"^OpenSSH_[0-9](\.[0-9]+)+?([a-z][0-9]+)?$";"sed -r 's/OpenSSH_([0-9](\.[0-9]+)+?([a-z][0-9]+)?)$/openssh:\1/'"; +openssl;;OpenSSL OR Apache-2.0;"^OpenSSL\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/OpenSSL\ ([0-9](\.[0-9]+)+?).*$/openssl:openssl:\1/'"; +openssl;;OpenSSL OR Apache-2.0;"^OpenSSL\ [0-9](\.[0-9]+)+?(-[a-z]+)\ ";"sed -r 's/OpenSSL\ ([0-9](\.[0-9]+)+?)((-[a-z]+)?)\ .*$/openssl:openssl:\1\2/'"; +openssl;;OpenSSL OR Apache-2.0;"^OpenSSL\ [0-9](\.[0-9]+)+?([a-z]+)?-";"sed -r 's/OpenSSL\ ([0-9](\.[0-9]+)+?([a-z]+)?)-.*$/openssl:openssl:\1/'"; +openssl;;OpenSSL OR Apache-2.0;"^OpenSSL\ [0-9](\.[0-9]+)+?([a-z]+)?\ ";"sed -r 's/OpenSSL\ ([0-9](\.[0-9]+)+?([a-z]+)?)\ .*$/openssl:openssl:\1/'"; +openssl;;OpenSSL OR Apache-2.0;"^OpenSSL\ [0-9](\.[0-9]+)+?(-[a-z]+)$";"sed -r 's/OpenSSL\ ([0-9](\.[0-9]+)+?)((-[a-z]+)?)$/openssl:openssl:\1\2/'"; +openssl;;OpenSSL OR Apache-2.0;"part of OpenSSL\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/.*OpenSSL\ ([0-9](\.[0-9]+)+?).*$/openssl:openssl:\1/'"; +openssl;;OpenSSL OR Apache-2.0;"part of OpenSSL\ [0-9](\.[0-9]+)+?(-[a-z]+)\ ";"sed -r 's/.*OpenSSL\ ([0-9](\.[0-9]+)+?)((-[a-z]+)?)\ .*$/openssl:openssl:\1\2/'"; +openssl;;OpenSSL OR Apache-2.0;"part of OpenSSL\ [0-9](\.[0-9]+)+?([a-z]+)?-";"sed -r 's/.*OpenSSL\ ([0-9](\.[0-9]+)+?([a-z]+)?)-.*$/openssl:openssl:\1/'"; +openssl;;OpenSSL OR Apache-2.0;"part of OpenSSL\ [0-9](\.[0-9]+)+?([a-z]+)?\ ";"sed -r 's/.*OpenSSL\ ([0-9](\.[0-9]+)+?([a-z]+)?)\ .*$/openssl:openssl:\1/'"; +openssl;;OpenSSL OR Apache-2.0;"part of OpenSSL\ [0-9](\.[0-9]+)+?(-[a-z]+)$";"sed -r 's/.*OpenSSL\ ([0-9](\.[0-9]+)+?)((-[a-z]+)?)$/openssl:openssl:\1\2/'"; +openswan;;GPL-2.0-only;"^Openswan\ [0-9](\.[0-9]+)+?$";"sed -r 's/Openswan\ ([0-9](\.[0-9]+)+?)$/openswan:\1/'"; +openswan;;GPL-2.0-only;"^Linux\ Openswan\ [0-9](\.[0-9]+)+?$";"sed -r 's/Linux\ Openswan\ ([0-9](\.[0-9]+)+?)$/openswan:\1/'"; +openvpn;;GPL-2.0-only;"^OpenVPN\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/OpenVPN\ ([0-9](\.[0-9]+)+?)\ .*/openvpn:\1/'"; +# for future use / not yet used +# openwrt;;gpl;(OpenWrt)\ ([0-9]+\.[0-9]+\.[0-9])\ (r[0-9]+\-)([a-z0-9]+).*";sed -r 's/(OpenWrt)\ ([0-9]+\.[0-9]+\.[0-9])\ (r[0-9]+\-)([a-z0-9]+).*/openwrt:\2/'"; +opkg;;unknown;"opkg\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/opkg\ version\ ([0-9](\.[0-9]+)+?)/opkg:\1/'"; +ospf6d;;unknown;"^ospf6d\ version\ [0-9](\.[0-9]+)+$";"sed -r 's/ospf6d\ version\ ([0-9](\.[0-9]+)+?)$/ospf6d:\1/'"; +overlord;;unknown;"^overlord\ [0-9](\.[0-9]+)+?$";"sed -r 's/overlord\ ([0-9](\.[0-9]+)+?)$/overlord:\1/'"; +ozker;;unknown;"^ozKer\ [0-9](\.[0-9]+)+?(\.ozker\ build-[0-9]+)?$";"sed -r 's/ozker\ ([0-9](\.[0-9]+)+?).*/ozker:\1/'"; +p0f;;unknown;"^---\ p0f\ [0-9]\.[0-9]+[a-z]\ by\ Michal\ Zalewski\ \ ---$";"sed -r 's/---\ p0f\ ([0-9](\.[0-9]+)+?([a-z]+)?).*$/p0f:\1/'"; +px5g;;unknown;"^PX5G\ X\.509\ Certificate\ Generator\ Utility\ v[0-9]+(\.[0-9]+)+?$";"sed -r 's/PX5G\ X\.509\ Certificate\ Generator\ Utility\ v([0-9](\.[0-9]+)+?)$/px5g:\1/'"; +p910nd;;unknown;"p910nd\ Version\ [0-9](\.[0-9]+)+?";"sed -r 's/p910nd\ Version\ ([0-9](\.[0-9]+)+?).*/p910nd:\1/'"; +p910nd;;unknown;"p910nd\ Version\ [0-9](\.[0-9]+)+?\ Copyright\ \(c\)\ [0-9]+-[0-9]+\ Ken\ Yap\ and\ others,\ GPLv2";"sed -r 's/p910nd\ Version\ ([0-9](\.[0-9]+)+?).*/p910nd:\1/'"; +parted;;unknown;"GNU\ parted.\ [0-9](\.[0-9]+)+?$";"sed -r 's/GNU\ parted.\ ([0-9](\.[0-9]+)+?)$/gnu:parted:\1/'"; +passwd;;unknown;"^update-passwd\ [0-9][\.0-9]+$";"sed -r 's/update-passwd\ ([0-9](\.[0-9]+)+?)$/passwd:\1/'"; +pax-utils;;unknown;"^pax-utils-v[0-9]+(\.[0-9]+)+?:$";"sed -r 's/pax-utils-v([0-9](\.[0-9]+)+?)$/pax-utils:\1/'"; +pcre;;unknown;"^pcre[a-z]+\ version\ [0-9](\.[0-9]+)+?\ 20[0-9]+-[0-9]+-[0-9]+$";"sed -r 's/pcre[a-z]+\ version\ ([0-9](\.[0-9]+)+?)\ .*/pcre:\1/'"; +pcsc-lite;;GPL-3.0-only;"^pcsc-lite\ version\ [0-9](\.[0-9]+)+?\.$";"sed -r 's/pcsc-lite\ version\ ([0-9](\.[0-9]+)+?).*/pcsc-lite:\1/'"; +perl;;GPL-1.0-only OR Artistic-1.0-Perl;"This\ is\ perl\ [0-9],\ version\ [0-9]+,\ subversion\ [0-9]+.*built";"sed -r 's/This\ is\ perl\ ([0-9]+),\ version\ ([0-9]+),\ subversion\ ([0-9]+).*/perl:\1\.\2\.\3/'"; +perl;;GPL-1.0-only OR Artistic-1.0-Perl;"This\ is\ perl.*\(v[0-9]\.[0-9]+\.[0-9]+\)\ built";"sed -r 's/This\ is\ perl.*\(v([0-9](\.[0-9]+)+?)\).*/perl:\1/'"; +php;;PHP-3.01;"^PHP\ [0-9]\.[0-9]+([0-9]+)+?$";"sed -r 's/PHP\ ([0-9](\.[0-9]+)+?)$/php:\1/'"; +php;;PHP-3.01;"^X-Powered-By:\ PHP\/[0-9]\.[0-9]+(\.[0-9]+)+?$";"sed -r 's/X-Powered-By:\ PHP\/([0-9](\.[0-9]+)+?)$/php:\1/'"; +picocom;;unknown;"^picocom\ v[0-9]\.[0-9]+$";"sed -r 's/picocom\ v([0-9](\.[0-9]+)+?)$/picocom:\1/'"; +pimd;;unknown;"^pimd\ version\ ((\.)?[0-9]+)+$";"sed -r 's/pimd\ version\ ([0-9](\.[0-9]+)+?)$/pimd:\1/'"; +pinentry;;unknown;"pinentry.*\ \(pinentry\)\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/pinentry.*\ \(pinentry\)\ ([0-9](\.[0-9]+)+?)$/pinentry:\1/'"; +portmap;;unknown;"portmap\ version\ [0-9]\.[0-9]+\ -\ ";"sed -r 's/portmap\ version\ ([0-9](\.[0-9]+)+?)\ .*/portmap:\1/'"; +portt;;unknown;"portt\ version\ [0-9]+";"sed -r 's/portt\ version\ ([0-9]+).*/portt:\1/'"; +pppd;;unknown;"pppd\.so\.[0-9](\.[0-9]+)+?$";"sed -r 's/pppd\.so\.([0-9](\.[0-9]+)+?)$/point-to-point_protocol:\1/'"; +pppd;;unknown;"pppd\ version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/pppd\ version\ ([0-9](\.[0-9]+)+?)\ /point-to-point_protocol:\1/'"; +pppd;;unknown;"pppd\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/pppd\ version\ ([0-9](\.[0-9]+)+?)$/point-to-point_protocol:\1/'"; +# point-to-point_protocol:2.4.2:b3 -> b3 is not in cve database! +pppd;;unknown;"pppd\ version\ [0-9](\.[0-9]+)+?([a-z][0-9]+)?$";"sed -r 's/pppd\ version\ ([0-9](\.[0-9]+)+?)(([a-z][0-9]+)?)$/point-to-point_protocol:\1/'"; +pppoe-discovery;strict;unknown;"Version\ [0-9]\.[0-9]+([a-z])?$";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?([a-z])?)$/pppoe-discovery:\1/'"; +pppoe;;unknown;"pppoe\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/pppoe\ version\ ([0-9](\.[0-9]+)+?)$/pppoe:\1/'"; +rox2;;unknown;"User-Agent: Siemens Canada Limited - ROX2 - [0-9](\.[0-9]+)?+$";"sed -r 's/User-Agent: Siemens Canada Limited - ROX2 - ([0-9](\.[0-9]+)+?)$/siemens:ruggedcom_rox:\1/'"; +rp-pppoe;;GPL-2.0-only;"^PPPoE\ Version\ [0-9](\.[0-9]+)+?,\ Copyright\ \(C\)\ [0-9]+\ Roaring\ Penguin\ Software\ Inc\.$";"sed -r 's/PPPoE\ Version ([0-9](\.[0-9]+)+?),\ Copyright\ \(C\)\ [0-9]+\ Roaring\ Penguin\ Software\ Inc\.$/roaring_penguin:pppoe:\1/'"; +rp-pppoe;;GPL-2.0-only;"^PPPoE\ Version\ [0-9](\.[0-9]+)+?,\ Copyright\ \(C\)\ [0-9]+-[0-9]+\ Roaring\ Penguin\ Software\ Inc\.$";"sed -r 's/PPPoE\ Version ([0-9](\.[0-9]+)+?).*/roaring_penguin:pppoe:\1/'"; +rp-pppoe;;GPL-2.0-only;"^PPPoE\ Version\ [0-9](\.[0-9]+)+?,\ Copyright\ .*\ Roaring\ Penguin\ Software\ Inc\.$";"sed -r 's/PPPoE\ Version ([0-9](\.[0-9]+)+?),\ Copyright\ .*\ Roaring\ Penguin\ Software\ Inc\.$/roaring_penguin:pppoe:\1/'"; +rp-pppoe;;unknown;"PPPoE\ Version\ [0-9](\.[0-9]+)+?,\ Copyright\ \(C\)\ [0-9]+-[0-9]+\ Roaring\ Penguin\ Software\ Inc\.";"sed -r 's/PPPoE\ Version ([0-9](\.[0-9]+)+?),\ Copyright\ .*\ Roaring\ Penguin\ Software\ Inc\.$/roaring_penguin:pppoe:\1/'"; +rp-pppoe;;GPL-2.0-only;"Roaring\ Penguin\ PPPoE\ Version\ [0-9](\.[0-9]+)+?";"sed -r 's/Roaring\ Penguin\ PPPoE\ Version ([0-9](\.[0-9]+)+?).*/roaring_penguin:pppoe:\1/'"; +rp-pppoe;;GPL-2.0-only;"PPPoE-Server\ Version\ [0-9](\.[0-9]+)+?,\ Copyright\ \(C\)\ 2001-2006\ Roaring\ Penguin\ Software\ Inc\.";"sed -r 's/PPPoE-Server\ Version ([0-9](\.[0-9]+)+?).*/roaring_penguin:pppoe:\1/'"; +pptp;;unknown;"^pptp\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/pptp\ version\ ([0-9](\.[0-9]+)+?)$/pptp:\1/'"; +pptp;;unknown;"^pptp-linux\ version [0-9](\.[0-9]+)+?$";"sed -r 's/pptp-linux\ version\ ([0-9](\.[0-9]+)+?)$/pptp:\1/'"; +accel-pptpd;;unknown;"accel-pptpd\ v[0-9](\.[0-9]+)+?\ \ compiled";"sed -r 's/accel-pptpd\ v([0-9](\.[0-9]+)+?)\ \ .*/accel:pptp:\1/'"; +procps-ng;;unknown;"procps-ng\ [0-9](\.[0-9]+)+?$";"sed -r 's/procps-ng\ ([0-9](\.[0-9]+)+?)$/procps-ng:\1/'"; +procps;;unknown;"procps\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/procps\ version\ ([0-9](\.[0-9]+)+?)/procps:\1/'"; +proftpd;;GPL-2.0-or-later;"^ProFTPD\ Version\ [0-9](\.[0-9]+)+[a-zA-Z]?$";"sed -r 's/ProFTPD\ Version\ ([0-9](\.[0-9]+)+[a-zA-Z]?)$/proftp:\1/'"; +prol2tp;;unknown;"^ProL2TP\ v[\.0-9]+\ ";"sed -r 's/ProL2TP\ v([0-9](\.[0-9]+)+?)\ .*/prol2tp:\1/'"; +proxyd;;unknown;"^proxyd\ VERSION\ [0-9]\.[0-9](\.[0-9]+)+?$";"sed -r 's/proxyd\ VERSION\ ([0-9](\.[0-9]+)+?)$/proxyd:\1/'"; +psmisc;;unknown;"PSmisc.\ [0-9]+(\.[0-9]+)+$";"sed -r 's/PSmisc.\ ([0-9]+(\.[0-9]+)+?)$/psmisc:\1/'"; +pt_chown;;unknown;"pt_chown\ \(.*\)\ [0-9]\.[0-9]+";"sed -r 's/pt_chown\ \(.*\)\ ([0-9](\.[0-9]+)+?)/ptchown:\1/'"; +ptpd2;;unknown;"ptpd2\ version\ [0-9]\.[0-9]+\.[0-9]+";"sed -r 's/ptpd2\ version\ ([0-9](\.[0-9]+)+?)/ptpd2:\1/'"; +pure-ftpd;;ISC;"pure-ftpd\ v[0-9](\.[0-9]+)+?\ \[privsep\]$";"sed -r 's/pure-ftpd\ v([0-9](\.[0-9]+)+?).*/pure-ftpd:\1/'"; +python;;Python-2.0.1;"^Python\ [0-9]\.[0-9]+\.[0-9]+\ ";"sed -r 's/Python\ ([0-9](\.[0-9]+)+?)\ .*/python:\1/'"; +python;;Python-2.0.1;"^Python\ [0-9](\.[0-9]+)+?$";"sed -r 's/Python\ ([0-9](\.[0-9]+)+?)$/python:\1/'"; +pyexpat;multi_grep;unknown;'"^pyexpat$"&&"^Python\ wrapper\ for\ Expat\ parser\.$"&&"^sqlite3_bind_parameter_index$"&&"^[0-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/pyexpat:\1/'"; +#qmi;;unknown;"^qmi[-a-z]+\ [.\0-9]+$";"NA"; +qnx;;unknown;"Welcome\ to\ QNX\ Neutrino\ [0-9](\.[0-9]+)+?$";"sed -r 's/Welcome\ to\ QNX\ Neutrino\ ([0-9](\.[0-9]+)+?)$/qnx_neutrino_rtos:\1/'"; +qrencode;;unknown;"^qrencode\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/qrencode\ version\ ([0-9](\.[0-9]+)+?)$/qrencode:\1/'"; +quagga;;GPL-3.0-only;"^(ldpd|linkd)\ version\ 0\.9[\.0-9]+$";"sed -r 's/(ldpd|linkd)\ version\ ([0-9](\.[0-9]+)+?)$/quagga:\1/'"; +quagga;;GPL-3.0-only;"^Hello,\ this\ is\ Quagga\ \(version\ [0-9](\.[0-9]+)+?\)\.$";"sed -r 's/Hello,\ this\ is\ Quagga\ \(version\ ([0-9](\.[0-9]+)+?)\)\.$/quagga:\1/'"; +#quik;;unknown;"QUIK\ version\ [0-9]\.[0-9]+";"NA"; +qdiscman;;unknown;"^qdiscman\ [0-9](\.[0-9]+)+?\ release$";"sed -r 's/qdiscman\ ([0-9](\.[0-9]+)+?)$/qdiscman:\1/'"; +radlogin;;unknown;"radlogin\.c,v\ [0-9]\.[0-9]+\ [0-9]+";"sed -r 's/radlogin\.c,v\ ([0-9](\.[0-9]+)+?).*/radlogin:\1/'"; +radvd;strict;radvd-lic;"Version:\ [0-9]\.[0-9]+$";"sed -r 's/Version:\ ([0-9](\.[0-9]+)+?)$/radvd:\1/'"; +radvd;strict;radvd-lic;"Version:\ [0-9]\.[0-9]+\.[0-9]+$";"sed -r 's/Version:\ ([0-9](\.[0-9]+)+?)$/radvd:\1/'"; +radvdump;strict;radvd-lic;"Version:\ [0-9]\.[0-9]+$";"sed -r 's/Version:\ ([0-9](\.[0-9]+)+?)$/radvd:\1/'"; +radvdump;strict;radvd-lic;"Version:\ [0-9]\.[0-9]+\.[0-9]+$";"sed -r 's/Version:\ ([0-9](\.[0-9]+)+?)$/radvd:\1/'"; +ralink-dot1x;;unknown;"Ralink\ DOT1X\ daemon,\ version\ ...[0-9](\.[0-9])+?.";"sed -r 's/Ralink\ DOT1X\ daemon,\ version\ ...([0-9](\.[0-9]+)+?).*/ralink-dot1x:\1/'"; +rarp;;unknown;"^rarp\ [0-9]\.[0-9]+\ \([0-9]{4}-[0-9]{2}-[0-9]{2}\)$";"sed -r 's/rarp\ ([0-9](\.[0-9]+)+?)\ .*/rarp:\1/'"; +rdisc6;;unknown;"ndisc6\:\ IPv6\ Neighbor\/Router\ Discovery\ userland\ tool\ [0-9](\.[0-9])+?\ ";"sed -r 's/ndisc6\:\ IPv6\ Neighbor\/Router\ Discovery\ userland\ tool\ ([0-9](\.[0-9]+)+?)\ .*/ndisc6:\1/'"; +rdnssd;;unknown;"rdnssd\:\ IPv6\ Recursive\ DNS\ Server\ discovery\ Daemon\ [0-9](\.[0-9])+?\ ";"sed -r 's/rdnssd\:\ IPv6\ Recursive\ DNS\ Server\ discovery\ Daemon\ ([0-9](\.[0-9]+)+?)\ .*/rdnssd:\1/'"; +Realtek_camera_tool;;unknown;"Welcome\ to\ Realtek\ Camera\ Tool\.\ Version\ [0-9](\.[0-9]+)+?";"sed -r 's/Welcome\ to\ Realtek\ Camera\ Tool\.\ Version\ ([0-9](\.[0-9]+)+?)/realtek_camera_tool:\1/'"; +redis_cli;;BSD-3-Clause;"^redis-cli\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/redis-cli\ ([0-9](\.[0-9]+)+?).*/redis:\1/'"; +reiserfsck;;unknown;"reiserfsck\ [0-9](\.[0-9]+)+?$";"sed -r 's/reiserfsck\ ([0-9](\.[0-9]+)+?).*/reiserfsck:\1/'"; +rflow;;unknown;"[0-9]\.[0-9]+\ Copyright\ by\ Nikki\ Chumakov$";"sed -r 's/([0-9](\.[0-9]+)+?)\ Copyright\ by\ Nikki\ Chumakov$/rflow:\1/'"; +ripd;;GPL-2.0-only;"^ripd\ version\ [\.0-9]+a?";"sed -r 's/ripd\ version\ ([0-9](\.[0-9]+)+?)/quagga:\1/'"; +ripd;;GPL-2.0-only;"^ripd\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/ripd\ version\ ([0-9](\.[0-9]+)+?)$/quagga:\1/'"; +ripngd;;gpl;"^ripngd\ version\ [\.0-9]+$";"sed -r 's/ripngd\ version\ ([0-9](\.[0-9]+)+?)$/quagga:\1/'"; +ripngd;;unknown;"^ripngd\ version\ [0-9](\.[0-9]+)+?([a-z])?\ ";"sed -r 's/ripngd\ version\ ([0-9](\.[0-9]+)+?[a-z]?)\.*/quagga:\1:\2/'"; +rndimage;;unknown;"RNDIMGAE\ v[0-9](\.[0-9]+)+?";"sed -r 's/RNDIMGAE\ v([0-9](\.[0-9]+)+?).*/rndimgae:\1/'"; +rngd;;unknown;"^rngd\ [0-9]$";"sed -r 's/rngd\ ([0-9]+)$/rngd:\1/'"; +rngd;;unknown;"^rngd\ [0-9]\.[0-9]+$";"sed -r 's/rngd\ ([0-9]+\.[0-9]+)$/rngd:\1/'"; +roamd;;unknown;"^roamd\ version\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/roamd\ version\ ([0-9]+(\.[0-9]+)+?)$/roamd:\1/'"; +rngtest;;unknown;"^rngtest\ [0-9](\.[0-9]+)+?$";"sed -r 's/rngtest\ ([0-9](\.[0-9]+)+?)$/rngtest:\1/'"; +rpcinfo;;unknown;"rpcinfo\ \(.*\)\ [0-9](\.[0-9]+)+?";"sed -r 's/rpcinfo\ \(.*\)\ ([0-9](\.[0-9]+)+?)/rpcinfo:\1/'"; +rred;strict;unknown;"Version:\ [0-9]\.[0-9]+";"sed -r 's/Version:\ ([0-9](\.[0-9]+)+?)/rred:\1/'"; +rsh;strict;unknown;"Version:\ [0-9]\.[0-9]+";"sed -r 's/Version:\ ([0-9](\.[0-9]+)+?)/rsh:\1/'"; +rsync;;unknown;"^rsync\ \ version\ [0-9](\.[0-9]+)+?\ \ protocol\ version\ [0-9]+$";"sed -r 's/rsync\ \ version\ ([0-9](\.[0-9]+)+?)\ .*/rsync:\1/'"; +rsyslogd;;unknown;"rsyslogd\ [0-9](\.[0-9]+)+?,\ compiled\ with:$";"sed -r 's/rsyslogd\ ([0-9](\.[0-9]+)+?),\ .*/rsyslogd:\1/'"; +rsyslogd;;unknown;"^rsyslogd\ [0-9](\.[0-9]+)+?\ runtime\ debug\ support\ -\ help\ requested,\ rsyslog\ terminates$";"sed -r 's/rsyslogd\ ([0-9](\.[0-9]+)+?)\ .*/rsyslogd:\1/'"; +rsyslogd;;unknown;"^liblogging-stdlog\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/liblogging-stdlog\ version\ ([0-9](\.[0-9]+)+?).*/rsyslog:\1/'"; +rsyslogd;multi_grep;unknown;'":\ module\ compiled\ with\ rsyslog\ version\ \%s.$"&&"[0-9](\.[0-9]+)+?$"';"sed -r 's/([0-9](\.[0-9]+)+?)/rsyslogd:\1/'"; +rt2860apd;;unknown;"Ralink\ DOT1X\ daemon,\ version\ =\ .[0-9](\.[0-9])+?\'\ ";"sed -r 's/Ralink\ DOT1X\ daemon,\ version\ =\ .([0-9](\.[0-9]+)+?)\ .*/ralink-dot1x:\1/'"; +rtpproxy;strict;unknown;"^Basic\ version:\ [0-9]+$";"sed -r 's/Basic\ version:\ ([0-9]+)$/rtpproxy:\1/'"; +run-parts;;unknown;"run-parts\ program,\ version\ [\.0-9]+$";"sed -r 's/run-parts\ program,\ version\ ([0-9](\.[0-9]+)+?)$/run-parts:\1/'"; +scepclient;;unknown;"^scepclient [0-9]\.[0-9]$";"sed -r 's/scepclient\ ([0-9](\.[0-9]+)+?)$/scepclient:\1/'"; +screen;;GPL-3.0-only;"^Screen\ version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/Screen\ version\ ([0-9](\.[0-9]+)+?)\ .*/screen:\1/'"; +sdptool;;unknown;"sdptool\ -\ SDP\ tool\ v[0-9](\.[0-9]+)+?$";"sed -r 's/sdptool\ -\ SDP\ tool\ v([0-9](\.[0-9]+)+?)$/sdptool:\1/'"; +sead;;unknown;"^sead\ [0-9](\.[0-9]+)+?\ release$";"sed -r 's/sead\ ([0-9](\.[0-9]+)+?)\ .*/sead:\1/'"; +seama;;unknown;"^seama\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/seama\ version\ ([0-9](\.[0-9]+)+?)$/seama:\1/'"; +sed;;GPL-3.0-only;"\(GNU\ sed\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ sed\)\ ([0-9](\.[0-9]+)+?)$/gnu:sed:\1/'"; +sed;;GPL-3.0-only;"GNU\ sed\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/GNU\ sed\ version\ ([0-9](\.[0-9]+)+?)$/gnu:sed:\1/'"; +sendmail;;Sendmail;"\ This\ is\ Sendmail\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/\ This\ is\ Sendmail\ version\ ([0-9](\.[0-9]+)+?)$/sendmail:\1/'"; +servd;;unknown;"servd\ version\ [0-9]+$";"sed -r 's/servd\ version\ ([0-9]+)$/servd:\1/'"; +setserial;;unknown;"setserial\ version\ [0-9](\.[0-9]+)+?,\ [0-9]+-.*-20[0-9]+$";"sed -r 's/setserial\ version\ ([0-9](\.[0-9]+)+?),\ .*$/setserial:\1/'"; +setpci;;unknown;"setpci\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/setpci\ version\ ([0-9](\.[0-9]+)+?)$/pciutils:\1/'"; +sharutils;;unknown;"\(GNU\ sharutils\)\ [0-9](\.[0-9]+)+?";"sed -r 's/\(GNU\ sharutils\)\ ([0-9](\.[0-9]+)+?)$/gnu:sharutils:\1/'"; +signtools;;unknown;"^signver[-\ a-zA-Z7]+Version\ [\.0-9]+$";"sed -r 's/signver[-\ a-zA-Z7]+Version\ ([0-9](\.[0-9]+)+?)$/signtools:\1/'"; +siprotec_5;;proprietary;"FWAOS_V[0-9]+.[0-9]+.[0-9]+.[0-9]+$";"sed -r 's/FWAOS_V([0-9]+(\.[0-9]+)+?)$/siprotec_5:\1/'"; +sicam;;proprietary;"7KG[0-9][0-9]x\ V[0-9]+(\.[0-9]+)+?\ PCK\ FILE$";"sed -r 's/7KG[0-9][0-9]x\ V([0-9]+(\.[0-9]+)+?)\ PCK\ FILE/sicam_q100:\1/'"; +#sisco_mms_lite;;unknown;"MMS-LITE-80X-001";"NA"; +smbd;multi_grep;GPL-3.0-only;'"^smbd version %s started.$"&&"^[2-5]\.[0-9]+\.[0-9]+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/samba:\1/'"; +smbd;strict;GPL-3.0-only;"^Version\ [2-5]\.[0-9]+\.[0-9]+$";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?)$/samba:\1/'"; +smbd;strict;GPL-3.0-only;"^Version\ [2-5]\.[0-9]+\.[0-9]+[a-z]$";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?[a-z]?)$/samba:\1/'"; +smbftpd;;unknown;"^SmbFTPD\ Ver\ [0-9]\.[0-9]+$";"sed -r 's/SmbFTPD\ Ver\ ([0-9](\.[0-9]+)+?)$/smbftpd:\1/'"; +smbpasswd;strict;GPL-3.0-only;"Version\ [0-9]\.[0-9]+\.[0-9]+";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?)$/samba:\1/'"; +smcroute;;unknown;"^SMCRoute\ [Vv]ersion\ [\.0-9]+";"sed -r 's/SMCRoute\ [Vv]ersion\ ([0-9](\.[0-9]+)+?)/smcroute:\1/'"; +smidump;;unknown;"^smidump\ [0-9][\.0-9]+";"sed -r 's/smidump\ ([0-9](\.[0-9]+)+?)/smidump:\1/'"; +smtpclient;;unknown;"This\ is\ SMTPclient\ Version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/This\ is\ SMTPclient\ Version\ ([0-9](\.[0-9]+)+?)\ .*/smtpclient:\1/'"; +snmpd;;unknown;"NET-SNMP\ version:\ \ [0-9](\.[0-9]+)+?$";"sed -r 's/NET-SNMP\ version:\ \ ([0-9](\.[0-9]+)+?)$/net-snmp:\1/'"; +snmpd;;unknown;"^NET-SNMP\ version:\ [0-9](\.[0-9]+)+?$";"sed -r 's/NET-SNMP\ version:\ ([0-9](\.[0-9]+)+?)$/net-snmp:\1/'"; +snmpd;strict;unknown;"^Version:\ \ [0-9]\.[0-9]+\.[0-9]$";"sed -r 's/Version:\ \ ([0-9](\.[0-9]+)+?)$/net-snmp:\1/'"; +snort;strict;GPL-2.0-only;"^Version\ [0-9](\.[0-9])+?";"sed -r 's/Version:\ ([0-9](\.[0-9]+)+?)/snort:\1/'"; +#sntp;;unknown;"^sntp\ [0-9][\.0-9p]+";"NA"; +socat;;GPL-2.0-only;"socat\ version\ [0-9](\.[0-9]+)+?-[a-z][0-9]+\ ";"sed -r 's/socat\ version\ ([0-9](\.[0-9]+)+?)((-[a-z][0-9]+)?)\ .*/socat:\1:\2/'"; +socat;;GPL-2.0-only;"socat\ version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/socat\ version\ ([0-9](\.[0-9]+)+?)\ .*/socat:\1/'"; +sqlite3;;public-domain;"SQLite\ version\ 3(\.[0-9]+)+?";"sed -r 's/SQLite\ version\ (3(\.[0-9]+)+?).*/sqlite:\1/'"; +sqlite3;multi_grep;public-domain;'"^sqlite3_version$"&&"^sqlite3_bind_parameter_index$"&&"^3(\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/sqlite3:\1/'"; +libsqlite3.so.0;strict;public-domain;"^3\.[0-9]+\.[0-9]+$";"sed -r 's/(3(\.[0-9]+)+?)$/sqlite:\1/'"; +squidclient;strict;unknown;"Version:\ [0-9]\.[0-9]\.[0-9]";"sed -r 's/Version:\ ([0-9](\.[0-9]+)+?)/squidclient:\1/'"; +squidguard;;unknown;"SquidGuard:\ [0-9]\.[0-9]\ Berkeley\ DB\ [0-9]\.[0-9]\.[0-9]+";"sed -r 's/SquidGuard:\ ([0-9](\.[0-9]+)+?)\ .*/squidguard:\1/'"; +squid;;unknown;"Squid\ Cache:\ Version\ [0-9](\.[0-9]+)+?$";"sed -r 's/Squid\ Cache:\ Version\ ([0-9](\.[0-9]+)+?)$/squid-cache:squid:\1/'"; +ssleay;;ssleay;"part\ of\ SSLeay\ [0-9]\.[0-9]+\.[0-9]+\ [0-9]+-";"sed -r 's/part\ of\ SSLeay\ ([0-9](\.[0-9]+)+?)\ .*/ssleay:\1/'"; +ssmtp;;unknown;"^sSMTP\ [0-9](\.[0-9]+)+?\ \(Not\ sendmail\ at\ all\)$";"sed -r 's/sSMTP\ ([0-9](\.[0-9]+)+?)\ \(Not\ sendmail\ at\ all\)$/ssmtp:ssmtp:\1/'"; +start-stop-deamon;;unknown;"^start-stop-daemon\ [0-9][\.0-9]+\ ";"sed -r 's/start-stop-daemon\ ([0-9](\.[0-9]+)+?)\ .*/start-stop-daemon:\1/'"; +strace;;unknown;"strace\ --\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/strace\ --\ version\ ([0-9](\.[0-9]+)+?)$/strace:\1/'"; +ltrace;;unknown;"^ltrace\ version\ [0-9](\.[0-9]+)+?\.$";"sed -r 's/ltrace\ version\ ([0-9](\.[0-9]+)+?)\.$/ltrace:\1/'"; +strongswan;;GPL-2.0-only;"Linux\ strongSwan\ [0-9](\.[0-9]+)+?$";"sed -r 's/Linux\ strongSwan\ ([0-9](\.[0-9]+)+?)$/strongswan:\1/'"; +strongswan;;GPL-2.0-only;"\ strongSwan\ [0-9](\.[0-9]+)+?$";"sed -r 's/.*\ strongSwan\ ([0-9](\.[0-9]+)+?)$/strongswan:\1/'"; +strongswan;;GPL-2.0-only;"^ipsec _copyright strongSwan [0-9](\.[0-9]+)+?$";"sed -r 's/ipsec _copyright strongSwan ([0-9](\.[0-9]+)+?)/strongswan:\1/'"; +stunnel;;GPL-2.0-only;"stunnel\ [0-9](\.[0-9]+)+?\ on\ ";"sed -r 's/stunnel\ ([0-9](\.[0-9]+)+?)\ .*/stunnel:\1/'"; +sudoreplay;;unknown;"sudoreplay\ version\ [0-9](\.[0-9]+)+?(p[0-9]+)?$";"sed -r 's/sudoreplay\ version\ ([0-9](\.[0-9]+)+?(p[0-9]+)?)$/sudo:\1/'"; +sudo;;ISC;"Sudo\ version\ [0-9](\.[0-9]+)+?(p[0-9]+)?$";"sed -r 's/Sudo\ version\ ([0-9](\.[0-9]+)+?(p[0-9]+)?)$/sudo:\1/'"; +sudo;;ISC;"\/sudo-[0-9](\.[0-9]+)+?(p[0-9]+)?\/";"sed -r 's/\/sudo-([0-9](\.[0-9]+)+?(p[0-9]+)?)\//sudo:\1/'"; +suricata;;unknown;"Suricata\ [0-9](\.[0-9]+)+?";"sed -r 's/Suricata\ ([0-9](\.[0-9]+)+?).*/suricata:\1/'"; +syslogd;;unknown;"^syslogd\ v[0-9](\.[0-9]+)+?$";"sed -r 's/syslogd\ v([0-9](\.[0-9]+)+?)$/syslogd:\1/'"; +sysstat;;unknown;"^sysstat\ version\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/sysstat\ version\ ([0-9]+(\.[0-9]+)+?)$/sysstat:\1/'"; +systemd;strict;LGPL-2.1-or-later;"^[0-9]{3}$";"sed -r 's/([0-9]+)$/systemd:\1/'"; +systemd;;LGPL-2.1-or-later;"^systemd\ [0-9]{3}\ \([0-9]{3}\.[0-9].*\)$";"sed -r 's/systemd\ [0-9]{3}\ \(([0-9]{3}\.[0-9]).*\)$/systemd:\1/'"; +systemd;;LGPL-2.1-or-later;"^systemd\ [0-9]{3}$";"sed -r 's/systemd\ ([0-9]+)$/systemd:\1/'"; +systemd;;LGPL-2.1-or-later;"^systemd [v0-9.-]+.* running in %ssystem mode \(%s\)$";"sed -r 's/systemd v?([0-9.]+).*/systemd:\1/'"; +sysvinit;;GPL-2.0-or-later;"^INIT_VERSION\=sysvinit-[0-9]\.(\.[0-9]+)+?$";"sed -r 's/INIT_VERSION\=sysvinit-([0-9](\.[0-9]+)+?)$/sysvinit:\1/'"; +tar;;unknown;"\(GNU\ tar\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ tar\)\ ([0-9](\.[0-9]+)+?)$/gnu:tar:\1/'"; +tcci;;unknown;"^\ tcci\ version:\ tcci\ V[0-9](\.[0-9]+)+?\ ";"sed -r 's/\ tcci\ version:\ tcci\ V([0-9](\.[0-9]+)+?)\ .*/tcci:\1/'"; +tcpdump;strict;BSD-3-Clause;"^[2-9]\.[0-9]+\.[0-9]+$";"sed -r 's/([0-9](\.[0-9]+)+?)$/tcpdump:\1/'"; +tcpdump;multi_grep;BSD-3-Clause;'"^dump"&&"^\[\ -T\ type\ \]\ \[\ --version\ \]\ \[\ -V\ file\ \]$"&&"^[2-9](\.[0-9]+)+?$"';"sed -r 's/([0-9](\.[0-9]+)+?)/tcpdump:\1/'"; +tcpdump;;BSD-3-Clause;"tcpdump\.[2-9](\.[0-9]+)+?\ version";"sed -r 's/tcpdump\.([0-9](\.[0-9]+)+?)\ version/tcpdump:\1/'"; +tcpdump;;BSD-3-Clause;"^tcpdump\ version\ [2-9](\.[0-9]+)+?$";"sed -r 's/tcpdump\ version\ ([0-9](\.[0-9]+)+?)$/tcpdump:\1/'"; +tempfile;;unknown;"^tempfile\ [0-9][\.0-9]+$";"sed -r 's/tempfile\ ([0-9](\.[0-9]+)+?(p[0-9]+)?)$/tempfile:\1/'"; +texinfo;;unknown;"\(GNU\ texinfo\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ texinfo\)\ ([0-9](\.[0-9]+)+?)$/gnu:sed:\1/'"; +thttpd;;bsd-style;"^thttpd\/[0-9]\.[0-9]+([a-z])?\ [0-9]{2}[a-z]+[0-9]{4}$";"sed -r 's/thttpd\/([0-9]+\.[0-9]+([a-z])?).*/acme_labs:thttpd:\1/'" +sthttpd;;bsd-style;"^sthttpd\/[0-9](\.[0-9]+)+?([a-z])?.*";"sed -r 's/sthttpd\/([0-9]+(\.[0-9]+)+?([a-z])?).*/:sthttpd:\1/'" +tinylogin;;GPL-2.0-only;"Tinylogin v[0-9](\.[0-9]+)+?\ \(.*\)\ multi-call\ binary$";"sed -r 's/Tinylogin\ v([0-9](\.[0-9]+)+?)\ .*/busybox:\1/'"; +tor;;unknown;"Tor\ v[0-9](\.[0-9]+)+?\ .git";"sed -r 's/Tor\ v([0-9](\.[0-9]+)+?)\ .*/tor:\1/'"; +traceroute;;GPL-2.0-only;"traceroute\.db\:\ Modern\ traceroute\ for\ Linux,\ version\ [0-9](\.[0-9]+)+?,\ [[:alpha:]]{3}\ [0-9]+\ [0-9]+";"sed -r 's/traceroute\.db\:\ Modern\ traceroute\ for\ Linux,\ version\ ([0-9](\.[0-9]+)+?)\ .*/traceroute:\1/'"; +traceroute;;GPL-2.0-only;"^Modern\ traceroute\ for\ Linux,\ [Vv]ersion\ [0-9]+(\.[0-9]+)+?";"sed -r 's/Modern\ traceroute\ for\ Linux,\ [Vv]ersion\ ([0-9]+(\.[0-9]+)+?)$/traceroute:\1/'"; +traceroute;strict;GPL-2.0-only;"^Version\ [0-9]\.[0-9]+a[0-9]+";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?).*/traceroute:\1/'"; +transmissionbt;;GPL-2.0-only or GPL-3.0-only;"^Transmission\ [0-9]+(\.[0-9]+)+?\ \(\)\ \ http\:\/\/www\.transmissionbt\.com\/$";"sed -r 's/Transmission\ ([0-9]+(\.[0-9]+)+?)\ .*/transmission:transmissionbt:\1/'"; +transmissionbt;;GPL-2.0-only or GPL-3.0-only;"^transmission-cli\ [0-9]\.[0-9]+\ \([0-9]+\)$";"sed -r 's/transmission-cli\ ([0-9](\.[0-9]+)+?)\ .*/transmission:transmissionbt:\1/'"; +trigger;;unknown;"trigger\ version\ [0-9]+$";"sed -r 's/trigger\ version\ ([0-9]+)$/trigger:\1/'"; +tune2fs;;unknown;"tune2fs\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/tune2fs\ ([0-9](\.[0-9]+)+?).*/e2fsprogs:\1/'"; +twonky;;unknown;"Twonky\ Version\ [0-9](\.[0-9]+)+?";"sed -r 's/Twonky\ Version\ ([0-9](\.[0-9]+)+?).*/twonky:\1/'"; +tzcode;;unknown;"\(tzcode\)\ 20[0-9][0-9][a-z]$";"sed -r 's/.*\(tzcode\)\ ([0-9]+[a-z]+?)$/tzcode:\1/'"; +tzdata;;unknown;"\(tzdata\)\ 20[0-9][0-9][a-z]$";"sed -r 's/.*\(tzdata\)\ ([0-9]+[a-z]+?)$/tzdata:\1/'"; +#tzo;;unknown;"^Tzo Version : [0-9](\.[0-9]+)+?";"NA"; +ubiquiti_speedtest;;unknown;"^Network\ Speed\ Tester\ client\ v[0-9](\.[0-9]+)+?\ \(c\)\ Ubiquiti\ Networks$";"sed -r 's/Network\ Speed\ Tester\ client\ v([0-9](\.[0-9]+)+?).*/ubiquiti:network_speed_tester:\1/'"; +ubnt-infctld;;unknown;"Multipurpose\(mtik,\ mcast\)\ control\ daemon\ v[0-9](\.[0-9]+)+?\ \(c\)\ Ubiquiti$";"sed -r 's/Multipurpose\(mtik,\ mcast\)\ control\ daemon\ v([0-9](\.[0-9]+)+?).*/ubiquiti:control_daemon:\1/'"; +u-boot;;GPL-2.0-only;"Compiled\ with\ U-Boot\ [0-9]+(\.[0-9]+)+?(rc[0-9]+)?";"sed -r 's/Compiled\ with\ U-Boot\ ([0-9]+(\.[0-9]+)+?(rc[0-9]+)?)/u-boot:\1/'"; +u-boot;;GPL-2.0-only;"^mk(env)?image\ version\ 20[0-9]+\.[0-9]+";"sed -r 's/mk.*image\ version\ ([0-9]+(\.[0-9]+)+?).*/u-boot:\1/'"; +u-boot;;GPL-2.0-only;"U-Boot\ [0-9]+(\.[0-9]+)+?\ ";"sed -r 's/U-Boot\ ([0-9]+(\.[0-9]+)+?(rc[0-9]+)?)\ .*/u-boot:\1/'"; +ucd-snmpd;;bsd-style;"UCD-snmp\ version:\ \ [0-9](\.[0-9]+)+?$";"sed -r 's/UCD-snmp\ version:\ \ ([0-9]+(\.[0-9]+)+?)$/ucd-snmp:\1/'"; +ucloud;;unknown;"ucloud_v2\ ver\.[0-9]+";"sed -r 's/ucloud_v2\ ver\.([0-9]+).*/ucloud:\1/'"; +udevadm;strict;unknown;"^[0-9]{3}$";"sed -r 's/([0-9]+)$/systemd:\1/'"; +udevinfo;;unknown;"^udevinfo,\ version\ [0-9]+$";"sed -r 's/udevinfo,\ version\ ([0-9]+)$/udevinfo:\1/'"; +udev;;unknown;"^udev-[0-9]\.[0-9](\.[0-9]+)+?$";"sed -r 's/udev-([0-9](\.[0-9]+)+?)$/systemd:\1/'"; +udhcp_client;;unknown;"info,\ udhcp\ client\ \(v[0-9](\.[0-9]+)+?\)\ started";"sed -r 's/info,\ udhcp\ client\ \(v([0-9](\.[0-9]+)+?)\)\ started.*/udhcp-client:\1/'"; +udhcpc;;unknown;"udhcpcd,\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/udhcpcd,\ version\ ([0-9](\.[0-9]+)+?).*/udhcpc:\1/'"; +udhcpc;;unknown;"udhcpc\ \(v[0-9](\.[0-9]+)+?(-pre)?\)\ started$";"sed -r 's/udhcpc\ \(v([0-9](\.[0-9]+)+?)(-pre)?\)\ .*/udhcpc:\1/'"; +udhcp;;unknown;"udhcp\ [0-9](\.[0-9]+)+?$";"sed -r 's/udhcp\ ([0-9](\.[0-9]+)+?)$/udhcp:\1/'"; +uefi_shell;;bsd-style;"\*\*\*\ UEFI\ Shell\ v[0-9]+\.[0-9]+,\ release\ [0-9]+[A-Z][0-9]+\ \*\*\*";"sed -r 's/\*\*\*\ UEFI\ Shell\ v([0-9]+\.[0-9]+),\ release\ ([0-9]+[A-Z][0-9]+)\ \*\*\*/uefi_shell:\1:\2/'"; +uefi_shell;;bsd-style;"\*\*\*\ UEFI\ Shell\ v[0-9]+\.[0-9]+,\ release\ [0-9]+\.[0-9]+\ \*\*\*";"sed -r 's/\*\*\*\ UEFI\ Shell\ v([0-9]+\.[0-9]+),\ release\ ([0-9]+\.[0-9]+)\ \*\*\*/uefi_shell:\1:\2/'"; +uefi_shell;;bsd-style;"UEFI\ SHELL\ [0-9]+\.[0-9]+\ [0-9]+[A-Z][0-9]+\ ";"sed -r 's/UEFI\ SHELL\ ([0-9]+\.[0-9]+)\ ([0-9]+[A-Z][0-9]+)\ /uefi_shell:\1:\2/'"; +uefi_shell;;bsd-style;"UEFI\ SHELL\ [0-9]+\.[0-9]+\ [0-9]+\.[0-9]+\ ";"sed -r 's/UEFI\ SHELL\ ([0-9]+\.[0-9]+)\ ([0-9]+\.[0-9]+)\ /uefi_shell:\1:\2/'"; +ulogd;;unknown;"^ulogd\ Version\ [0-9](\.[0-9]+)+?$";"sed -r 's/ulogd\ Version\ ([0-9](\.[0-9]+)+?)/ulogd:\1/'"; +ultravnc_linux_repeater;;unknown;"^UltraVnc\ Linux\ Repeater\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/UltraVnc\ Linux\ Repeater\ version\ ([0-9](\.[0-9]+)+?)$/ultravnc:repeater:\1/'"; +xlink-ult;;unknown;"XLINK\ v[0-9]+(\.[0-9]+)+?\ ";"sed -r 's/XLINK\ v([0-9]+(\.[0-9]+)+?)\ .*/xlink:\1/'"; +unrar;;unknown;"^UNRAR\ [0-9]\.[0-9]+\ freeware\ .*\ Copyright\ \(c\)\ [0-9]+-[0-9]+\ Alexander\ Roshal$";"sed -r 's/UNRAR\ ([0-9]+(\.[0-9]+)+?)\ .*/unrar:\1/'"; +upnpc-ddns;;unknown;"upnpc-ddns\ version:\ [0-9](\.[0-9]+)+?:\ ";"sed -r 's/upnpc-ddns\ version:\ ([0-9]+(\.[0-9]+)+?):\ /upnpc-ddns:\1/'"; +upnp_igd;;unknown;"UPnP\ ControlPoint\ [0-9](\.[0-9]+)+?\ for\ IGD";"sed -r 's/UPnP\ ControlPoint\ ([0-9](\.[0-9]+)+?)\ for\ IGD/upnp_controlpoint:\1/'"; +upnp_sdk;;unknown;"Intel\ SDK\ for\ UPnP\ devices\ \/[0-9](\.[0-9]+)+?$";"sed -r 's/Intel\ SDK\ for\ UPnP\ devices\ \/([0-9](\.[0-9]+)+?)$/portable_sdk_for_upnp:\1/'"; +upnp_sdk;;unknown;"Portable\ SDK\ for\ UPnP\ devices\ [0-9](\.[0-9]+)+?\ .*";"sed -r 's/Portable\ SDK\ for\ UPnP\ devices\ ([0-9](\.[0-9]+)+?)\ .*/portable_sdk_for_upnp:\1/'"; +usb-modeswitch;strict;unknown;"Version\ [0-9]\.[0-9]+\.[0-9]+\ ";"sed -r 's/Version\ ([0-9]+(\.[0-9]+)+?)\ .*/usb-modeswitch:\1/'"; +usbhid-dump;;unknown;"^usbhid-dump [0-9]\.[0-9]$";"sed -r 's/usbhid-dump\ ([0-9]+(\.[0-9]+)+?)$/usbhid:\1/'"; +util-linux;;GPL-2.0-or-later;"util-linux\ [0-9](\.[0-9]+)+?$";"sed -r 's/util-linux\ ([0-9](\.[0-9]+)+?)$/util-linux:\1/'"; +util-linux-ng;;GPL-2.0-or-later;"util-linux-ng\ [0-9](\.[0-9]+)+?";"sed -r 's/util-linux-ng\ ([0-9](\.[0-9]+)+?)$/util-linux-ng:\1/'"; +utmdaemon;strict;unknown;"version\ [0-9]\.[0-9]+(-beta)?";"sed -r 's/version\ ([0-9](\.[0-9]+)+?).*/utmdaemon:\1/'"; +uvm;;unknown;"UVM\ [0-9](\.[0-9]+)+?";"sed -r 's/UVM\ ([0-9](\.[0-9]+)+?)$/uvm:\1/'"; +veritysetup;;GPL-2.0-or-later;"veritysetup\ [0-9](\.[0-9]+)+?$";"sed -r 's/veritysetup\ ([0-9](\.[0-9]+)+?)$/veritysetup:\1/'"; +vim;;Vim;"VIM\ -\ Vi\ IMproved\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/VIM\ -\ Vi\ IMproved\ ([0-9]+(\.[0-9]+)+?)\ .*/vim:\1/'"; +visudo;;unknown;"visudo\ version\ [0-9](\.[0-9]+)+?(p[0-9]+)?$";"sed -r 's/visudo\ version\ ([0-9](\.[0-9]+)+?(p[0-9]+)?)$/sudo:\1/'"; +vsftpd;;GPL-2.0-only;"^vsftpd: version [0-9](\.[0-9]+)+?$";"sed -r 's/vsftpd:\ version\ ([0-9](\.[0-9]+)+?)/vsftpd_project:vsftpd:\1/'"; +vxworks;;unknown;"^VxWorks\ [0-9](\.[0-9]+)+?$";"sed -r 's/VxWorks\ ([0-9](\.[0-9]+)+?)$/vxworks:\1/'"; +vxworks;;unknown;"VxWorks[0-9](\.[0-9]+)+?$";"sed -r 's/VxWorks([0-9](\.[0-9]+)+?)$/vxworks:\1/'"; +vxworks;;unknown;"VxWorks\ [0-9](\.[0-9]+)+?\ SMP";"sed -r 's/VxWorks\ ([0-9](\.[0-9]+)+).*/vxworks:\1/'"; +vxworks;;unknown;"vxWorks\ [0-9]\ SR[0-9]+$";"sed -r 's/[Vv]xWorks\ ([0-9])\ (SR[0-9]+)$/vxworks:\1:sr\2/'"; +vxworks;;unknown;"VxWorks\ operating\ system\ version\ \"[0-9](\.[0-9]+)+?\"";"sed -r 's/VxWorks\ operating\ system\ version\ \"([0-9](\.[0-9]+)+?)\"$/vxworks:\1/'"; +watchdog;;unknown;"watchdog\ version\ [0-9](\.[0-9]+)+?,\ usage\:";"sed -r 's/watchdog\ version\ ([0-9](\.[0-9]+)+?),\ .*/watchdog:\1/'"; +webio;;BSD-3-Clause;"^Webio\ Embedded\ server\ v[0-9](\.[0-9]+)+?$";"sed -r 's/Webio\ Embedded\ server\ v([0-9](\.[0-9]+)+?).*/webio:\1/'"; +watchquagga;;GPL-2.0-or-later;"watchquagga\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/watchquagga\ version\ ([0-9](\.[0-9]+)+?).*$/quagga:\1/'"; +wget;;GPL-3.0-only;"Wget\ [0-9](\.[0-9]+)+?,\ a\ non-interactive\ network\ retriever";"sed -r 's/Wget\ ([0-9](\.[0-9]+)+?),\ a\ .*/wget:\1/'"; +wget;;GPL-3.0-only;"Wget\ [0-9](\.[0-9]+)+?\ built\ on\ ";"sed -r 's/Wget\ ([0-9](\.[0-9]+)+?)\ built\ on.*/wget:\1/'"; +wget;multi_grep;GPL-3.0-only;'"^GNU Wget %s, a non-interactive network retriever.$"&&"^[0-9]\.[0-9]{2}(\.[0-9]+)+?$"';"sed -r 's/([0-9](\.[0-9]+)+?)/wget:\1/'"; +whatis;;unknown;"whatis\ [0-9](\.[0-9]+)+?$";"sed -r 's/whatis\ ([0-9](\.[0-9]+)+?)$/whatis:\1/'"; +which;;GPL-2.0-or-later;"^GNU\ which\ v[0-9]\.[0-9]+.*";"sed -r 's/GNU\ which\ v([0-9](\.[0-9]+)+?).*/gnu:which:\1/'"; +whiptail;;unknown;"whiptail\ \(newt\):\ [0-9](\.[0-9]+)+?";"sed -r 's/whiptail\ \(newt\):\ ([0-9](\.[0-9]+)+?)/whiptail:\1/'"; +whois;strict;unknown;"Version\ [0-9]\.[0-9]+\.[0-9]+";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?)/whois:\1/'"; +wifidog;;GPL-2.0-or-later;"^This\ is\ WiFiDog\ version\ [0-9]+(\.[0-9]+)+?";"sed -r 's/This\ is\ WiFiDog\ version\ ([0-9]+(\.[0-9]+)+?)/wifidog:\1/'"; +wimaxc;;unknown;"Beceem\ CSCM\ Command\ Line\ Client\ [0-9](\.[0-9]+)+?";"sed -r 's/Beceem\ CSCM\ Command\ Line\ Client\ ([0-9](\.[0-9]+)+?).*$/beceem:\1/'"; +wimaxd;;unknown;"Beceem\ CM\ Server\ [0-9](\.[0-9]+)+?";"sed -r 's/Beceem\ CM\ Server\ ([0-9](\.[0-9]+)+?).*$/beceem:\1/'"; +wireless-tools;;GPL-2.0-only;"Wireless-Tools\ version\ [0-9]+";"sed -r 's/Wireless-Tools\ version\ ([0-9]+).*$/wireless_tools:\1/'"; +wlxmlpatch;;unknown;"wlxmlpatch\ v[0-9](\.[0-9]+)+?$";"sed -r 's/wlxmlpatch\ v([0-9](\.[0-9]+)+?)$/wlxmlpatch:\1/'"; +wol;;unknown;"wol\ [0-9](\.[0-9]+)+?";"sed -r 's/wol\ ([0-9](\.[0-9]+)+?)/wol:\1/'"; +libwolfssl.so;strict;GPL-3.0-only;"^[0-9]\.[0-9](\.[0-9])+?$";"sed -r 's/([0-9](\.[0-9]+)+?)$/wolfssl:\1/'"; +wpa_cli;;BSD-3-Clause;"wpa_cli\ v[0-9](\.[0-9]+)+?$";"sed -r 's/wpa_cli\ v([0-9](\.[0-9]+)+?).*/wpa_cli:\1/'"; +wpa_cli;;BSD-3-Clause;"wpa_cli\ v[0-9](\.[0-9]+)+?\.x$";"sed -r 's/wpa_cli\ v([0-9](\.[0-9]+)+?).*/wpa_cli:\1/'"; +wpa_supplicant;;BSD-3-Clause;"^wpa_supplicant\ v[0-9](\.[0-9]+)+?(-devel)?$";"sed -r 's/wpa_supplicant\ v([0-9](\.[0-9]+)+?).*/wpa_supplicant:\1/'"; +wpa_supplicant;;BSD-3-Clause;"^wpa_supplicant\ v[0-9](\.[0-9]+)+?\.x$";"sed -r 's/wpa_supplicant\ v([0-9](\.[0-9]+)+?).*/wpa_supplicant:\1/'"; +wps_enr;strict;unknown;"^Version:\ [0-9](\.[0-9]+)+?$";"sed -r 's/Version:\ ([0-9](\.[0-9]+)+?)$/wps_enr:\1/'"; +xargs;multi_grep;GPL-3.0-only;'"^xargs$"&&"^environment\ is\ too\ large\ for\ exec$"&&"[0-9](\.[0-9]+)+?"';"sed -r 's/([0-9](\.[0-9]+)+?)/xargs:\1/'"; +xdb_70_monitor;;unknown;"^\*\*\*\*\ \ XDB\ 70\ Monitor\ V\ [0-9]+\.[0-9]+\ \(.*\),\ Copyright\ \(C\)\ SIEMENS\ AG\ [0-9]+\.\ All\ rights\ reserved\.\ \*\*\*\*$";"sed -r 's/\*\*\*\*\ \ XDB\ 70\ Monitor\ V\ ([0-9](\.[0-9]+)+?)$/siemens:xdb-monitor:\1/'"; +xfsprogs;;GPL-2.0-only;"^mkfs\.xfs\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/mkfs\.xfs\ version\ ([0-9](\.[0-9]+)+?)$/xfsprogs:\1/'"; +xfsprogs;;GPL-2.0-only;"^xfs_db\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/xfs_db\ version\ ([0-9](\.[0-9]+)+?)$/xfsprogs:\1/'"; +xfsprogs;;GPL-2.0-only;"^xfs_growfs\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/xfs_growfs\ version\ ([0-9](\.[0-9]+)+?)$/xfsprogs:\1/'"; +xfsprogs;;GPL-2.0-only;"^xfs_repair\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/xfs_repair\ version\ ([0-9](\.[0-9]+)+?)$/xfsprogs:\1/'"; +xl2tpd;;unknown;"xl2tpd\ server\ version\ xl2tpd-[0-9](\.[0-9]+)+?$";"sed -r 's/xl2tpd\ server\ version\ xl2tpd-([0-9](\.[0-9]+)+?)$/xl2tpd:\1/'"; +xl2tpd;;unknown;"xl2tpd\ version\ xl2tpd-[0-9](\.[0-9]+)+?\ started";"sed -r 's/xl2tpd\ version\ xl2tpd-([0-9](\.[0-9]+)+?)\ started.*$/xl2tpd:\1/'"; +xl2tpd;;unknown;"xl2tpd\ version:\ \ xl2tpd-[0-9](\.[0-9]+)+?$";"sed -r 's/xl2tpd\ version:\ \ xl2tpd-([0-9](\.[0-9]+)+?)$/xl2tpd:\1/'"; +xlink;;unknown;"XLINK\ v[0-9]+(\.[0-9]+)+?\ ";"sed -r 's/XLINK\ v([0-9]+(\.[0-9]+)+?)\ .*/xlink:\1/'"; +xmldb;;unknown;"xmldb\ version\ [0-9]+";"sed -r 's/xmldb\ version\ ([0-9]+)$/xmldb:\1/'"; +xsupplicant;;unknown;"^Xsupplicant\ [0-9](\.[0-9]+)+?$";"sed -r 's/Xsupplicant\ ([0-9]+(\.[0-9]+)+?)$/xsupplicant:\1/'"; +xxd;;unknown;"xxd\ V[0-9]\.[0-9]+.*by\ Juergen\ Weigert$";"sed -r 's/xxd\ V([0-9]+(\.[0-9]+)+?).*/xxd:\1/'"; +xz-utils;;unknown;"\(XZ\ Utils\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(XZ\ Utils\)\ ([0-9](\.[0-9]+)+?)$/xz-utils:\1/'"; +yat2m;;unknown;"yat2m\ [0-9]\.[0-9]+";"sed -r 's/yat2m\ ([0-9](\.[0-9]+)+?)$/yat2m:\1/'"; +ypdomainname;;unknown;"hostname\ [0-9]\.[0-9]+";"sed -r 's/hostname\ ([0-9](\.[0-9]+)+?)/hostname:\1/'"; +zebra;;GPL-2.0-only;"[Zz]ebra\ version\ [0-9](\.[0-9]+)+?([a-z])?";"sed -r 's/[Zz]ebra\ version\ ([0-9](\.[0-9]+)+?([a-z])?)/gnu:zebra:\1/'"; +zend-engine;;unknown;"Zend\ Engine\ v[0-9](\.[0-9]+)+?,\ Copyright.*Technologies$";"sed -r 's/Zend\ Engine\ v([0-9](\.[0-9]+)+?).*/zend:engine:\1/'"; +#zic;;unknown;"zic\.c.*[0-9](\.[0-9]+)+?$";"sed -r 's/.*zic\.c.*([0-9](\.[0-9]+)+?)(([a-z])?)$/zic:\1:\2/'"; +zic;;unknown;"zic\.c.*[0-9](\.[0-9]+)+$";"sed -r 's/.*zic\.c.*([0-9]\.[0-9]+?)$/zic:\1/'"; +zipcloack;;unknown;"ZipCloak\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/ZipCloak\ ([0-9](\.[0-9]+)+?)\ /info-zip:zipcloak:\1/'"; +zipnote;;unknown;"ZipNote\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/ZipNote\ ([0-9](\.[0-9]+)+?)\ /info-zip:zipnote:\1/'"; +zipsplit;;bsd-style;"ZipSplit\ [0-9](\.[0-9]+)+?";"sed -r 's/ZipSplit\ ([0-9](\.[0-9]+)+?)/info-zip:zip:\1/'"; +zlib;;Zlib;"deflate\ [0-9](\.[0-9]+)+?\ Copyright.*Mark\ Adler";"sed -r 's/deflate\ ([0-9](\.[0-9]+)+?)\ .*/zlib:\1/'"; +zlib;;Zlib;"inflate\ [0-9](\.[0-9]+)+?\ Copyright.*Mark Adler";"sed -r 's/inflate\ ([0-9](\.[0-9]+)+?)\ .*/zlib:\1/'"; +zlib;;Zlib;"^\ unzip\ [0-9]\.([0-9]+)\ Copyright 1998-20[0-9][0-9] Gilles Vollant.*$";"sed -r 's/\ unzip\ ([0-9])\.([0-9])([0-9]*)\ Copyright 1998-20[0-9][0-9] Gilles Vollant.*/zlib:\1.\2.\3/'"; +log4j-core*.jar;zgrep;Apache-2.0;"Log4jReleaseVersion";"sed -r 's/Log4jReleaseVersion:\ ([0-9](\.[0-9]+)+?)/log4j:\1/'"; \ No newline at end of file From 2fafa6d7e4a8e4835ffe36f1865dc83ea714303e Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Thu, 25 Jul 2024 17:17:32 -0700 Subject: [PATCH 02/42] using filetypeid plugin --- surfactant/infoextractors/native_lib_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/surfactant/infoextractors/native_lib_file.py b/surfactant/infoextractors/native_lib_file.py index fc11a996..15b9a1d7 100644 --- a/surfactant/infoextractors/native_lib_file.py +++ b/surfactant/infoextractors/native_lib_file.py @@ -7,8 +7,8 @@ import surfactant.plugin from surfactant.sbomtypes import SBOM, Software +from surfactant.filetypeid import id_magic -#START WITH CHECKING IF THEY'RE PE, ELF, OR MACH-O FILES def supports_file(filetype) -> bool: if filetype == "PE": return filetype == "PE" From efc1721ea839e3324bff2d8591f7b01fb625a6d9 Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Thu, 25 Jul 2024 17:18:04 -0700 Subject: [PATCH 03/42] using filetypeid plugin --- surfactant/infoextractors/native_lib_file.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/surfactant/infoextractors/native_lib_file.py b/surfactant/infoextractors/native_lib_file.py index 15b9a1d7..36ff08c4 100644 --- a/surfactant/infoextractors/native_lib_file.py +++ b/surfactant/infoextractors/native_lib_file.py @@ -10,14 +10,16 @@ from surfactant.filetypeid import id_magic def supports_file(filetype) -> bool: - if filetype == "PE": - return filetype == "PE" + # if filetype == "PE": + # return filetype == "PE" - if filetype == "ELF": - return filetype == "ELF" + # if filetype == "ELF": + # return filetype == "ELF" - if filetype == "MACH-O": - return filetype == "MACH-O" + # if filetype == "MACH-O": + # return filetype == "MACH-O" + + return identify_file_type(filetype) @surfactant.plugin.hookimpl def extract_file_info(sbom: SBOM, software: Software, filename: str, filetype: str) -> object: From 3362a8875e804b322dc89b89126b26d8ed1f5e0f Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Fri, 26 Jul 2024 16:18:59 -0700 Subject: [PATCH 04/42] adding as a new plugin --- surfactant/infoextractors/native_lib_file.py | 14 +- .../infoextractors/native_lib_patterns.cfg | 774 ------------------ surfactant/plugin/manager.py | 2 + 3 files changed, 6 insertions(+), 784 deletions(-) delete mode 100644 surfactant/infoextractors/native_lib_patterns.cfg diff --git a/surfactant/infoextractors/native_lib_file.py b/surfactant/infoextractors/native_lib_file.py index 36ff08c4..1794d190 100644 --- a/surfactant/infoextractors/native_lib_file.py +++ b/surfactant/infoextractors/native_lib_file.py @@ -8,18 +8,12 @@ import surfactant.plugin from surfactant.sbomtypes import SBOM, Software from surfactant.filetypeid import id_magic +#from enum import Enum, auto def supports_file(filetype) -> bool: - # if filetype == "PE": - # return filetype == "PE" - - # if filetype == "ELF": - # return filetype == "ELF" - - # if filetype == "MACH-O": - # return filetype == "MACH-O" + return filetype in ("PE", "ELF", "MACHO32", "MACHO64") + #return filetype in {ExeType.PE, ExeType.ELF, ExeType.MACHO32} - return identify_file_type(filetype) @surfactant.plugin.hookimpl def extract_file_info(sbom: SBOM, software: Software, filename: str, filetype: str) -> object: @@ -29,7 +23,7 @@ def extract_file_info(sbom: SBOM, software: Software, filename: str, filetype: s def extract_native_lib_info(filename): native_lib_info: Dict[str, Any] = {"nativeLibraries": []} - native_lib_file = pathlib.Path(__file__).parent / "native_lib_patterns.cfg" + native_lib_file = pathlib.Path(__file__).parent / "native_lib_patterns.json" try: with open(native_lib_file, "r") as regex: diff --git a/surfactant/infoextractors/native_lib_patterns.cfg b/surfactant/infoextractors/native_lib_patterns.cfg deleted file mode 100644 index b819c373..00000000 --- a/surfactant/infoextractors/native_lib_patterns.cfg +++ /dev/null @@ -1,774 +0,0 @@ -7-zip;;unknown;"7-Zip\ [0-9]\.[0-9]+\ \ Copyright\ \(c\)\ .*\ Igor\ Pavlov\ \ ";"sed -r 's/7-Zip\ ([0-9](\.[0-9]+)+?)\ .*/7-zip:\1/'"; -7-zip;;unknown;"^p7zip\ Version\ [0-9]+(\.[0-9]+)+?\ ";"sed -r 's/p7zip\ Version\ ([0-9]+(\.[0-9]+)+?).*/p7zip:\1/'"; -accessdb;;unknown;"accessdb\ [0-9]\.[0-9]+\.[0-9]+\.[0-9]+$";"sed -r 's/accessdb\ ([0-9](\.[0-9]+)+?)$/accessdb:\1/'"; -acpi;;unknown;"acpi\ [0-9](\.[0-9]+)+?$";"sed -r 's/acpi\ ([0-9](\.[0-9]+)+?)$/acpi:\1/'"; -acpid;;unknown;"acpid-[0-9](\.[0-9]+)+?$";"sed -r 's/acpid-([0-9](\.[0-9]+)+?)$/acpid:\1/'"; -afpd;;unknown;"^afpd\ [0-9](\.[0-9]+)+?\ -\ Apple\ Filing\ Protocol\ \(AFP\)\ daemon\ of\ Netatalk$";"sed -r 's/afpd\ ([0-9](\.[0-9]+)+?)\ .*\ Netatalk$/netatalk:afpd:\1/'"; -afpd;live;unknown;"^Netatalk\ [0-9](\.[0-9]+)+?\ \(name:\ .*\)$";"sed -r 's/Netatalk\ ([0-9](\.[0-9]+)+?)\ .*/netatalk:afpd:\1/'"; -agesa;;unknown;"AGESA\ Ontar2PIV[0-9](\.[0-9]+)+?$";"sed -r 's/AGESA\ Ontar2PIV([0-9](\.[0-9]+)+?)/agesa:\1/'"; -aircrack-ng;;GPL-2.0-only;"^\ \ Air[a-z]*-ng\ [0-9](\.[0-9]+)+?\ -\ \(C\)\ ";"sed -r 's/\ \ Air[a-z]*-ng\ ([0-9](\.[0-9]+)+?)\ .*/aircrack-ng:\1/'"; -aircrack-ng;;GPL-2.0-only;"^\ \ ivsTools\ [0-9](\.[0-9]+)+?\ -\ \(C\)\ ";"sed -r 's/\ \ ivsTools\ ([0-9](\.[0-9]+)+?)\ .*/aircrack-ng:\1/'"; -aircrack-ng;;GPL-2.0-only;"^\ \ makeivs-ng\ [0-9](\.[0-9]+)+?\ -\ \(C\)\ ";"sed -r 's/\ \ makeivs-ng\ ([0-9](\.[0-9]+)+?)\ .*/aircrack-ng:\1/'"; -aircrack-ng;;GPL-2.0-only;"^\ \ Packetforge-ng\ [0-9](\.[0-9]+)+?\ -\ \(C\)\ ";"sed -r 's/\ \ Packetforge-ng\ ([0-9](\.[0-9]+)+?)\ .*/aircrack-ng:\1/'"; -alsa;;unknown;"alsactl\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/alsactl\ version\ ([0-9](\.[0-9]+)+?)$/alsa:\1/'"; -ambashell;;unknown"^AmbaShell\ Test\ Command\ \[Version\ [0-9]\.[0-9]+(\.[0-9]+)?\]$";"sed -r 's/AmbaShell\ Test\ Command\ \[Version\ ([0-9](\.[0-9]+)+?)$/ambashell:\1/'"; -amixer;;unknown;"amixer\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/amixer\ version\ ([0-9](\.[0-9]+)+?)$/alsa:\1/'"; -amule;;GPL-2.0-only;"aMuleD\ [0-9](\.[0-9]+)+?\ compiled\ with\ ";"sed -r 's/aMuleD\ ([0-9](\.[0-9]+)+?)\ .*/amuled:\1/'"; -apache;;Apache-2.0;"^Server version: Apache/[0-9](\.[0-9]+)+?";"sed -r 's/^Server version: Apache\/([0-9](\.[0-9]+)+?)/apache:\1/g'"; -apstats;;unknown;"apstats\ v[0-9](\.[0-9]+)+?:\ Display\ Access\ Point\ Statistics\.";"sed -r 's/apstats\ v([0-9](\.[0-9]+)+?):\ .*/apstats:\1/'"; -apt;;GPL-3.0-only;"apt\ [0-9]+(\.[0-9]+)+?\ ";"sed -r 's/apt\ ([0-9]+(\.[0-9]+)+?)\ .*/apt:\1/'"; -apt;;GPL-3.0-only;"apt-Version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/apt-Version\ ([0-9](\.[0-9]+)+?)\ .*/apt:\1/'"; -apparmor;;GPL-2.0-only;"^AppArmor\ parser\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/AppArmor\ parser\ version\ ([0-9](\.[0-9]+)+?)$/apparmor:\1/'"; -arp;;GPL-3.0-only;"^arp\ [0-9](\.[0-9]+)+?\ \(.*\)$";"sed -r 's/arp\ ([0-9](\.[0-9]+)+?).*/arp:\1/'"; -arptables;;GPL-2.0-only;"arptables\ v[0-9](\.[0-9]+)+?-[0-9]:\ ";"sed -r 's/arptables\ v([0-9](\.[0-9]+)+?-[0-9]):\ /arptables:\1/'"; -asterisk;;GPL-2.0-only;"^Asterisk\ [0-9]+\.[0-9](\.[0-9]+)+?,\ Copyright";"sed -r 's/Asterisk\ ([0-9]+(\.[0-9]+)+?),\ .*/asterisk:\1/'"; -atftp;;GPL-2.0-only;"^atftp-[0-9]+(\.[0-9]+)+?\ ";"sed -r 's/atftp-([0-9](\.[0-9]+)+?)/aftp:\1/'"; -tftp-hpa;;BSD-3-Clause;"^tftp-hpa\ [0-9](\.[0-9]+)+?,\ with\ remap,\ without\ tcpwrappers$";"sed -r 's/tftp-hpa\ ([0-9](\.[0-9]+)+?),\ .*/tftp-hpa:\1/'"; -avahi-autoipd;;LGPL-2.0-or-later;"^avahi-[a-z]+\ [0-9](\.[0-9]+)+?$";"sed -r 's/avahi-[a-z]+\ ([0-9](\.[0-9]+)+?)$/avahi:avahi:\1/'"; -babeld;;MIT;"^babeld\ [Vv]ersion\ [0-9]+(\.[0-9]+)+$";"sed -r 's/babeld\ [Vv]ersion\ ([0-9]+(\.[0-9]+)+?)$/babeld:\1/'"; -bash;;GPL-3.0-only;"[Bb]ash.*version\ [0-9](\.[0-9]+)+?";"sed -r 's/[Bb]ash.*version\ ([0-9](\.[0-9]+)+?).*/bash:\1/'"; -bash;;GPL-3.0-only;"[Bb]ash,\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/[Bb]ash,\ version\ ([0-9](\.[0-9]+)+?).*/bash:\1/'"; -batctl;;GPL-3.0-only,mit;"^batctl\ 20[0-9]+\.[0-9]+\.[0-9]+$";"sed -r 's/batctl\ (20[0-9]+(\.[0-9]+)+?)$/batctl:\1/'"; -bc;;GPL-3.0-or-later;"^bc\ [0-9](\.[0-9]+)+?$";"sed -r 's/bc\ ([0-9](\.[0-9]+)+?)/bc:\1/'"; -bcrelay;;unknown;"BCrelay\ v[0-9](\.[0-9]+)+?";"sed -r 's/BCrelay\ v([0-9](\.[0-9]+)+?).*/bcrelay:\1/'"; -bftpd;strict;GPL-2.0-only;"^[0-9](\.[0-9]+)+?$";"sed -r 's/([0-9](\.[0-9]+)+?)$/bftpd:\1/'"; -bftpd;live;GPL-2.0-only;"^Bftpd\ [0-9](\.[0-9]+)+?$";"sed -r 's/Bftpd\ ([0-9](\.[0-9]+)+?)$/bftpd:\1/'"; -bgpd;;unknown;"bgpd\ [Vv]ersion\ [0-9]+(\.[0-9]+)+$";"sed -r 's/bgpd\ [Vv]ersion\ ([0-9]+(\.[0-9]+)+?)$/bgpd:\1/'"; -binary;;unknown;"^Binary\ V[0-9](\.[0-9]+)+?\ ";"sed -r 's/Binary\ V([0-9](\.[0-9]+)+?)\ .*/binary:\1/'"; -binutils;;GPL-3.0-only;"\(GNU\ Binutils.*\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ Binutils.*\)\ ([0-9](\.[0-9]+)+?)$/gnu:binutils:\1/'"; -binutils;;GPL-3.0-only;"\(GNU\ Binutils\ for\ Debian\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ Binutils\ for\ Debian\)\ ([0-9](\.[0-9]+)+?)$/gnu:binutils:\1/'"; -bird;;unknown;"^BIRD\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/BIRD\ version\ ([0-9](\.[0-9]+)+?)$/bird:\1/'"; -blkid;;unknown;"^blkid\ [0-9](\.[0-9]+)+?\ \(.*\)$";"sed -r 's/blkid\ ([0-9](\.[0-9]+)+?)\ .*/blkid:\1/'"; -blockman;;unknown;"^blockman\ [0-9](\.[0-9]+)+?\.blockman\ build-[0-9]+$";"sed -r 's/blockman\ ([0-9](\.[0-9]+)+?)\..*/blockman:\1/'"; -boa;;unknown;"Boa\ HTTPd\ [0-9](\.[0-9]+)+?(rc[0-9]+)?";"sed -r 's/Boa\ HTTPd\ ([0-9](\.[0-9]+)+?(rc[0-9]+)?)/boa:boa:\1/'"; -booster;;unknown;"BoosterMainFunction:305:\ Version:\ [0-9](\.[0-9])+?";"sed -r 's/BoosterMainFunction:305:\ Version:\ ([0-9](\.[0-9]+)+?).*/booster:\1/'"; -bootlogd;;unknown;"\ bootlogd\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/\ bootlogd\ ([0-9](\.[0-9]+)+?)\ .*/bootlogd:\1/'"; -bpalogin;;GPL-2.0-only;"BPALogin\ v[0-9](\.[0-9])+?\ -\ portable\ BigPond\ Broadband\ login\ client$";"sed -r 's/BPALogin\ v([0-9](\.[0-9]+)+?)\ .*/bpalogin:\1/'"; -bpalogin;;GPL-2.0-only;"^BPALogin\ v[0-9](\.[0-9]+)+?\ -\ lightweight\ portable\ BIDS2\ login\ client$";"sed -r 's/BPALogin\ v([0-9](\.[0-9]+)+?)\ .*/bpalogin:\1/'"; -brctl;;unknown;"^brctl,\ [0-9](\.[0-9])+?$";"sed -r 's/brctl,\ ([0-9](\.[0-9]+)+?)$/brctl:\1/'"; -bridge-utils;;unknown;"bridge-utils,\ [0-9](\.[0-9])+?$";"sed -r 's/bridge-utils,\ ([0-9](\.[0-9]+)+?)$/bridge-utils:\1/'"; -bridge-utility;;unknown;"^bridge\ utility,\ [0-9](\.[0-9]+)+?$";"sed -r 's/bridge\ utility,\ ([0-9](\.[0-9]+)+?)$/bridge-utility:\1/'"; -brltty;;LGPL-2.1-only;"BRLTTY\ [0-9]\.[0-9]+\.[0-9]+\ rev\ BRLTTY-[0-9]\.[0-9]+\.[0-9]+\ ";"sed -r 's/BRLTTY\ ([0-9](\.[0-9]+)+?).*/brltty:\1/'"; -brltty;;LGPL-2.1-only;"BRLTTY\ [0-9]\.[0-9]+\ rev\ BRLTTY-[0-9]\.[0-9]+\ ";"sed -r 's/BRLTTY\ ([0-9](\.[0-9]+)+?).*/brltty:\1/'"; -btconfig;;unknown;"btconfig\ -\ BTCONFIG\ Tool\ ver\ [0-9](\.[0-9]+)+?$";"sed -r 's/btconfig\ -\ BTCONFIG\ Tool\ ver\ ([0-9](\.[0-9]+)+?)$/btconfig:\1/'"; -btrfs;;unknown;"^Btrfs\ Btrfs\ v[0-9](\.[0-9]+)+?$";"sed -r 's/Btrfs\ Btrfs\ v([0-9](\.[0-9]+)+?).*/btrfs:\1/'"; -buildroot;;unknown;"getconf\ \(Buildroot\)\ [0-9]\.[0-9]+$";"sed -r 's/.*\(Buildroot\)\ ([0-9](\.[0-9]+)+?)/buildroot:\1/'"; -busybox;;GPL-2.0-only;"BusyBox\ v[0-9](\.[0-9]+)+?\ ";"sed -r 's/BusyBox\ v([0-9](\.[0-9]+)+?)\ .*/busybox:\1/'"; -busybox;;GPL-2.0-only;"BusyBox\ v[0-9](\.[0-9]+)+?\ \([0-9]+-.*\)";"sed -r 's/BusyBox\ v([0-9](\.[0-9]+)+?)\ .*/busybox:\1/'"; -busybox;;GPL-2.0-only;"BusyBox\ v[0-9](\.[0-9]+)+?.*\ multi-call\ binary";"sed -r 's/BusyBox\ v([0-9](\.[0-9]+)+?).*/busybox:\1/'"; -busybox;;GPL-2.0-only;"BusyBox\ v[0-9](\.[0-9]+)+?.*\ Built-in\ shell";"sed -r 's/BusyBox\ v([0-9](\.[0-9]+)+?)\ .*/busybox:\1/'"; -busybox;live;GPL-2.0-only;"^BusyBox\ http\ [0-9](\.[0-9]+)+?$";"sed -r 's/BusyBox\ http\ ([0-9](\.[0-9]+)+?)$/busybox:\1/'"; -bzip2;;bzip2-1.0.6;"^bzip2,\ a\ block-sorting\ file\ compressor\.\ \ Version\ [0-9](\.[0-9]+)+?,\ ";"sed -r 's/bzip2,\ a\ block-sorting\ file\ compressor\.\ \ Version\ ([0-9](\.[0-9]+)+?),\ .*/bzip2:\1/'"; -bzip2;;bzip2-1.0.6;"bzip2recover\ [0-9](\.[0-9]+)+?:\ extracts";"sed -r 's/bzip2recover\ ([0-9](\.[0-9]+)+?):\ .*/bzip2:\1/'"; -cape;;unknown;"^cape\ [0-9](\.[0-9])+?$";"sed -r 's/cape\ ([0-9](\.[0-9]+)+?)$/cape:\1/'"; -candump;;GPL-2.0-only;"^candump\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/candump\ ([0-9]+(\.[0-9]+)+?)$/can-utils:\1/'"; -cansequence;;GPL-2.0-only;"^cansequence\ [0-9](\.[0-9]+)+?$";"sed -r 's/cansequence\ ([0-9]+(\.[0-9]+)+?)$/can-utils:\1/'"; -ccrypt;;GPL-2.0-or-later;"ccrypt\ [0-9](\.[0-9]+)+?\.\ Secure\ encryption\ and\ decryption\ of\ files\ and\ streams\.";"sed -r 's/ccrypt\ ([0-9]+(\.[0-9]+)+?).*/ccrypt:\1/'"; -ccrypt;multi_grep;GPL-2.0-or-later;'"^ccrypt$"&&"^\%s\ \%s\.\ Secure\ encryption\ and\ decryption\ of\ files\ and\ streams\.$"&&"[0-9](\.[0-9]+)+?";"sed -r 's/([0-9]+(\.[0-9]+)+?)/ccrypt:\1/'"; -cdialog;;unknown;"^cdialog\ .+\ version\ [0-9]\.[0-9]-[0-9]+";"sed -r 's/cdialog\ .*\ version\ ([0-9]+(\.[0-9]+)+?).*/cdialog:\1/'"; -chillispot;;unknown;"^chillispot\ [0-9](\.[0-9]+)+?$";"sed -r 's/chillispot\ ([0-9]+(\.[0-9]+)+?).*/chillispot:\1/'"; -chrony;;unknown;"^chrony[cd]\ \(chrony\)\ version\ [0-9]\.[0-9]+";"sed -r 's/chrony[cd]\ \(chrony\)\ version\ ([0-9]+(\.[0-9]+)+?)/chrony:\1/'"; -cifs-utils;;unknown;"mount\.cifs\ version\:\ [0-9]\.[0-9]+";"sed -r 's/mount\.cifs\ version:\ ([0-9]+(\.[0-9]+)+?).*/cifs-utils:\1/'"; -clear_console;;unknown;"^clear_console:\ Version\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/clear_console:\ Version\ ([0-9]+(\.[0-9]+)+?)$/clear_console:\1/'"; -comgt;;unknown;"comgt\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/comgt\ version\ ([0-9](\.[0-9]+)+?).*/comgt:\1/'"; -conntrack;;unknown;"conntrack\ v[0-9](\.[0-9]+)+?\ \(conntrack-tools\)";"sed -r 's/conntrack\ v([0-9](\.[0-9]+)+?).*/conntrack-tools:\1/'"; -coreutils;;GPL-3.0-only;"\(GNU\ coreutils\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ coreutils\)\ ([0-9](\.[0-9]+)+?)$/gnu:coreutils:\1/'"; -coreboot;;GPL-2.0-only;"coreboot\ toolchain\ v[0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9a-z]+";"sed -r 's/coreboot\ toolchain\ v([0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9a-z]+)/coreboot:\1/'"; -coreboot;;GPL-2.0-only;"COREBOOT_VERSION: [0-9]\.[0-9]+?(-[0-9]+)?(-[0-9a-z]+)?(-dirty)?";"sed -r 's/COREBOOT_VERSION: ([0-9]\.[0-9]+?(-[0-9]+)?(-[0-9a-z]+)?(-dirty)?)/coreboot:\1/'" -coova;;GPL-3.0-only;"^coova-chilli\ [0-9](\.[0-9]+)+?$";"sed -r 's/coova-chilli\ ([0-9](\.[0-9]+)+?)$/:coova-chilli:\1/'"; -cp443-1;;proprietary;"^\@\(\#1\)\ CP443-1\ GX20\ V\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/\@\(\#1\)\ CP443-1\ GX20\ v\ ([0-9]\.[0-9]\.[0-9]).*/simatic_cp443-1_firmware \1/'"; -cp443-1;;proprietary;"^\ Firmware\ Update\ V[0-9](\.[0-9]+)+?\ for\ the\ communication\ processor\ CP443-1$";"sed -r 's/Firmware\ Update\ V([0-9]\.[0-9]\.[0-9]+)\ for\ the\ communication\ processor\ CP443-1/simatic_cp443-1_firmware \1/'"; -crtmpserver;;unknown;"C++\ RTMP\ Server\ .*\ version\ v[0-9](\.[0-9])+?\ r\.[0-9]+";"sed -r 's/C++\ RTMP\ Server\ .*\ version\ v([0-9]+(\.[0-9]+)+?).*/crtmpserver:\1/'"; -cryptsetup;;unknown;"cryptsetup\ [0-9](\.[0-9]+)+?$";"sed -r 's/cryptsetup\ ([0-9](\.[0-9]+)+?)$/cryptsetup:\1/'"; -cups;;unknown;"^cups\ BJNP\ backend\ -\ version\ [0-9]\.[0-9]$";"sed -r 's/cups\ BJNP\ backend\ -\ version\ ([0-9](\.[0-9]+)+?)$/cups:\1/'"; -curl;;curl;"^curl\ [0-9](\.[0-9]+)+?";"sed -r 's/curl\ ([0-9](\.[0-9]+)+?).*/curl:\1/'"; -cvtsudoers;;unknown;"cvtsudoers\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/cvtsudoers\ version\ ([0-9](\.[0-9]+)+?)$/sudo:\1/'"; -dbus-tools;;unknown;"D-Bus\ [ a-zA-Z0-9]+\ [0-9](\.[0-9]+)+?";"sed -r 's/D-Bus\ .*\ ([0-9](\.[0-9]+)+?).*/freedesktop:dbus:\1/'"; -dbus-tools;;unknown;"dbus-run-session\ [0-9](\.[0-9]+)+?$";"sed -r 's/dbus-run-session\ ([0-9](\.[0-9]+)+?)$/freedesktop:dbus:\1/'"; -ddnsd;;unknown;"ddnsd\ version\ [0-9]\.[0-9]";"sed -r 's/ddnsd\ version\ ([0-9](\.[0-9]+)+?).*/ddnsd:\1/'"; -ddrescue;;GPL-2.0-or-later;"^GNU\ ddrescue\ [0-9](\.[0-9]+)+?$";"sed -r 's/GNU\ ddrescue\ ([0-9](\.[0-9]+)+?)$/gnu:ddrescue:\1/'"; -debootstrap;;unknown;"debootstrap\ [0-9](\.[0-9]+)+?$";"sed -r 's/debootstrap\ ([0-9](\.[0-9]+)+?)$/debootstrap:\1/'"; -debugfs;;unknown;"^debugfs\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/debugfs\ ([0-9](\.[0-9]+)+?).*/e2fsprogs:\1/'"; -debugreiserfs;;unknown;"debugreiserfs\ [0-9](\.[0-9]+)+?$";"sed -r 's/debugreiserfs\ ([0-9](\.[0-9]+)+?)$/debugreiserfs:\1/'"; -depmod;;unknown;"depmod\ [0-9](\.[0-9]+)+?\ --\ part\ of\ module-init-tools$";"sed -r 's/depmod\ ([0-9](\.[0-9]+)+?)\ .*/depmod:\1/'"; -insmod;;unknown;"insmod\ [0-9](\.[0-9]+)+?\ --\ part\ of\ module-init-tools$";"sed -r 's/insmod\ ([0-9](\.[0-9]+)+?)\ .*/insmod:\1/'"; -modinfo;;unknown;"modinfo\ [0-9](\.[0-9]+)+?\ --\ part\ of\ module-init-tools$";"sed -r 's/modinfo\ ([0-9](\.[0-9]+)+?)\ .*/modinfo:\1/'"; -modprobe;;unknown;"modprobe\ [0-9](\.[0-9]+)+?\ --\ part\ of\ module-init-tools$";"sed -r 's/modprobe\ ([0-9](\.[0-9]+)+?)\ .*/modprobe:\1/'"; -davfs2;;GPL-3.0-only;"^davfs2\ [0-9](\.[0-9]+)+?$";"sed -r 's/davfs2\ ([0-9](\.[0-9]+)+?)$/davfs2:\1/'"; -delphi;;unknown;"^Embarcadero Delphi for Win32 compiler version [0-9]+\.[0-9]\ \([0-9]+\.[0-9]\.[0-9]+\.[0-9]+\)$";"sed -r 's/^Embarcadero Delphi for Win32 compiler version [0-9]+\.[0-9]\ \(([0-9]+\.[0-9]\.[0-9]+\.[0-9]+)\)$/embarcadero:embarcadero_delphi_xe6:\1/'"; -dhcpcd;;unknown;"DHCP\ Client\ Daemon\ v\.[0-9](\.[0-9]+)+?(-p[0-9]+)?";"sed -r 's/DHCP\ Client\ Daemon\ v\.([0-9](\.[0-9]+)+?(-p[0-9]+)?).*/dhcpcd:\1/'"; -dhcpfwd;;unknown;"dhcp-forwarder\ [0-9](\.[0-9])+?$";"sed -r 's/dhcp-forwarder\ ([0-9](\.[0-9]+)+?)$/dhcp-forwarder:\1/'"; -dhtest;;GPL-2.0-only;"dhtest\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/dhtest\ version\ ([0-9](\.[0-9]+)+?)$/dhtest:\1/'"; -diffutils;;unknown;"\(GNU\ diffutils\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ diffutils\)\ ([0-9](\.[0-9]+)+?)$/gnu:diffutils:\1/'"; -dig;;unknown;"^DiG\ [0-9]+(\.[0-9]+)+?(-P[0-9])?$";"sed -r 's/DiG\ ([0-9]+(\.[0-9]+)+?(-P[0-9])?)$/dig:\1/'"; -discover;;unknown;"^discover\ [0-9](\.[0-9]+)+?$";"sed -r 's/discover\ ([0-9](\.[0-9]+)+?)$/discover:\1/'"; -dmeventd;;unknown;"^dmeventd\ version:\ [0-9]\.[0-9]+\.[0-9]+\ ";"sed -r 's/dmeventd\ version:\ ([0-9](\.[0-9]+)+?)/dmeventd:\1/'"; -dmidecode;;unknown;"dmidecode\ [0-9]\.[0-9]+";"sed -r 's/dmidecode\ ([0-9](\.[0-9]+)+?)/dmidecode:\1/'"; -dnrd;;unknown;"dnrd\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/dnrd\ version\ ([0-9](\.[0-9]+)+?)$/dnrd:\1/'"; -dnsmasq;;GPL-3.0-only;"dnsmasq-[0-9]\.[0-9]+$";"sed -r 's/dnsmasq-([0-9](\.[0-9]+)+?)$/dnsmasq:\1/'"; -dnsmasq;;GPL-3.0-only;"dnsmasq\ [0-9]\.[0-9]+$";"sed -r 's/dnsmasq\ ([0-9](\.[0-9]+)+?)$/dnsmasq:\1/'"; -dnsmasq;;GPL-3.0-only;"^[dD]nsmasq\ version\ [0-9]\.[0-9]+";"sed -r 's/[dD]nsmasq\ version\ ([0-9](\.[0-9]+)+?).*/dnsmasq:\1/'"; -dos2unix;;bsd-style;"dos2unix\ [0-9](\.[0-9]+)+?";"sed -r 's/dos2unix\ ([0-9](\.[0-9]+)+?)/dos2unix:\1/'"; -unix2dos;;bsd-style;"unix2dos\ [0-9](\.[0-9]+)+?";"sed -r 's/unix2dos\ ([0-9]+(\.[0-9]+)+?)/unix2dos:\1/'"; -dosfsck;;unknown;"dosfsck\ [0-9](\.[0-9]+)+?";"sed -r 's/dosfsck\ ([0-9](\.[0-9]+)+?).*/dosfstools:\1/'"; -dpiclass;;unknown;"dpiclass\ [0-9]\.[0-9]\.[0-9]\ \(c\)\ 20[0-9][0-9]\ NETDUMA\ Software$";"sed -r 's/dpiclass\ ([0-9](\.[0-9]+)+?).*/dpiclass:\1/'"; -dpkg;;GPL-2.0-only;"dpkg-deb\ version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/dpkg-deb\ version\ ([0-9](\.[0-9]+)+?)\ .*/dpkg:\1/'"; -dpkg;;GPL-2.0-only;"dpkg-divert\ version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/dpkg-divert\ version\ ([0-9](\.[0-9]+)+?)\ .*/dpkg:\1/'"; -dpkg;;GPL-2.0-only;"dpkg-split\ version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/dpkg-split\ version\ ([0-9](\.[0-9]+)+?)\ .*/dpkg:\1/'"; -dpkg;;GPL-2.0-only;"dpkg-trigger\ version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/dpkg-trigger\ version\ ([0-9](\.[0-9]+)+?)\ .*/dpkg:\1/'"; -drflocs;;unknown;"^drflocs\ [0-9](\.[0-9]+)+?\ release$";"sed -r 's/drflocs\ ([0-9](\.[0-9]+)+?)\ .*/drflocs:\1/'"; -dropbear;;MIT;"^Dropbear\ multi-purpose\ version\ 20[0-9][0-9]\.[0-9][0-9]$";"sed -r 's/Dropbear\ multi-purpose\ version\ ([0-9]+(\.[0-9]+)+?)$/dropbear_ssh:\1/'"; -dropbear;;MIT;"^Dropbear\ multi-purpose\ version\ [0-9]\.[0-9]+$";"sed -r 's/Dropbear\ multi-purpose\ version\ ([0-9]+(\.[0-9]+)+?)$/dropbear_ssh:\1/'"; -dropbear;;MIT;"Dropbear\ sshd\ [0-9]\.[0-9]+$";"sed -r 's/Dropbear\ sshd\ ([0-9]+(\.[0-9]+)+?)$/dropbear_ssh:\1/'"; -dropbear;;MIT;"^Dropbear\ client\ [0-9]\.[0-9]+$";"sed -r 's/Dropbear\ client\ ([0-9]+(\.[0-9]+)+?)$/dropbear_ssh:\1/'"; -dropbear;;MIT;"Dropbear\ sshd\ v[0-9]+\.[0-9]+$";"sed -r 's/Dropbear\ sshd\ v([0-9]+(\.[0-9]+)+?)$/dropbear_ssh:\1/'"; -dropbear;;MIT;"Dropbear\ SSH\ multi-purpose\ v[0-9]+\.[0-9]+";"sed -r 's/Dropbear\ SSH\ multi-purpose\ v([0-9]+(\.[0-9]+)+?).*/dropbear_ssh:\1/'"; -dropbear;;MIT;"^Dropbear\ SSH\ multi-purpose\ v20[0-9][0-9]\.[0-9]+$";"sed -r 's/Dropbear\ SSH\ multi-purpose\ v([0-9]+(\.[0-9]+)+?)$/dropbear_ssh:\1/'"; -dropbear;;MIT;"^Dropbear\ sshd\ v20[0-9][0-9]\.[0-9][0-9]$";"sed -r 's/Dropbear\ sshd\ v([0-9]+(\.[0-9]+)+?)$/dropbear_ssh:\1/'"; -dropbear;;MIT;"^Dropbear\ v20[0-9][0-9]\.[0-9][0-9]$";"sed -r 's/Dropbear\ v([0-9]+(\.[0-9]+)+?)$/dropbear_ssh:\1/'"; -dropbear;live;MIT;"Dropbear\ sshd\ 20[0-9]+\.[0-9]+\ \(protocol\ 2\.0\)$";"sed -r 's/Dropbear\ sshd\ (20[0-9]+(\.[0-9]+)+?).*/dropbear_ssh:\1/'"; -dumpe2fs;;unknown;"dumpe2fs\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/dumpe2fs\ ([0-9](\.[0-9]+)+?).*/e2fsprogs:\1/'"; -dumpimage;;GPL-2.0-or-later;"^dumpimage\ version\ 20[0-9]+(\.[0-9]+)+?";"sed -r 's/dumpimage\ version\ ([0-9]+(\.[0-9]+)+?).*/uboot:dumpimage:\1/'"; -dxml;;unknown;"^dxml\ version\ [0-9]\.[0-9]b[0-9]+$";"sed -r 's/dxml\ version\ ([0-9](\.[0-9]+)+?(b[0-9]+)?)$/dxml:\1/'"; -dxmlc;;unknown;"^dxmlc\ version\ [0-9]\.[0-9]b[0-9]+$";"sed -r 's/dxmlc\ version\ ([0-9](\.[0-9]+)+?(b[0-9]+)?)$/dxml:\1/'"; -dyndns;;unknown;"DynDns\ Update\ v[0-9]\.[0-9]+.*\ AlphaNetworks,Inc\.";"sed -r 's/DynDns\ Update\ v([0-9](\.[0-9]+)+?).*\ AlphaNetworks.*/alphanetworks:dyndns:\1/'"; -e2fsck;;unknown;"e2fsck\ [0-9](\.[0-9]+)+?";"sed -r 's/e2fsck\ ([0-9](\.[0-9]+)+?).*/e2fsprogs:\1/'"; -e2image;;unknown;"e2image\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/e2image\ ([0-9](\.[0-9]+)+?).*/e2fsprogs:\1/'"; -easyroaming;;unknown;"^Easy\ Roaming\ Version\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/Easy\ Roaming\ Version\ ([0-9]+(\.[0-9]+)+?)$/easyroaming:\1/'"; -ebtables;;GPL-2.0-or-later;"ebtables\ v[0-9](\.[0-9]+)+?\ ";"sed -r 's/ebtables\ v([0-9](\.[0-9]+)+?)\ .*/ebtables:\1/'"; -ebtables;;GPL-2.0-or-later;"ebtables\ v[0-9](\.[0-9]+)+?-rc[0-9]\ ";"sed -r 's/ebtables\ v([0-9](\.[0-9]+)+?-rc[0-9])\ .*/ebtables:\1/'"; -ebtables;;GPL-2.0-or-later;"ebtables\ v[0-9](\.[0-9]+)+?-[0-9]\ ";"sed -r 's/ebtables\ v([0-9](\.[0-9]+)+?-[0-9])\ .*/ebtables:\1/'"; -ecmh;;BSD-3-Clause;"Easy\ Cast\ du\ Multi\ Hub\ \(ecmh\)\ [0-9]+\.[0-9]+\.[0-9]+\ by\ Jeroen\ Massar\ ";"sed -r 's/Easy\ Cast\ du\ Multi\ Hub\ \(ecmh\)\ ([0-9]+(\.[0-9]+)+?).*/ecmh:\1/'"; -eeprog;;GPL-2.0-or-later;"eeprog\ [0-9](\.[0-9]+)+?,\ a\ [0-9]+Cxx\ EEPROM\ reader/writer$";"sed -r 's/\eeprog\ ([0-9](\.[0-9]+)+?),\ .*/eeprog:\1/'"; -eglibc;;LGPL-2.1-only;"\(.*\ EGLIBC\ .*\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(.*\ EGLIBC\ .*\)\ ([0-9](\.[0-9]+)+?)$/eglibc:\1/'"; -eglibc;;LGPL-2.1-only;"\(EGLIBC\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(EGLIBC\)\ ([0-9](\.[0-9]+)+?)$/eglibc:\1/'"; -eglibc;;LGPL-2.1-only;"\ \(Debian\ EGLIBC\ [0-9](\.[0-9]+)+?-[0-9]\)\ .*\ [0-9]\.[0-9]";"sed -r 's/zdump\ \(Debian\ EGLIBC\ ([0-9](\.[0-9]+)+?)-[0-9]\)\ )$/eglibc:\1/'"; -eglibc;;LGPL-2.1-only;"\(Debian\ EGLIBC\ [0-9](\.[0-9]+)+?-[0-9]\)\ ([0-9](\.[0-9]+)+?).*";"sed -r 's/\(Debian\ EGLIBC\ [0-9](\.[0-9]+)+?-[0-9]+.*\)\ ([0-9](\.[0-9]+)+?)/eglibc:\2/"; -eject;;unknown;"[Ee]ject\ Version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/[Ee]ject\ Version\ ([0-9](\.[0-9]+)+?)\ .*/eject:\1/'"; -elog;;unknown;"event\ log\ utility\ v[0-9](\.[0-9]+)+?";"sed -r 's/event\ log\ utility\ v([0-9](\.[0-9]+)+?).*/elog:\1/'"; -embedthis;;unknown;"^Embedthis\ Appweb\ [0-9](\.[0-9]+)+?";"sed -r 's/Embedthis\ Appweb\ ([0-9](\.[0-9]+)+?).*/embedthis:appweb:\1/'"; -espeakup;;unknown;"ESpeakup\ [0-9](\.[0-9]+)+?$";"sed -r 's/ESpeakup\ ([0-9](\.[0-9]+)+?)$/espeakup:\1/'"; -ethswctl.c;;unknown;"^ethswctl\.c:v[0-9](\.[0-9]+)+?";"sed -r 's/ethswctl\.c:v([0-9](\.[0-9]+)+?).*/ethswctl:\1/'"; -ethtool;;unknown;"ethtool\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/ethtool\ version\ ([0-9](\.[0-9]+)+?).*/ethtool:\1/'"; -libext2fs;;unknown;"^EXT2FS\ Library\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/EXT2FS\ Library\ version\ ([0-9](\.[0-9]+)+?)$/e2fsprogs:\1/'"; -ez-ipupdate;;GPL-2.0-only;"[0-9](\.[0-9]+)+?\ -\ $Id:\ ez-ipupdate.c,v\ [0-9]\.[0-9]+";"sed -r 's/([0-9](\.[0-9]+)+?)\ -\ $Id:\ ez-ipupdate.c,v\ [0-9]\.[0-9]+/ez-ipupdate:\1/'"; -ez-ipupdate;;GPL-2.0-only;"ez-ipupdate:\ -\ [0-9](\.[0-9]+)+?";"sed -r 's/ez-ipupdate:\ -\ ([0-9](\.[0-9]+)+?)/ez-ipupdate:\1/'"; -fdisk;;GPL-2.0-only;"^fdisk\ v[0-9](\.[0-9]+)+?([a-z])?$";"sed -r 's/fdisk\ v([0-9](\.[0-9]+)+?([a-z])?)$/fdisk:\1/'"; -ffmpeg;;LGPL-2.1-or-later;"^ffmpeg version [0-9](\.[0-9]+)+? Copyright \(c\) 20[0-9]+-20[0-9]+ the FFmpeg developers";"sed -r 's/^ffmpeg version ([0-9](\.[0-9]+)+?) Copyright \(c\) 20[0-9]+-20[0-9]+ the FFmpeg developers$/ffmpeg:ffmpeg:\1/'"; -file;;unknown;"file-[0-9](\.[0-9]+)+?$";"sed -r 's/file-([0-9](\.[0-9]+)+?)$/file:\1/'"; -flash_eraseall;;unknown;"flash_eraseall\ \$Revision:\ [0-9](\.[0-9]+)+?\ \$";"sed -r 's/flash_eraseall\ \$Revision:\ ([0-9](\.[0-9]+)+?).*/mtd-utils:\1/'"; -flash_erase;;unknown;"flash_erase\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/flash_erase\ version\ ([0-9](\.[0-9]+)+?).*/mtd-utils:\1/'"; -flatfsd;;unknown;"flatfsd\ [0-9](\.[0-9])+?mtd";"sed -r 's/flatfsd\ ([0-9](\.[0-9]+)+?)mtd/uclinux:flatfsd:\1/'"; -flex;;unknown;"^flex\ [0-9](\.[0-9]+)+?$";"sed -r 's/flex\ ([0-9](\.[0-9]+)+?)$/flex:\1/'"; -flex;;unknown;"flex\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/flex\ ([0-9](\.[0-9]+)+?)$/flex:\1/'"; -flowman;;unknown;"^flowman\ [0-9]\.[0-9]\.[0-9]\.flowman\ build-[0-9]+$";"sed -r 's/flowman\ ([0-9](\.[0-9]+)+?).*/flowman:\1/'"; -fota;;unknown;"^fota\ client\ version:\ [0-9](\.[0-9]+)+?\.$";"sed -r 's/fota\ client\ version\:\ ([0-9](\.[0-9]+)+)?\.$/fota_client:\1/'"; -fota;;unknown;"^fota\ tz\ client\ version:\ [0-9](\.[0-9]+)+?\.$";"sed -r 's/fota\ tz\ client\ version\:\ ([0-9](\.[0-9]+)+?)\.$/fota_client:\1/'"; -freebsd;;BSD-2-Clause;"FreeBSD\ [0-9]+(\.[0-9])+?-RELEASE\ ";"sed -r 's/FreeBSD\ ([0-9]+(\.[0-9]+)+?)-RELEASE\ $/freebsd:\1/'"; -freebsd;;BSD-2-Clause;"FreeBSD\ [0-9]+(\.[0-9])+?-RELEASE-p[0-9]\ ";"sed -r 's/FreeBSD\ ([0-9]+(\.[0-9]+)+?)-RELEASE-([a-z]([0-9]+))\ $/freebsd:\1:\3/'"; -freeradius;;GPL-2.0-only;"^radiusd:\ FreeRADIUS\ Version\ [0-9](\.[0-9]+)+?";"sed -r 's/radiusd:\ FreeRADIUS\ Version\ ([0-9](\.[0-9]+)+?).*/freeradius:\1/'"; -freeradius;;GPL-2.0-only;"^FreeRADIUS\ Version\ [0-9](\.[0-9]+)+?";"sed -r 's/FreeRADIUS\ Version\ ([0-9](\.[0-9]+)+?).*/freeradius:\1/'"; -freeradius-radclient;;GPL-2.0-only;"radclient:\ [0-9]\.[0-9]+\.[0-9]+\ built\ on\ ";"sed -r 's/radclient:\ ([0-9](\.[0-9]+)+?).*/freeradius:radclient:\1/'"; -ftop;;unknown;"^ftptop\/[0-9](\.[0-9]+)+?$";"sed -r 's/ftptop\/([0-9](\.[0-9]+)+?)$/ftptop:\1/'"; -libfuse;;GPL-2.0-only;"FUSE\ library\ version:\ [0-9](\.[0-9]+)+?";"sed -r 's/FUSE\ library\ version:\ ([0-9](\.[0-9]+)+?)/libfuse:\1/'"; -fuser;;unknown;"fuser\ \(PSmisc\)\ [0-9]+(\.[0-9]+)+?";"sed -r 's/fuser\ \(PSmisc\)\ ([0-9]+(\.[0-9]+)+?)/fuser:\1/'"; -fusermount;;unknown;"fusermount\ version:\ [0-9](\.[0-9])+?";"sed -r 's/fusermount\ version:\ ([0-9](\.[0-9]+)+?).*/fusermount:\1/'"; -gctwimax;;unknown;"GCTwimax\ [0-9](\.[0-9])+?rc[0-9]";"sed -r 's/GCTwimax\ ([0-9](\.[0-9]+)+?(rc[0-9])?).*/gctwimax:\1/'"; -gdb;;GPL-3.0-only;"GNU\ gdb\ \(Debian\ [0-9](\.[0-9]+)+?-[0-9]+\)\ ";"sed -r 's/GNU\ gdb\ \(Debian\)\ ([0-9](\.[0-9]+)+?)/gdb:\1/'"; -gdb;;GPL-3.0-only;"GNU\ gdb\ \(GDB\)\ [0-9](\.[0-9]+)+?";"sed -r 's/GNU\ gdb\ \(GDB\)\ ([0-9](\.[0-9]+)+?)/gdb:\1/'"; -gdbserver;;GPL-3.0-only;"^GNU\ gdbserver\ [0-9](\.[0-9]+)+?$";"sed -r 's/GNU\ gdbserver\ ([0-9](\.[0-9]+)+?)$/gdb:\1/'"; -gdbserver;;GPL-3.0-only;"^GNU\ gdbserver\ \(GDB\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/GNU\ gdbserver\ \(GDB\)\ ([0-9](\.[0-9]+)+?)$/gdb:\1/'"; -genksyms;;unknown;"genksyms\ version\ [0-9]\.[0-9]+\.[0-9]+$";"sed -r 's/genksyms\ version\ ([0-9](\.[0-9]+)+?)$/genksyms:\1/'"; -glibc;;LGPL-2.1-or-later;"\(Debian\ GLIBC.*\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(Debian\ GLIBC.*\)\ ([0-9](\.[0-9]+)+?)$/gnu:glibc:\1/'"; -glibc;;LGPL-2.1-or-later;"GNU\ C\ Library\ \(Debian\ GLIBC.*\)\ stable\ release\ version\ [0-9](\.[0-9]+)+?,\ ";"sed -r 's/GNU\ C\ Library\ \(Debian\ GLIBC.*\)\ stable\ release\ version\ ([0-9](\.[0-9]+)+?),\ .*/gnu:glibc:\1/'"; -glibc;;LGPL-2.1-or-later;"GNU\ C\ Library\ \(.*\)\ stable\ release\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/GNU\ C\ Library\ \(.*\)\ stable\ release\ version\ ([0-9](\.[0-9]+)+?)/gnu:glibc:\1/'"; -glibc;;LGPL-2.1-or-later;"^GNU\ C\ Library\ \(GNU\ libc\)\ stable\ release\ version\ [0-9](\.[0-9]+)+?\.$";"sed -r 's/GNU\ C\ Library\ \(GNU\ libc\)\ stable\ release\ version\ ([0-9](\.[0-9]+)+?).*/gnu:glibc:\1/'"; -glibc;;LGPL-2.1-or-later;"GNU\ C\ Library\ \(GLIBC\)\ stable\ release\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/GNU\ C\ Library\ \(GLIBC\)\ stable\ release\ version\ ([0-9](\.[0-9]+)+?).*/gnu:glibc:\1/'"; -glibc;;LGPL-2.1-or-later;"GNU\ C\ Library\ stable\ release\ version\ [0-9](\.[0-9]+)+?,\ ";"sed -r 's/GNU\ C\ Library\ stable\ release\ version\ ([0-9](\.[0-9]+)+?),\ .*/gnu:glibc:\1/'"; -glibc;;LGPL-2.1-or-later;"ldconfig\ \(GNU\ libc\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/ldconfig\ \(GNU\ libc\)\ ([0-9](\.[0-9]+)+?)$/gnu:glibc:\1/'"; -glibc;;LGPL-2.1-or-later;"GNU\ C\ Library\ development\ release\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/GNU\ C\ Library\ development\ release\ version\ ([0-9](\.[0-9]+)+?)$/gnu:glibc:\1/'"; -glibc;;LGPL-2.1-or-later;"GNU\ C\ Library\ \(.*\)\ stable\ release\ version\ [0-9](\.[0-9]+)+?(\.)?$";"sed -r 's/GNU\ C\ Library\ \(.*\)\ stable\ release\ version\ ([0-9](\.[0-9]+)+?)(\.)?$/gnu:glibc:\1/'"; -gnu_cpio;;GPL-3.0-only;"\(GNU\ cpio\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ cpio\)\ ([0-9](\.[0-9]+)+?)$/gnu:cpio:\1/'"; -gnu_findutils;;GPL-3.0-only;"\(GNU\ findutils\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ findutils\)\ ([0-9](\.[0-9]+)+?)$/gnu:findutils:\1/'"; -gnu_findutils;;GPL-3.0-only;"\(GNU\ findutils\)\ [0-9](\.[0-9]+)+?-[a-z]+$";"sed -r 's/\(GNU\ findutils\)\ ([0-9](\.[0-9]+)+?-[a-z]+)$/gnu:findutils:\1/'"; -gnu_fribidi;;LGPL-2.1-only;"^\(GNU FriBidi\) [0-9](\.[0-9]+)+?$";"sed -r 's/^\(GNU FriBidi\) ([0-9](\.[0-9]+)+?)$/gnu:fribidi:\1/'"; -gnu_gettext-runtime;;unknown;"\(GNU\ gettext-runtime\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ gettext-runtime\)\ ([0-9](\.[0-9]+)+?)$/gnu:gettext-runtime:\1/'"; -gnu_groff;;GPL-3.0-only;"\(GNU\ groff\)\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ groff\)\ version\ ([0-9](\.[0-9]+)+?)$/gnu:groff:\1/'"; -gnu_groff;;GPL-3.0-only;"^GNU\ refer\ \(groff\)\ version\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/GNU\ refer\ \(groff\)\ version\ ([0-9]+(\.[0-9]+)+?)$/gnu:groff:\1/'"; -gnu_inetutils;;GPL-3.0-only;"\(GNU\ inetutils\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ inetutils\)\ ([0-9](\.[0-9]+)+?)$/gnu:inetutils:\1/'"; -gnu_mtools;;GPL-3.0-only;"\(GNU\ mtools\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ mtools\)\ ([0-9](\.[0-9]+)+?)$/gnu:mtools:\1/'"; -gnutls;;LGPL-2.1-or-later;"Enabled\ GnuTLS\ [0-9](\.[0-9]+)+?\ logging\.\.\.";"sed -r 's/Enabled\ GnuTLS\ ([0-9](\.[0-9]+)+?)\ .*/gnutls:\1/'"; -gnutls;;LGPL-2.1-or-later;"Project-Id-Version:\ gnutls\ [0-9](\.[0-9]+)+?$";"sed -r 's/Project-Id-Version:\ gnutls\ ([0-9](\.[0-9]+)+?)$/gnutls:\1/'"; -goahead;;commercial;"^CONFIG_SET\ \(\/runtime\/VerInfo\/Web,\ [0-9](\.[0-9])+?(b[0-9]+)?\)\ error\!$";"sed -r 's/CONFIG_SET\ \(\/runtime\/VerInfo\/Web,\ ([0-9](\.[0-9]+)+?(b[0-9]+)?)\)\ error\!$/goahead:\1/'"; -goahead;;commercial;"^goahead\ \ [0-9](\.[0-9]+)+?\ start$";"sed -r 's/goahead\ \ ([0-9](\.[0-9]+)+?)\ start$/goahead:\1/'"; -gpg;;GPL-3.0-only;"gpg.*\(GnuPG\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/gpg.*\(GnuPG\)\ ([0-9](\.[0-9]+)+?)$/gnupg:\1/'"; -gpgsplit;;GPL-3.0-only;"gpgsplit\ \(GnuPG\)\ [0-9](\.[0-9]+)+?";"sed -r 's/gpg.*\(GnuPG\)\ ([0-9](\.[0-9]+)+?)/gnupg:\1/'"; -grep;;GPL-3.0-only;"\(GNU\ grep\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ grep\)\ ([0-9](\.[0-9]+)+?)$/gnu:grep:\1/'"; -grep;;GPL-3.0-only;"GNU\ grep\ [0-9](\.[0-9]+)+?";"sed -r 's/GNU\ grep\ ([0-9](\.[0-9]+)+?).*/gnu:grep:\1/'"; -grub2;;GPL-3.0-only;"\ \(GRUB\)\ [0-9](\.[0-9]+)+?";"sed -r 's/\ \(GRUB\)\ 2((\.[0-9]+)+?).*/grub2:2\1/'"; -grub;;GPL-3.0-only;"\ \(GRUB\)\ [0-9](\.[0-9]+)+?";"sed -r 's/\ \(GRUB\)\ ([0-9](\.[0-9]+)+?).*/grub:\1/'"; -grubinst;;unknown;"grubinst\ version\ :\ [0-9](\.[0-9]+)+?$";"sed -r 's/grubinst\ version\ :\ ([0-9](\.[0-9]+)+?)$/grubinst:\1/'"; -gsoap;;GPL-2.0-only;"gSOAP\/[0-9](.[0-9]+)+?";"sed -r 's/gSOAP\/([0-9](\.[0-9]+)+?).*/gsoap:\1/'"; -gzip;;unknown;"gzip\ [0-9](\.[0-9]+)+?$";"sed -r 's/gzip\ ([0-9](\.[0-9]+)+?)$/gzip:\1/'"; -gzip;multi_grep;unknown;'"^GZIP$"&&"^Written\ by\ Jean-loup\ Gailly\.$"&&"^Report\ bugs\ to\ \.$"&&"^[0-9](\.[0-9]+)+?$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/gzip:\1/'"; -gzip;strict;unknown;"Version:\ [0-9](\.[0-9]+)+?$";"sed -r 's/Version:\ ([0-9](\.[0-9]+)+?)$/gzip:\1/'"; -haserl;;unknown;"^This\ is\ haserl\ version\ [0-9](\.[0-9]+)+?\ \(http\:\/\/haserl\.sourceforge\.net\)$";"sed -r 's/This\ is\ haserl\ version\ ([0-9](\.[0-9]+)+?)\ .*/haserl:\1/'"; -hciemu;;GPL-2.0-only;"hciemu\ -\ HCI\ emulator\ ver\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/hciemu\ -\ HCI\ emulator\ ver\ ([0-9]+(\.[0-9]+)+?)$/bluez_project:hciemu:\1/'"; -hcitool;;GPL-2.0-only;"hcitool\ -\ HCI\ Tool\ ver\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/hcitool\ -\ HCI\ Tool\ ver\ ([0-9]+(\.[0-9]+)+?)$/bluez_project:hcitool:\1/'"; -hdparm;;unknown;"hdparm\ v[0-9](\.[0-9]+)+?";"sed -r 's/hdparm\ v([0-9](\.[0-9]+)+?).*/hdparm:\1/'"; -hostapd;;GPL-2.0-only;"hostapd\ v[0-9](\.[0-9]+)+?$";"sed -r 's/hostapd\ v([0-9](\.[0-9]+)+?)$/hostapd:\1/'"; -hostapd;;GPL-2.0-only;"^hostapd\ v[0-9](\.[0-9]+)+?(-devel)?$";"sed -r 's/hostapd\ v([0-9](\.[0-9]+)+?)(-devel)?$/hostapd:\1/'"; -hostapd;;GPL-2.0-only;"hostapd\ v[0-9](\.[0-9]+)+?\.x$";"sed -r 's/hostapd\ v([0-9](\.[0-9]+)+?).*$/hostapd:\1/'"; -hostapd_cli;;GPL-2.0-only;"hostapd_cli\ v[0-9](\.[0-9]+)+?\.x$";"sed -r 's/hostapd_cli\ v([0-9](\.[0-9]+)+?).*$/hostapd:\1/'"; -htop;;GPL-2.0-only;"^htop\ [0-9](\.[0-9]+)+?\ -\ \(C\)\ 20[0-9]+-20[0-9]+\ Hisham\ Muhammad$";"sed -r 's/htop\ ([0-9](\.[0-9]+)+?)\ .*$/htop:\1/'"; -httpd;;unknown;"goahead\ \ [0-9](\.[0-9]+)+?\ start";"sed -r 's/goahead\ ([0-9](\.[0-9]+)+?)\ start.*/goahead:\1/'"; -i2cdetect;;unknown;"i2cdetect\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/i2cdetect\ version\ ([0-9](\.[0-9]+)+?).*$/i2c-tools:\1/'"; -i2cdump;;unknown;"i2cdump\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/i2cdump\ version\ ([0-9](\.[0-9]+)+?).*$/i2c-tools:\1/'"; -i2cget;;unknown;"i2cget\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/i2cget\ version\ ([0-9](\.[0-9]+)+?).*$/i2c-tools:\1/'"; -i2cio;;unknown;"^i2cio\ [0-9](\.[0-9]+)+?,\ ";"sed -r 's/i2cio\ ([0-9](\.[0-9]+)+?).*$/i2c-tools:\1/'"; -i2cset;;unknown;"i2cset\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/i2cset\ version\ ([0-9](\.[0-9]+)+?).*$/i2c-tools:\1/'"; -ifconfig;;unknown;"ifconfig\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/ifconfig\ ([0-9](\.[0-9]+)+?).*$/ifconfig:\1/'"; -ifdown;;unknown;"ifdown\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/ifdown\ version\ ([0-9](\.[0-9]+)+?).*/ifupdown:\1/'"; -ifquery;;unknown;"ifquery\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/ifquery\ version\ ([0-9](\.[0-9]+)+?).*/ifquery:\1/'"; -ifup;;unknown;"ifup\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/ifup\ version\ ([0-9](\.[0-9]+)+?).*/ifupdown:\1/'"; -igmpproxy;;unknown;"igmpproxy,\ Version\ [0-9](\.[0-9]+)+?";"sed -r 's/igmpproxy,\ Version\ ([0-9](\.[0-9]+)+?).*$/igmpproxy:\1/'"; -igmpproxy;;unknown;"igmpproxy\ versoin\ [0-9](\.[0-9])+?(\ beta)?";"sed -r 's/igmpproxy\ versoin\ ([0-9](\.[0-9]+)+?).*$/igmpproxy:\1/'"; -igmpproxy;;unknown;"^igmpproxy\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/igmpproxy\ ([0-9]+(\.[0-9]+)+?)$/igmpproxy:\1/'"; -imagemagick;;imagemagick-lic;"^Version:\ ImageMagick\ [0-9](\.[0-9]+)+?(-[0-9]+)?\ ";"sed -r 's/Version:\ ImageMagick\ ([0-9](\.[0-9]+)+?(-[0-9]+)?)\ /imagemagick:\1/'"; -inadyn;;GPL-2.0-only;"^Inadyn\ version\ [0-9]+(\.[0-9]+)+?\ ";"sed -r 's/Inadyn\ version\ ([0-9]+(\.[0-9]+)+?)/inadyn:\1/'"; -inadyn;strict;GPL-2.0-only;"Version:\ [0-9]\.[0-9]+-ADV$";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?(-ADV)?)$/inadyn:\1/'"; -info-zip;;Info-ZIP;"\([a-z]+\ UnZip\),\ version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/\([a-z]+\ UnZip\),\ version\ ([0-9](\.[0-9]+)+?)/info-zip:unzip:\1/'"; -info-zip;;Info-ZIP;"UnZip\ [0-9](\.[0-9]+)+?\ of\ [0-9]+\ .*\ [0-9]+,\ by\ Info-ZIP\.\ \ Maintained\ by\ C\.\ Spieler\.\ \ Send";"sed -r 's/UnZip\ ([0-9](\.[0-9]+)+?)\ .*/info-zip:unzip:\1/'"; -info-zip;;Info-ZIP;"UnZip\ [0-9](\.[0-9]+)+?\ of\ .*\ by\ Debian\.\ Original\ by\ Info-ZIP\.";"sed -r 's/UnZip\ ([0-9](\.[0-9]+)+?).*/info-zip:unzip:\1/'"; -info-zip;;Info-ZIP;"Zip\ [0-9](\.[0-9]+)+?\ .*,\ by Info-ZIP";"sed -r 's/Zip\ ([0-9](\.[0-9]+)+?).*/info-zip:zip:\1/'"; -info-zip;;Info-ZIP;"ZipCloak\ [0-9](\.[0-9]+)+?\ .*,\ by Info-ZIP";"sed -r 's/ZipCloak\ ([0-9](\.[0-9]+)+?).*/info-zip:zipcloak:\1/'"; -info-zip;;Info-ZIP;"ZipInfo\ [0-9](\.[0-9]+)+?\ of\ .*\ by\ Greg\ Roelofs\ and\ the\ Info-ZIP\ group\.";"sed -r 's/ZipInfo\ ([0-9](\.[0-9]+)+?).*/info-zip:zip:\1/'"; -info-zip;;Info-ZIP;"ZipNote\ [0-9](\.[0-9]+)+?\ .*,\ by Info-ZIP";"sed -r 's/ZipNote\ ([0-9](\.[0-9]+)+?).*/info-zip:zipnote:\1/'"; -inno_setup;;unknown;"^Inno\ Setup\ Messages\ \([0-9]\.[0-9]\.[0-9]\)\ \(u\)";"sed -r 's/^Inno\ Setup\ Messages\ \(([0-9]\.[0-9]\.[0-9])\)\ \(u\)/jrsoftware:inno_setup:\1/'"; -inotifywatch;;unknown;"^inotifywatch\ [0-9](\.[0-9]+)+?$";"sed -r 's/inotifywatch\ ([0-9](\.[0-9]+)+?)$/inotify-tools:\1/'"; -inotifywait;;unknown;"^inotifywait\ [0-9](\.[0-9]+)+?$";"sed -r 's/inotifywait\ ([0-9](\.[0-9]+)+?)$/inotify-tools:\1/'"; -intel_trusted_device_setup;;unknown;"^Intel\(R\)\ Trusted\ Device\ Setup\ Extension\ Version\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/Intel\(R\)\ Trusted\ Device\ Setup\ Extension\ Version\ ([0-9]+(\.[0-9]+)+?)/intel:trusted_device_setup:\1/'"; -nichestack;;proprietary;^Interniche\ Stack\ v[0-9](\.[0-9]+)+$";"sed -r 's/Interniche\ Stack\ v([0-9](\.[0-9]+)+?)$/hcc-embedded:nichestack:\1/'"; -io-control;;unknown;"FUSE\ library\ version:\ [0-9](\.[0-9]+)+?";"sed -r 's/FUSE\ library\ version:\ ([0-9](\.[0-9]+)+?).*/fuse:\1/'"; -iotgoat;;MIT;"^iotgoat\ v[0-9]\.[0-9]$";"sed -r 's/iotgoat\ v([0-9](\.[0-9]+)+?)$/iotgoat:\1/'"; -iperf;;unknown;"iperf\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/iperf\ version\ ([0-9](\.[0-9]+)+?).*/iperf:\1/'"; -iplink;;commercial;"^ipLink Version: [0-9]\.[0-9]\.[0-9]$";"sed -r 's/ipLink\ Version:\ ([0-9](\.[0-9]+)+?)$/ipcomm:iplink:\1/'"; -iproute2;;GPL-2.0-only;"\ iproute2-[0-9]+(\.[0-9]+)+?$";"sed -r 's/\ iproute2-([0-9]+(\.[0-9]+)+?)$/iproute2:\1/'"; -iproute2;;GPL-2.0-only;"iproute2-ss[0-9]+";"sed -r 's/iproute2-ss([0-9]+).*/iproute2:\1/'"; -iproute2;;GPL-2.0-only;"iproute2-ss(040823)";"sed -r 's/iproute2-ss(040823).*/iproute2:2\.6\.8-\1/'"; -ipsec;;unknown;"^ipsec\ _copyright\ [0-9](\.[0-9]+)+?$";"sed -r 's/ipsec\ _copyright\ ([0-9](\.[0-9]+)+?)$/ipsec:\1/'"; -ipsec;;unknown;"^ipsec\ eroute\ [0-9](\.[0-9]+)+?$";"sed -r 's/ipsec\ eroute\ ([0-9](\.[0-9]+)+?)$/ipsec:\1/'"; -ipsec;;unknown;"^ipsec\ ranbits\ [0-9](\.[0-9]+)+?$";"sed -r 's/ipsec\ ranbits\ ([0-9](\.[0-9]+)+?)$/ipsec:\1/'"; -ipset;;unknown;"^ipset\ v[0-9](\.[0-9]+)+?$";"sed -r 's/ipset\ v([0-9](\.[0-9]+)+?)$/ipset:\1/'"; -ipset;;unknown;"ipset\ v[0-9](\.[0-9]+)+?,\ protocol\ version:\ [0-9]";"sed -r 's/ipset\ v([0-9](\.[0-9]+)+?).*/ipset:\1/'"; -iptables;;GPL-2.0-only;"iptables\ v[1-9](\.[0-9]+)+?([a-z])?$";"sed -r 's/iptables\ v([0-9](\.[0-9]+)+?([a-z])?)$/iptables:\1/'"; -iptables;;GPL-2.0-only;"iptables\ v[1-9](\.[0-9]+)+?([a-z])?";"sed -r 's/iptables\ v([0-9](\.[0-9]+)+?([a-z])?).*/iptables:\1/'"; -iptables;multi_grep;GPL-2.0-only;'"^can't initialize iptables table `%s': %s$"&&"^[1-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/iptables:\1/'"; -ip6tables;;GPL-2.0-only;"ip6tables\ v[1-9](\.[0-9]+)+?$";"sed -r 's/ip6tables\ v([0-9](\.[0-9]+)+?)$/iptables:\1/'"; -iptunnel;;unknown;"iptunnel\ [0-9](\.[0-9]+)+?";"sed -r 's/iptunnel\ ([0-9](\.[0-9]+)+?).*/iptunnel:\1/'"; -ipunz;;commercial;"^ipunz V[0-9]\.[0-9]$";"sed -r 's/ipunz\ V([0-9](\.[0-9]+)+?)$/ipcomm:ipunz:\1/'"; -ipzip;;commercial;"^ipzip V[0-9]\.[0-9]$";"sed -r 's/ipzip\ V([0-9](\.[0-9]+)+?)$/ipcomm:ipzip:\1/'"; -iputils;;unknown;"iputils-s{,3}[0-9]+";"sed -r 's/iputils-s{,3}([0-9]+)$/iputils:\1/'"; -isc-dhclient;;ISC;"Internet\ Systems\ Consortium\ DHCP\ Client\ [0-9](\.[0-9]+)+?([a-z][0-9])?$";"sed -r 's/Internet\ Systems\ Consortium\ DHCP\ Client\ ([0-9](\.[0-9]+)+?([a-z][0-9])?)$/isc:dhcp_client:\1/'"; -isc-dhclient;;ISC;"isc-dhclient-[0-9](\.[0-9]+)+?$";"sed -r 's/isc-dhclient-([0-9](\.[0-9]+)+?)$/isc:dhcp_client:\1/'"; -isc-dhclient;;ISC;"isc-dhclient-[0-9](\.[0-9]+)+?-([ABPabp]|rc|RC)[0-3]$";"sed -r 's/isc-dhclient-([0-9](\.[0-9]+)+?(-([ABPabp]|rc|RC)[0-3])?)$/isc:dhcp_client:\1/'"; -isc-dhclient;;ISC;"isc-dhclient-[0-9](\.[0-9]+)+?-ESV-R[0-9]$";"sed -r 's/isc-dhclient-([0-9](\.[0-9]+)+?(-ESV-R[0-9])?)$/isc:dhcp_client:\1/'"; -isc-dhcpd;no_static;ISC;"Internet\ Systems\ Consortium\ DHCP\ Server\ [0-9](\.[0-9]+)+?([a-z][0-9])?$";"sed -r 's/Internet\ Systems\ Consortium\ DHCP\ Server\ ([0-9](\.[0-9]+)+?([a-z][0-9])?)$/isc:dhcp:\1/'"; -isc-dhcpd;no_static;ISC;"Internet\ Systems\ Consortium\ DHCP\ Server\ [0-9](\.[0-9]+)+?([a-z][0-9])?$";"sed -r 's/Internet\ Systems\ Consortium\ DHCP\ Server\ ([0-9](\.[0-9]+)+?([a-z][0-9])?)$/isc:dhcpd:\1/'"; -isc-dhcpd;no_static;ISC;"isc-dhcpd-[0-9](\.[0-9]+)+?$";"sed -r 's/isc-dhcpd-([0-9](\.[0-9]+)+?)$/isc:dhcp:\1/'"; -isc-dhcpd;no_static;ISC;"isc-dhcpd-[0-9](\.[0-9]+)+?$";"sed -r 's/isc-dhcpd-([0-9](\.[0-9]+)+?)$/isc:dhcpd:\1/'"; -ischroot;;unknown;"ischroot,\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/ischroot,\ version\ ([0-9](\.[0-9]+)+?).*/ischroot:\1/'"; -isisd;;unknown;"^ISISd\ version\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/ISISd\ version\ ([0-9]+(\.[0-9]+)+?)$/isisd:\1/'"; -iwconfig;;unknown;"iwconfig\ \ Version\ [0-9]+$";"sed -r 's/iwconfig(\ )+Version\ ([0-9]+)$/wireless_tools:\2/'"; -iwconfig;;unknown;"iwconfig\ \ Wireless-Tools\ version\ [0-9]+";"sed -r 's/iwconfig(\ )+Wireless-Tools\ version\ ([0-9]+).*/wireless_tools:\2/'"; -iwevent;;unknown;"iwevent\ \ \ Wireless-Tools\ version\ [0-9]+";"sed -r 's/iwevent(\ )+Wireless-Tools\ version\ ([0-9]+).*/wireless_tools:\2/'"; -iwlist;;unknown;"iwlist\ \ \ \ Wireless-Tools\ version\ [0-9]+";"sed -r 's/iwlist(\ )+Wireless-Tools\ version\ ([0-9]+).*/wireless_tools:\2/'"; -iwpriv;;unknown;"iwpriv\ \ \ \ Version\ [0-9]+";"sed -r 's/iwpriv(\ )+Version\ ([0-9]+).*/wireless_tools:\2/'"; -jcpd;;unknown;"^jcpd\ version\ [0-9](\.[0-9]+)+?\ \(JCP\ Ver\ [0-9](\.[0-9]+)+?\)\ started$";"sed -r 's/jcpd\ version\ ([0-9](\.[0-9]+)+?)\ .*/jcpd:\1/'"; -jffsdump;;unknown;"jffs[0-9]?dump\ [0-9](\.[0-9]+)+?$";"sed -r 's/jffs[0-9]?dump\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; -jfsutils;;unknown;"jfs_fscklog\ version\ [0-9](\.[0-9]+)+?,\ ";"sed -r 's/jfs_fscklog\ version\ ([0-9](\.[0-9]+)+?),\ .*/jfsutils:\1/'"; -jfsutils;;unknown;"jfs_tune\ version\ [0-9](\.[0-9]+)+?,\ ";"sed -r 's/jfs_tune\ version\ ([0-9](\.[0-9]+)+?),\ .*/jfsutils:\1/'"; -jigglyp0f;;unknown;"^jigglyp0f\ [0-9](\.[0-9]+)+?$";"sed -r 's/jigglyp0f\ ([0-9](\.[0-9]+)+?)$/jigglyp0f:\1/'"; -jq;;unknown;"^jq-[0-9](\.[0-9]+)+?$";"sed -r 's/jq-([0-9](\.[0-9]+)+?)$/jq_project:jq:\1/'"; -jquery;;MIT;"jQuery\ JavaScript\ Library\ v[0-9](\.[0-9]+)+?";"sed -r 's/jQuery\ JavaScript\ Library\ v([0-9](\.[0-9]+)+?)$/jquery:\1/'"; -jquery;;MIT;"jQuery\ v[0-9](\.[0-9]+)+?\ jquery\.com\ ";"sed -r 's/jQuery\ v([0-9](\.[0-9]+)+?)\ .*/jquery:\1/'"; -kbd;;unknown;"\ from\ kbd\ [0-9](\.[0-9]+)+?";"sed -r 's/\ from\ kbd\ ([0-9](\.[0-9]+)+?).*/kbd-project:kbd:\1/'"; -keepalived;;unknown;"^Keepalived\ v[0-9](\.[0-9]+)+a?\ ";"sed -r 's/Keepalived\ v([0-9](\.[0-9]+)+?)/keepalived:\1/'"; -sentron_pac;multi_grep;unknown;'"^PAC3200$"&&"^Siemens AG$"&&"^V[0-9](\.[0-9]+)+?$"';"sed -r 's/V([0-9](\.[0-9]+)+?)$/siemens:sentron_pac3200:\1/'"; -sentron_pac;multi_grep;unknown;'"^PAC4200$"&&"^Siemens AG$"&&"^V[0-9](\.[0-9]+)+?$"';"sed -r 's/V([0-9](\.[0-9]+)+?)$/siemens:sentron_pac4200:\1/'"; -sentron_pac;multi_grep;unknown;'"^PAC2200$"&&"^Siemens AG$"&&"^V[0-9](\.[0-9]+)+?$"';"sed -r 's/V([0-9](\.[0-9]+)+?)$/siemens:sentron_pac2200:\1/'"; -sentron_pac;multi_grep;unknown;'"^PAC[0-9]+$"&&"^Siemens AG$"&&"^V[0-9](\.[0-9]+)+?$"';"sed -r 's/V([0-9](\.[0-9]+)+?)$/siemens:sentron_pac:\1/'"; -sysklogd;;GPL-3.0-only;"klogd\ [0-9](\.[0-9]+)+?$";"sed -r 's/klogd\ ([0-9](\.[0-9]+)+?)$/klogd:\1/'"; -sysklogd;;GPL-3.0-only;"klogd\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/klogd\ version\ ([0-9](\.[0-9]+)+?).*/klogd:\1/'"; -kmod;;unknown;"kmod\ version\ [0-9]+$";"sed -r 's/kmod\ version\ ([0-9]+)$/kmod:\1/'"; -kmod;;unknown;"^depmod\ (version\ )?[0-9](\.[0-9]+)+?$";"sed -r 's/depmod\ (version\ )?([0-9](\.[0-9]+)+?)$/kmod:\2/'"; -kmod;;unknown;"^insmod\ (version\ )?[0-9](\.[0-9]+)+?$";"sed -r 's/insmod\ (version\ )?([0-9](\.[0-9]+)+?)$/kmod:\2/'"; -kmod;;unknown;"^lsmod\ (version\ )?[0-9](\.[0-9]+)+?$";"sed -r 's/lsmod\ (version\ )?([0-9](\.[0-9]+)+?)$/kmod:\2/'"; -kmod;;unknown;"^modinfo\ (version\ )?[0-9](\.[0-9]+)+?$";"sed -r 's/modinfo\ (version\ )?([[0-9](\.[0-9]+)+?)$/kmod:\2/'"; -roaring-l2tpd;;GPL-2.0-only;"l2tpd\ Version\ [0-9]\.[0-9]+\ Copyright\ [0-9]+\ Roaring\ Penguin\ Software\ Inc\.";"sed -r 's/l2tpd\ Version\ ([0-9](\.[0-9]+)+?).*Roaring\ Penguin\ Software\ Inc\./roaring_penguin:l2tpd:\1/'"; -l2tpd;;GPL-2.0-only;"l2tpd\ version\ [0-9](\.[0-9]+)+?\ started\ on\ ";"sed -r 's/l2tpd\ version\ ([0-9](\.[0-9]+)+?)\ .*/roaring_penguin:l2tpd:\1/'"; -l2tpd;;GPL-2.0-only;"l2tpd\ Version\ [0-9](\.[0-9]+)+?(-rtn)?\ Copyright\ [0-9]+\ Roaring\ Penguin\ Software\ Inc\.";"sed -r 's/l2tpd\ Version\ ([0-9](\.[0-9]+)+?).*/roaring_penguin:l2tpd:\1/'"; -openldap;;OLDAP-2.8;"OpenLDAP:\ ldap[a-z]+\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/OpenLDAP:\ ldap[a-z]+\ ([0-9](\.[0-9]+)+?)\ .*/openldap:\1/'"; -ld-musl-armhf.so.1;strict;unknwon;"^Version\ [0-9](\.[0-9]+)+?$";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?)$/musl-libc:musl:\1/'"; -lesskey;;GPL-3.0-only;"lesskey\ \ version\ [0-9]+$";"sed -r 's/lesskey\ \ version\ ([0-9]+)$/less:\1/'"; -less;;GPL-3.0-only AND BSD-2-Clause;"^less\ [0-9]+\ ";"sed -r 's/less\ ([0-9]+).*/less:\1/'"; -less;;GPL-3.0-only AND BSD-2-Clause;"^less\ [0-9]+$";"sed -r 's/less\ ([0-9]+)$/less:\1/'"; -libarchive;;unknown;"libarchive\ [0-9](\.[0-9]+)+?";"sed -r 's/libarchive\ ([0-9](\.[0-9]+)+?)/libarchive:\1/'"; -libcurl;;curl;"CLIENT\ libcurl\ [0-9](\.[0-9]+)+?";"sed -r 's/CLIENT\ libcurl\ ([0-9](\.[0-9]+)+?).*/libcurl:\1/'"; -libcurl;;curl;"^libcurl\/[0-9](\.[0-9]+)+?$";"sed -r 's/libcurl\/([0-9](\.[0-9]+)+?)$/libcurl:\1/'"; -libdbus;;unknown;"^libdbus\ [0-9](\.[0-9]+)+?$";"sed -r 's/libdbus\ ([0-9](\.[0-9]+)+?)$/freedesktop:dbus:\1/'"; -libdev;multi_grep;unknown;'"^libdev$"&&"libev:\ loop\ to\ be\ embedded\ is\ not\ embeddable"&&"^[0-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/libdev:\1/'"; -libexpat;;MIT;"expat_[0-9]\.[0-9]+\.[0-9]+$";"sed -r 's/expat_([0-9](\.[0-9]+)+?)$/expat:\1/'"; -libgcrypt;;LGPL-2.1-or-later;"[Ll]ibgcrypt\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/[Ll]ibgcrypt\ ([0-9](\.[0-9]+)+?)\ .*/libgcrypt:\1/'"; -libgcrypt;;LGPL-2.1-or-later;"[Ll]ibgcrypt\ [0-9](\.[0-9]+)+?$";"sed -r 's/[Ll]ibgcrypt\ ([0-9](\.[0-9]+)+?)$/libgcrypt:\1/'"; -libgcrypt;;LGPL-2.1-or-later;"[Ll]ibgcrypt\ [0-9](\.[0-9]+)+?(-[a-z]+)?$";"sed -r 's/[Ll]ibgcrypt\ ([0-9](\.[0-9]+)+?(-[a-z]+)?)$/libgcrypt:\1/'"; -libgcrypt;;LGPL-2.1-or-later;"^This\ is\ Libgcrypt\ [0-9]\.([0-9]+)+?\ -\ The\ GNU\ Crypto\ Library$";"sed -r 's/This\ is\ [Ll]ibgcrypt\ ([0-9](\.[0-9]+)+?)\ .*/libgcrypt:\1/'"; -libgmp;multi_grep;LGPL-3.0-only OR GPL-2.0-only;'"^GNU MP assertion failed: %s$"&&"^[0-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/gmplib:\1/'"; -libgpiod;;LGPL-2.1-only;"^gpiofind\ \(libgpiod\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/gpiofind\ \(libgpiod\)\ [0-9](\.[0-9]+)+?)$/libgpiod:\1/'"; -libgpiod;;LGPL-2.1-only;"^gpioinfo\ \(libgpiod\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/gpioinfo\ \(libgpiod\)\ [0-9](\.[0-9]+)+?)$/libgpiod:\1/'"; -libgpiod;;LGPL-2.1-only;"^gpiomon\ \(libgpiod\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/gpiomon\ \(libgpiod\)\ [0-9](\.[0-9]+)+?)$/libgpiod:\1/'"; -libsoup;;LGPL-2.0-or-later;"^libsoup\/[0-9](\.[0-9]+)+?$";"sed -r 's/^libsoup\/([0-9](\.[0-9]+)+?)$/libsoup:\1/'"; -libharfbuzz.so.0;multi_grep;MIT;'"^void hb_serialize_context_t::resolve_links()$"&&"^hb_blob_destroy$"&&"^[0-9]\.[0-9](\.[0-9]+)+?$"';"sed -r 's/^([0-9]\.[0-9](\.[0-9]+)+?)/harfbuzz_project:harfbuzz:\1/'"; -libidn2;multi_grep;unknown;'"^IDN2_UNKNOWN$"&&"^[0-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/libidn2:\1/'"; -libjpeg;;BSD-3-Clause AND IJG AND Zlib;"Independent\ JPEG\ Group.s\ CJPEG,\ version\ [0-9][a-z]\ \ [0-9]+-[A-Za-z]+-[0-9]+$";"sed -r 's/Independent\ JPEG\ Group.s\ CJPEG,\ version\ ([0-9][a-z])\ .*/libjpeg:\1/'"; -libjpeg-turbo;;BSD-3-Clause AND IJG AND Zlib;"^libjpeg-turbo\ version\ [0-9](\.[0-9]+)+?\ \(build\ [0-9]+\)$";"sed -r 's/libjpeg-turbo\ version\ ([0-9](\.[0-9]+)+?)\ .*/libgjpeg-turbo:\1/'"; -libjson-c;multi_grep;MIT;'"^INTERNAL ERROR: _json_c_visit"&&"^[0-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/json-c:\1/'"; -liblz4.so;multi_grep;unknown;'"^LZ4_freeStreamHC$"&&"^liblz4.so.1$"&&"^[0-9](\.[0-9]+)+?$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/liblz4:\1/'"; -liblzma;;public-domain;"liblzma\ [0-9](\.[0-9]+)+?$";"sed -r 's/liblzma\ ([0-9](\.[0-9]+)+?)$/liblzma:\1/'"; -liblzma;multi_grep;public-domain;'"^g\[TNIEB\?=:864310\.\-\,\+\*\)\('&\%\\$\#\"\"\!"&&"^lzma_index_stream_padding$"&&"^[0-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/liblzma:\1/'"; -libmicrohttpd.so.12;strict;LGPL-2.1-or-later;"^[0-9]\.[0-9](\.[0-9]+)+?$";"sed -r 's/^([0-9]\.[0-9](\.[0-9]+)+?)/gnu:libmicrohttpd:\1/'"; -libnghttp2;multi_grep;MIT;'"^stream->state == NGHTTP2_STREAM_IDLE$"&&"^[0-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/nghttp2:\1/'"; -libnss3;multi_grep;unknown;'"nss_DumpCertificateCacheInfo"&&"^[0-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/libnss3:\1/'"; -libopencv_core;multi_grep;unknown;'"^OpenCV\(%s\) Error: %s \(%s\) in %s, file %s, line %d$"&&"General\ configuration\ for\ OpenCV\ [0-9](\.[0-9]+)+?\ =+"';"sed -r 's/^General configuration for OpenCV ([0-9]+\.[0-9]+\.[0-9]+) .*/opencv:\1/'"; -libpcap;;BSD-3-Clause;"^libpcap\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/libpcap\ version\ ([0-9](\.[0-9]+)+?)$/libpcap:\1/'"; -libpcre;multi_grep;BSD-3-Clause;'"^this version of PCRE is"&&"^[0-9]+\.[0-9]+ [0-9]{4}-[0-9]{2}-[0-9]{2}$"';"sed -r 's/^([0-9]+\.[0-9]+) [0-9]{4}-[0-9]{2}-[0-9]{2}$/pcre:\1/'"; -libpng;;Libpng;"libpng\ version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/libpng\ version\ ([0-9](\.[0-9]+)+?)\ .*/libpng:\1/'"; -libreswan;;GPL-2.0-only;"^Libreswan\ [\.0-9]+";"sed -r 's/Libreswan\ ([0-9](\.[0-9]+)+?).*/libreswan:\1/'"; -libsensors;;unknown;"libsensors\ version\ [\.0-9]+$";"sed -r 's/libsensors\ version\ ([0-9](\.[0-9]+)+?)$/libsensors:\1/'"; -libtiff;;unknown;"^LIBTIFF,\ Version\ [0-9](\.[0-9]+)+?$";"sed -r 's/LIBTIFF,\ Version\ ([0-9](\.[0-9]+)+?)$/libtiff:libtiff:\1/'"; -libtasn;multi_grep;unknown;'"LIBTASN1 ERROR:"&&"^[0-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/libtasn1:\1/'"; -libxml2;multi_grep;MIT;'"^Fatal: program compiled against libxml %d using libxml %d$"&&"^2[0-9]{4}$"';"sed -r 's/^2([0-9]{2})([0-9]{2})$/libxml2:2.\1.\2/'"; -lighttpd;;bsd;"^lighttpd\/[0-9](\.[0-9]+)+?\ .*\ -\ a\ light\ and\ fast\ webserver$";"sed -r 's/lighttpd\/([0-9](\.[0-9]+)+?)\ .*/lighttpd:\1/'"; -lighttpd;live;bsd;"^lighttpd\/[0-9](\.[0-9]+)+?(-devel-[0-9]+[A-Z])?$";"sed -r 's/lighttpd\/([0-9](\.[0-9]+)+?).*/lighttpd:\1/'"; -lighttpd;;BSD-3-Clause;"^lighttpd-[0-9](\.[0-9]+)+?\ \-\ a\ light\ and\ fast\ webserver$";"sed -r 's/lighttpd-([0-9](\.[0-9]+)+?)\ .*/lighttpd:\1/'"; -lighttpd;;BSD-3-Clause;"^lighttpd-[0-9](\.[0-9]+)+?\ \(.*\)\ \-\ a\ light\ and\ fast\ webserver$";"sed -r 's/lighttpd-([0-9](\.[0-9]+)+?)\ .*/lighttpd:\1/'"; -lighttpd;;BSD-3-Clause;"lighttpd-[0-9](\.[0-9]+)+?$";"sed -r 's/lighttpd-([0-9](\.[0-9]+)+?)$/lighttpd:\1/'"; -lighttpd;;BSD-3-Clause;"^lighttpd [0-9](\.[0-9]+)+?";"sed -r 's/lighttpd ([0-9](\.[0-9]+)+?)/lighttpd:\1/'"; -lighttpd;;BSD-3-Clause;"^lighttpd\/[0-9](\.[0-9]+)+?(-devel)?(-[0-9]+[A-Za-z]+)?.*\ -\ a\ light\ and\ fast\ webserver$";"sed -r 's/lighttpd\/([0-9](\.[0-9]+)+?).*/lighttpd:\1/'"; -lighttpd;;BSD-3-Clause;"^server\ started\ \(lighttpd\/[0-9](\.[0-9]+)+?\)$";"sed -r 's/server\ started\ \(lighttpd\/([0-9](\.[0-9]+)+?)\)$/lighttpd:\1/'"; -linux_kernel;;GPL-2.0-only;"^Linux-[1-6]\.[0-9]+\.[0-9]+";"sed -r 's/Linux-([1-6](\.[0-9]+)+?).*/linux_kernel:\1/'"; -linux_kernel;;GPL-2.0-only;"Linux\ kernel\ version\ [1-6]\.[0-9]+\.[0-9]+\ ";"sed -r 's/Linux\ kernel\ version\ ([1-6](\.[0-9]+)+?)\ .*/linux_kernel:\1/'"; -linux_kernel;;GPL-2.0-only;"Linux\ kernel\ version\ [1-6]\.[0-9]+\.[0-9]+$";"sed -r 's/Linux\ kernel\ version\ ([1-6](\.[0-9]+)+?)$/linux_kernel:\1/'"; -linux_kernel;;GPL-2.0-only;"Linux\ version\ [1-6]\.[0-9]+\.[0-9]+\ ";"sed -r 's/Linux\ version\ ([1-6](\.[0-9]+)+?)\ .*/linux_kernel:\1/'"; -linux_kernel;;GPL-2.0-only;"Linux\ version\ [1-6]\.[0-9]+\.[0-9]+$";"sed -r 's/Linux\ version\ ([1-6](\.[0-9]+)+?)$/linux_kernel:\1/'"; -linuxptp;multi_grep;GPL-2.0-only;'"^PTP_CLOCK_GETCAPS$"&&"^PTP_PIN_SETFUNC2\ failed:\ \%m$"&&"^[0-9](\.[0-9]+)+?$"';"sed -r 's/([0-9](\.[0-9]+)+?)/linuxptp_project:linuxptp:\1/'"; -lldpd;;unknown;"^Version:\ lldpd\ [0-9](\.[0-9]+)+$";"sed -r 's/Version:\ lldpd\ ([0-9](\.[0-9]+)+?)$/lldpd:\1/'"; -llmnresp;;unknown;"^llmnresp\ versoin\ [0-9](\.[0-9]+)+?$";"sed -r 's/llmnresp\ versoin\ ([0-9](\.[0-9]+)+?)$/llmnresp:\1/'"; -lnstat;;unknown;"lnstat\ Version\ [0-9]\.[0-9]+(\ [0-9]+)?$";"sed -r 's/lnstat\ Version\ ([0-9](\.[0-9]+)+?).*/lnstat:\1/'"; -loadkeys;;unknown;"loadkeys\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/loadkeys\ version\ ([0-9](\.[0-9]+)+?)/loadkeys:\1/'"; -localedef;;unknown;"localedef\ \(.*\)\ [0-9](\.[0-9]+)+?";"sed -r 's/localedef\ \(.*\)\ ([0-9](\.[0-9]+)+?)/localedef:\1/'"; -logd;;unknown;"^logd\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/logd\ version\ ([0-9](\.[0-9]+)+?).*/logd:\1/'"; -logger;;unknown;"logger\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/logger\ version\ ([0-9](\.[0-9]+)+?).*/logger:\1/'"; -logrotate;;unknown;"logrotate\ [0-9](\.[0-9]+)+?\ -\ Copyright.*Red\ Hat,\ Inc\.$";"sed -r 's/logrotate\ ([0-9](\.[0-9]+)+?).*/logrotate:\1/'"; -logrotate;;unknown;"logrotate\ [0-9](\.[0-9]+)+?$";"sed -r 's/logrotate\ ([0-9](\.[0-9]+)+?)$/logrotate:\1/'"; -lrzsz;;unknown;"lrzsz.\ [\.rc0-9]+$";"sed -r 's/lrzsz.\ ([\.rc0-9]+)$/lrzsz:\1/'"; -lsattr;;unknown;"lsattr\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/lsattr\ ([0-9](\.[0-9]+)+?)\ .*/lsattr:\1/'"; -lsof;;lsof;"lsof\ [0-9](\.[0-9]+)+?$";"sed -r 's/lsof\ ([0-9](\.[0-9]+)+?)$/lsof:\1/'"; -lspci;;unknown;"lspci\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/lspci\ version\ ([0-9](\.[0-9]+)+?)/pciutils:\1/'"; -lsusb;;unknown;"lsusb\ \(usbutils\)\ [0-9]+";"sed -r 's/lsusb\ \(usbutils\)\ ([0-9]+)/usbutils:\1/'"; -# this looks false positive prone: -# lua;;MIT;"^Lua\ [0-9](\.[0-9]+)+?$";"sed -r 's/Lua\ ([0-9](\.[0-9]+)+?)$/lua:\1/'"; -lua;;MIT;"^\$Lua:\ Lua\ [0-9](\.[0-9]+)+?\ .*";"sed -r 's/.*Lua\ ([0-9](\.[0-9]+)+?)\ .*/lua:\1/'"; -lua;;MIT;"^liblua\.so\.[0-9](\.[0-9]+)+?$";"sed -r 's/liblua\.so\.([0-9](\.[0-9]+)+?)$/lua:\1/'"; -lua;;MIT;"^Lua\ [0-9](\.[0-9]+)+?\ \ Copyright\ .*";"sed -r 's/^Lua\ ([0-9](\.[0-9]+)+?)\ \ .*/lua:\1/'"; -lvm2;;unknown;"^lvmetad\ version:\ [0-9](\.[0-9]+)+?";"sed -r 's/lvmetad\ version:\ ([0-9](\.[0-9]+)+?)/lvm:lvmetad:\1/'"; -lvm2;;unknown;"^lvmpolld\ version:\ [0-9](\.[0-9]+)+?";"sed -r 's/lvmpolld\ version:\ ([0-9](\.[0-9]+)+?)/lvm:lvmpolld:\1/'"; -macping;;GPL-2.0-only;"MAC-Ping\ [0-9](\.[0-9]+)+?";"sed -r 's/MAC-Ping\ ([0-9](\.[0-9]+)+?).*/mac-ping:\1/'"; -mactelnet;;GPL-2.0-only;"MAC-Telnet\ [0-9](\.[0-9]+)+?";"sed -r 's/MAC-Telnet\ ([0-9](\.[0-9]+)+?).*/mac-telnet:\1/'"; -madwimax;;unknown;"madwimax\ [0-9](\.[0-9]+)+?";"sed -r 's/madwimax\ ([0-9](\.[0-9]+)+?)/madwimax:\1/'"; -mailsend;;unknown;"mailsend\ v[0-9](\.[0-9]+)+?([a-z][0-9]+)?$";"sed -r 's/mailsend\ v([0-9](\.[0-9]+)+?([a-z][0-9]+)?)$/mailsend:\1/'"; -mailsend;;unknown;"^mailsend\ Version\:\ .*\ v[0-9](\.[0-9]+)+?([a-z][0-9]+)?$";"sed -r 's/mailsend\ Version:\ .*\ v([0-9](\.[0-9]+)+?([a-z][0-9]+)?)$/mailsend:\1/'"; -make;;unknown;"GNU\ Make\ [0-9](\.[0-9]+)+?$";"sed -r 's/GNU\ Make\ ([0-9](\.[0-9]+)+?)$/gnu:make:\1/'"; -makedevs;;unknown;"^makedevs\ revision\ [0-9](\.[0-9]+)+?$";"sed -r 's/makedevs\ revision\ ([0-9](\.[0-9]+)+?)$/makedevs:\1/'"; -man-db;;GPL-3.0-or-later;"catman\ [0-9](\.[0-9]+)+?$";"sed -r 's/catman\ ([0-9](\.[0-9]+)+?)$/man-db:\1/'"; -man-db;;GPL-3.0-or-later;"globbing\ [0-9](\.[0-9]+)+?$";"sed -r 's/globbing\ ([0-9](\.[0-9]+)+?)$/man-db:\1/'"; -man-db;;GPL-3.0-or-later;"lexgrog\ [0-9](\.[0-9]+)+?$";"sed -r 's/lexgrog\ ([0-9](\.[0-9]+)+?)$/man-db:\1/'"; -man-db;;GPL-3.0-or-later;"mandb\ [0-9](\.[0-9]+)+?$";"sed -r 's/mandb\ ([0-9](\.[0-9]+)+?)$/man-db:\1/'"; -man-db;;GPL-3.0-or-later;"manpath\ [0-9](\.[0-9]+)+?$";"sed -r 's/manpath\ ([0-9](\.[0-9]+)+?)$/man-db:\1/'"; -mbim-proxy;;unknown;"^mbim-proxy\ [0-9](\.[0-9]+)+$";"sed -r 's/mbim-proxy\ ([0-9](\.[0-9]+)+?)$/mbim-proxy:\1/'"; -mcad;;unknown;"Management\ Console\ Agent\ v[0-9]\.[0-9]+\ \(c\)\ Ubiquiti\ Networks,\ Inc\.$";"sed -r 's/Management\ Console\ Agent\ v([0-9](\.[0-9]+)+?)\ .*/ubiquiti:console_agent:\1/'"; -mdadm;;unknown;"^mdadm\ -\ v[0-9](\.[0-9]+)+?\ -\ ";"sed -r 's/mdadm\ -\ v([0-9](\.[0-9]+)+?)\ .*/mdadm:\1/'"; -mdns-repeater;;unknown;"mDNS\ repeater\ \(version\ [0-9](\.[0-9]+)+?\)$";"sed -r 's/mDNS\ repeater\ \(version\ ([0-9](\.[0-9]+)+?)\)$/mdnsrepeater:\1/'"; -memtester;;gpl;"memtester\ version\ [0-4](\.[0-9]+)+?\ ";"sed -r 's/memtester\ version\ ([0-4](\.[0-9]+)+?)\ /memtester:\1/'"; -memtester;;proprietary;"memtester\ version\ [5-9](\.[0-9]+)+?\ ";"sed -r 's/memtester\ version\ ([5-9](\.[0-9]+)+?)\ /memtester:\1/'"; -midnight_commander;;GPL-3.0-only;"GNU\ Midnight\ Commander\ [0-9](\.[0-9]+)+?";"sed -r 's/GNU\ Midnight\ Commander\ ([0-9](\.[0-9]+)+?)/gnu:midnight_commander:\1/'"; -mii-tool;;GPL-2.0-only;"mii-tool\.c\ [0-9]\.[0-9]+\ .*\ \(David\ Hinds\)";"sed -r 's/mii-tool\.c\ ([0-9](\.[0-9]+)+?)\ .*/net-tools:mii-tool:\1/'"; -mikrotik-routeros;;;"MikroTik\ routerOS\ V[0-9]\.[0-9]+\ \(c\) [0-9]+-[0-9].*";"sed -r 's/.*MikroTik\ routerOS\ V([0-9]\.[0-9]+)\ .*/mikrotik:routeros:\1/'"; -minicom;;GPL-2.0-only;"minicom\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/minicom\ version\ ([0-9](\.[0-9]+)+?)$/minicom:\1/'"; -minidlna;;GPL-2.0-only;"^Starting\ MiniDLNA\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/Starting\ MiniDLNA\ version\ ([0-9](\.[0-9]+)+?)/minidlna:\1/'"; -minidlna;live;GPL-2.0-only;"^MiniDLNA\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/MiniDLNA\ ([0-9](\.[0-9]+)+?)\ .*/minidlna:\1/'"; -minidlna;multi_grep;unknown;'"MiniDLNA is already running. EXITING."&&"^[0-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/minidlna:\1/'"; -mini_httpd;;unknown;"mini_httpd\/[0-9](\.[0-9]+)+?(\ [0-9]+)?";"sed -r 's/mini_httpd\/([0-9](\.[0-9]+)+?).*/acme:mini_httpd:\1/'"; -mini_httpd;live;unknown;"mini_httpd\ [0-9](\.[0-9]+)+?(\ [0-9]+)?";"sed -r 's/mini_httpd\ ([0-9](\.[0-9]+)+?).*/acme:mini_httpd:\1/'"; -miniupnpd;;unknown;"SERVER:.*UPnP\/[0-9](\.[0-9]+)+?\ MiniUPnPd\/[0-9](\.[0-9]+)+?$";"sed -r 's/SERVER:.*UPnP\/[0-9](\.[0-9]+)+?\ MiniUPnPd\/([0-9](\.[0-9]+)+?)$/miniupnpd:\2/'"; -miniupnpd;live;unknown;"MiniUPnP\ [0-9](\.[0-9]+)+?\ ;"sed -r 's/MiniUPnP\ ([0-9](\.[0-9]+)+?)\ .*/miniupnpd:\1/'"; -miniupnpd;;unknown;"^miniupnpd\ [0-9](\.[0-9]+)+?\ ;"sed -r 's/^miniupnpd\ ([0-9](\.[0-9]+)+?)\ .*/miniupnpd:\1/'"; -mkconfig;;unknown;"^mkconfig\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/mkconfig\ version\ ([0-9](\.[0-9]+)+?)$/mkconfig:\1/'"; -mke2fs;;unknown;"^mke2fs\ [0-9](\.[0-9]+)+?";"sed -r 's/mke2fs\ ([0-9](\.[0-9]+)+?)/e2fsprogs:\1/'"; -mkfs.jffs;;unknown;"mkfs\.jffs[0-9]:\ error!:\ revision\ [0-9]\.[0-9]+$";"sed -r 's/mkfs\.jffs[0-9]:\ error!:\ revision\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; -mkfs.jffs2;;unknown;"mkfs\.jffs2.*revision\ [0-9]\.[0-9]+$";"sed -r 's/mkfs\.jffs[0-9].*revision\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; -mkfs.jffs2;;unknown;"mkfs\.jffs2\ revision\ [0-9](\.[0-9]+)+?";"sed -r 's/mkfs\.jffs[0-9]\ revision\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; -mkfs.xfs;;unknown;"^mkfs\.xfs\ version\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/mkfs\.xfs\ version\ ([0-9]+(\.[0-9]+)+?)$/xfsprogs:\1/'"; -mkfs.fat;;GPL-3.0-only;"^mkfs\.fat\ [0-9]+(\.[0-9]+)+?";"sed -r 's/mkfs\.fat\ ([0-9]+(\.[0-9]+)+?).*/dosfstools:\1/'"; -mkdosfs;;GPL-3.0-only;"^mkdosfs\ [0-9](\.[0-9]+)+?\ \([0-9]+\ .*\ [0-9]+\)$";"sed -r 's/mkdosfs\ ([0-9](\.[0-9]+)+?).*/mkdosfs:\1/'"; -fsck.fat;;GPL-3.0-only;"^fsck\.fat\ [0-9]+(\.[0-9]+)+?";"sed -r 's/fsck\.fat\ ([0-9]+(\.[0-9]+)+?).*/dosfstools:\1/'"; -fatlabel;;GPL-3.0-only;"^fatlabel\ [0-9]+(\.[0-9]+)+?";"sed -r 's/fatlabel\ ([0-9]+(\.[0-9]+)+?).*/dosfstools:\1/'"; -mklost_plus_found;;unknown;"^mklost\+found\ [0-9]+(\.[0-9]+)+?\ \(.*\)$";"sed -r 's/mklost\+found\ ([0-9]+(\.[0-9]+)+?).*/e2fsprogs:\1/'"; -mkntfs;;GPL-2.0-only;"mkntfs\ (v)?[0-9]+(\.[0-9]+)+?";"sed -r 's/mkntfs\ v?([0-9]+(\.[0-9]+)+?).*/ntfsprogs:\1/'"; -mkpasswd;;unknown;"mkpasswd\ [0-9](\.[0-9]+)+?";"sed -r 's/mkpasswd\ ([0-9](\.[0-9]+)+?).*/mkpasswd:\1/'"; -mkreiserfs;;unknown;"mkreiserfs\ [0-9](\.[0-9]+)+?$";"sed -r 's/mkreiserfs\ ([0-9](\.[0-9]+)+?)$/reiserfsck:\1/'"; -modem;strict;unknown;"Version\ [0-9]\.[0-9]+\.[0-9]+";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?)$/modem:\1/'"; -module-init-tools;;unknown;"module-init-tools\ [0-9]\.[0-9]+$";"sed -r 's/module-init-tools\ ([0-9](\.[0-9]+)+?)$/module-init-tools:\1/'"; -mosquitto;;EPL-2.0;"^mosquitto\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/mosquitto\ version\ ([0-9](\.[0-9]+)+?).*/eclipse:mosquitto:\1/'"; -mount;;unknown;"^mount:\ mount-[0-9](\.[0-9]+)+?([a-z])?$";"sed -r 's/mount:\ mount-([0-9](\.[0-9]+)+?([a-z])?)$/mount:\1/'"; -# The mongo shell is included as part of the MongoDB server installation: -mongodb;;unknown;"^MongoDB\ shell\ version\ v[0-9](\.[0-9]+)+?$";"sed -r 's/MongoDB\ shell\ version v([0-9](\.[0-9]+)+?)$/mongodb:mongodb:\1/'"; -mongodb;;unknown;"^db\ version\ v[0-9](\.[0-9]+)+?$";"sed -r 's/db\ version\ v([0-9](\.[0-9]+)+?)$/mongodb:mongodb:\1/'"; -mpicalc;;unknown;"mpicalc\ [0-9]\.[0-9]+";"sed -r 's/mpicalc\ ([0-9](\.[0-9]+)+?)/mpicalc:\1/'"; -msmtp;;unknown;"^msmtp version [0-9](\.[0-9]+)+?$";"sed -r 's/^msmtp version ([0-9](\.[0-9]+)+?)$/martin_lambers:msmtp:\1/'"; -mtd-utils;;GPL-2.0-only;"mtdinfo\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/mtdinfo\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; -mtd-utils;;GPL-2.0-only;"\(mtd-utils\)\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/\(mtd-utils\)\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; -mtd-utils;;GPL-2.0-only;"nanddump\ [0-9](\.[0-9]+)+?$";"sed -r 's/nanddump\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; -mtd-utils;;GPL-2.0-only;"nanddump\ \$Revision:\ [0-9](\.[0-9]+)+?\ \$$";"sed -r 's/nanddump\ \$Revision:\ ([0-9](\.[0-9]+)+?)\ .*/mtd-utils:\1/'"; -mtd-utils;;GPL-2.0-only;"nandwrite\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/nandwrite\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; -mtd-utils;;GPL-2.0-only;"ubiattach\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/ubiattach\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; -mtd-utils;;GPL-2.0-only;"ubiblock\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/ubiblock\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; -mtd-utils;;GPL-2.0-only;"ubicrc32\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/ubicrc32\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; -mtd-utils;;GPL-2.0-only;"ubidetach\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/ubidetach\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; -mtd-utils;;GPL-2.0-only;"ubiformat\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/ubiformat\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; -mtd-utils;;GPL-2.0-only;"ubimkvol\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/ubimkvol\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; -mtd-utils;;GPL-2.0-only;"ubinfo\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/ubinfo\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; -mtd-utils;;GPL-2.0-only;"ubinize\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/ubinize\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; -mtd-utils;;GPL-2.0-only;"ubirmvol\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/ubirmvol\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; -mtd-utils;;GPL-2.0-only;"ubiupdatevol\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/ubiupdatevol\ ([0-9](\.[0-9]+)+?)$/mtd-utils:\1/'"; -mtd-utils;;GPL-2.0-only;"ubiupdatevol\ version\ [0-9](\.[0-9]+)+?\ -\ a\ tool\ to\ write\ data\ to\ UBI\ volumes\.$";"sed -r 's/ubiupdatevol\ version\ ([0-9](\.[0-9]+)+?)\ .*/mtd-utils:\1/'"; -mtr;strict;unknown;"^mtr\ [0-9]\.[0-9]+$";"sed -r 's/mtr\ ([0-9](\.[0-9]+)+?)$/mtr:mtr:\1/'"; -nameresolv;;unknown;"nameresolv\ versoin\ [0-9](\.[0-9]+)+?$";"sed -r 's/nameresolv\ versoin\ ([0-9](\.[0-9]+)+?)$/nameresolv:\1/'"; -nano;;GPL-3.0-only;"GNU\ nano,\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/GNU\ nano,\ version\ ([0-9](\.[0-9]+)+?)$/gnu:nano:\1/'"; -nano;;GPL-3.0-only;"GNU\ nano,\ version\ [0-9](\.[0-9]+)+?\ \(compiled\ .*\)$";"sed -r 's/GNU\ nano,\ version\ ([0-9](\.[0-9]+)+?)\ .*/gnu:nano:\1/'"; -nbtscan;;unknown;"^NBTscan\ version\ [0-9](\.[0-9]+)+?\.\ Copyright\ \(C\)\ 1999-200[0-9]\ Alla\ Bezroutchko\.$";"sed -r 's/NBTscan\ version\ ([0-9](\.[0-9]+)+?).*/nbtscan:\1/'"; -nc.traditional;strict;unknown;"\[v[0-9]\.[0-9]+-[0-9]+\]$";"sed -r 's/\[v([0-9](\.[0-9]+)+?(-[0-9]+)?)\]$/nc.traditional:\1/'"; -ncurses;;X11;"ncurses\ [0-9](\.[0-9]+)+?";"sed -r 's/ncurses\ ([0-9](\.[0-9]+)+?).*/gnu:ncurses:\1/'"; -nero_boot_loader;;unknown;"^Nero\ Boot-Loader\ V[0-9]+\.[0-9]+$";"sed -r 's/Nero\ Boot-Loader\ V([0-9]+\.[0-9]+)/nero:boot_loader:\1/'"; -netatalk;;GPL-2.0-only;"^cnid_dbd\ \(Netatalk\ [0-9](\.[0-9]+)+?\)$";"sed -r 's/cnid_dbd\ \(Netatalk\ ([0-9](\.[0-9]+)+?)\)$/netatalk:\1/'"; -ndppd;;GPL-3.0-only;"ndppd\ \(NDP\ Proxy\ Daemon\)\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/ndppd\ \(NDP\ Proxy\ Daemon\)\ version\ ([0-9](\.[0-9]+)+?).*/ndppd:\1/'"; -#netgear_facebook_captive_portal;;unknown;"NETGEAR\ Facebook\ Captive\ Portal\ version\ [0-9](\.[0-9]+)?";"NA"; -netio;;unknown;"NETIO\ -\ Network\ Throughput\ Benchmark,\ Version\ [0-9](\.[0-9]+)+?";"sed -r 's/NETIO\ -\ Network\ Throughput\ Benchmark,\ Version\ ([0-9](\.[0-9]+)+?).*/netio:\1/'"; -netstat-nat;strict;unknown;"^Version\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?)/netstat-nat:\1/'"; -netstat;;unknown;"netstat\ [0-9]\.[0-9]+";"sed -r 's/netstat\ ([0-9](\.[0-9]+)+?)/netstat:\1/'"; -nettle;;unknown;"nettle-hash\ \(nettle\ [0-9](\.[0-9]+)+?\)$";"sed -r 's/nettle-hash\ \(nettle\ ([0-9](\.[0-9]+)+?)\)$/nettle:\1/'"; -net-tools;;unknown;"net-tools\ [0-9]\.[0-9]+";"sed -r 's/net-tools\ ([0-9](\.[0-9]+)+?)/net-tools:\1/'"; -nginx;;BSD-2-Clause;"^nginx\ version:\ nginx\/[0-9](\.[0-9]+)+?$";"sed -r 's/nginx\ version:\ nginx\/([0-9](\.[0-9]+)+?)$/nginx:\1/'"; -ngrep;;unknown;"^ngrep:\ V[0-9]\.[0-9]+,\ \$Revision\:\ [0-9]+\.[0-9]+\ \$$";"sed -r 's/ngrep:\ V([0-9](\.[0-9]+)+?),\ .*/ngrep:\1/'"; -nmbd;strict;GPL-3.0-only;"Version\ [0-9]\.[0-9]\.[0-9]+([a-z])?$";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?([a-z])?)$/samba:\1/'"; -nmcli;;unknown;"nmcli\ tool,\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/nmcli\ tool,\ version\ ([0-9](\.[0-9]+)+?)$/nmcli:\1/'"; -nodedetect;;unknown;"^nodedetect\ [0-9](\.[0-9]+)+?$";"sed -r 's/nodedetect\ ([0-9](\.[0-9]+)+?)$/nodedetect:\1/'"; -ntfs-3g;;GPL-2.0-only;"^ntfs-3g\ [0-9]+(\.[0-9]+)+?\ integrated\ FUSE\ 27$";"sed -r 's/ntfs-3g\ ([0-9]+(\.[0-9]+)+?)\ .*/ntfs-3g:\1/'"; -ntfs-3g;;GPL-2.0-only;"ntfslabel\ v[0-9](\.[0-9]+)+?\ ";"sed -r 's/ntfslabel\ v([0-9]+(\.[0-9]+)+?)\ .*/ntfs-3g:\1/'"; -ntfsck;;GPL-2.0-only;"ntfsck\ [0-9]+\.[0-9]\.[0-9]+";"sed -r 's/ntfsck\ ([0-9]+(\.[0-9]+)+?).*/ntfsprogs:\1/'"; -#ntpdate;;unknown;"ntpdate\ [0-9](\.[0-9]+)+?$";"sed -r 's/ntpdate\ ([0-9](\.[0-9]+)+?)$/ntpdate:\1/'"; -ntpdate;;unknown;"ntpdate\ [0-9](\.[0-9]+)+?([a-z][0-9]+)?";"sed -r 's/ntpdate\ ([0-9](\.[0-9]+)+?)([a-z][0-9]+)?$/ntp:ntp:\1:\3/'"; -ntpd;;unknown;"ntpd\ [0-9](\.[0-9]+)+?(p[0-9]+)?\ for\ ";"sed -r 's/ntpd\ ([0-9](\.[0-9]+)+?)(p[0-9]+)?.*/ntp:ntp:\1:\3/'"; -ntpd;;unknown;"ntpd\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/ntpd\ ([0-9](\.[0-9]+)+?)/ntp:ntp:\1/'"; -ntpd;;unknown;"ntpd\ -\ NTP\ daemon\ program\ -\ Ver\.\ [0-9](\.[0-9]+)+?([a-z][0-9]+)?$";"sed -r 's/ntpd\ -\ NTP\ daemon\ program\ -\ Ver\.\ ([0-9](\.[0-9]+)+?)([a-z][0-9]+)?$/ntp:ntp:\1:\3/'"; -ntpdc;;unknown;"^ntpdc\ .*\ Ver\.\ [0-9](\.[0-9]+)+?$";"sed -r 's/ntpdc\ .*\ Ver\.\ ([0-9](\.[0-9]+)+?)/ntp:\1/'"; -ntp-keygen;;unknown;"^ntp-keygen\ [0-9](\.[0-9]+)+?";"sed -r 's/ntp-keygen\ ([0-9](\.[0-9]+)+?).*/ntp-keygen:\1/'"; -ntp;;unknown;"ntp[a-z]+\ -\ .*\ NTP\ query\ program\ -\ Ver\.\ [0-9](\.[0-9]+)+?([a-z][0-9]+)?$";"sed -r 's/ntp[a-z]+\ -\ .*\ NTP\ query\ program\ -\ Ver\.\ ([0-9](\.[0-9]+)+?)([a-z][0-9]+)?/ntp:ntp:\1:\3/'"; -ntp;;unknown;"ntp[dpq]\ [0-9](\.[0-9]+)+?(p[0-9]+)?$";"sed -r 's/ntp[dpq]\ ([0-9](\.[0-9]+)+?)+(p[0-9]+)?$/ntp:ntp:\1:\3/'"; -ookla;;unknown;"^Version:\ ookla\ [0-9](\.[0-9]+)+?$";"sed -r 's/Version:\ ookla\ ([0-9]+(\.[0-9]+)+?)$/ookla:\1/'"; -ookla;;unknown;"^ookla\ v[0-9](\.[0-9]+)+?$";"sed -r 's/ookla\ v([0-9]+(\.[0-9]+)+?)$/ookla:\1/'"; -ookla;;unknown;"^ookla-nano-c\ -\ [0-9](\.[0-9]+)+?$";"sed -r 's/ookla-nano-c\ -\ ([0-9]+(\.[0-9]+)+?)$/ookla:\1/'"; -opennhrp;;unknown;"^OpenNHRP\ [0-9](\.[0-9]+)+$";"sed -r 's/OpenNHRP\ ([0-9]+(\.[0-9]+)+?)$/opennhrp:\1/'"; -openrc;;unknown;"\ \(OpenRC\)\ [0-9](\.[0-9]+)+?([a-z][0-9]+)?$";"sed -r 's/\ \(OpenRC\)\ \ ([0-9]+(\.[0-9]+)+?([a-z][0-9]+)?)$/openrc:\1/'"; -openser;;unknown;"^version:\ openser\ [0-9](\.[0-9]+)+?\ \([a-z]+\/[a-z]+\)$";"sed -r 's/version:\ openser\ ([0-9]+(\.[0-9]+)+?).*/openser:\1/'"; -openssh;;SSH-OpenSSH;"OpenSSH_[0-9](\.[0-9]+)+?([a-z][0-9]+)?,\ ";"sed -r 's/OpenSSH_([0-9](\.[0-9]+)+?([a-z][0-9]+)?).*$/openssh:\1/'"; -openssh;;SSH-OpenSSH;"OpenSSH_[0-9](\.[0-9]+)+?([a-z][0-9]+)?\ ";"sed -r 's/OpenSSH_([0-9](\.[0-9]+)+?([a-z][0-9]+)?).*$/openssh:\1/'"; -openssh;multi_grep;SSH-OpenSSH;'"^ssh_msg_recv: read: bad msg_len %u$"&&"^OpenSSH_[0-9.]+p[0-9]$"';"sed -r 's/(OpenSSH_)(.*)/openssh:\2/'"; -# we run into false positives in static analysis: -openssh;no_static;SSH-OpenSSH;"^OpenSSH_[0-9](\.[0-9]+)+?([a-z][0-9]+)?$";"sed -r 's/OpenSSH_([0-9](\.[0-9]+)+?([a-z][0-9]+)?)$/openssh:\1/'"; -openssl;;OpenSSL OR Apache-2.0;"^OpenSSL\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/OpenSSL\ ([0-9](\.[0-9]+)+?).*$/openssl:openssl:\1/'"; -openssl;;OpenSSL OR Apache-2.0;"^OpenSSL\ [0-9](\.[0-9]+)+?(-[a-z]+)\ ";"sed -r 's/OpenSSL\ ([0-9](\.[0-9]+)+?)((-[a-z]+)?)\ .*$/openssl:openssl:\1\2/'"; -openssl;;OpenSSL OR Apache-2.0;"^OpenSSL\ [0-9](\.[0-9]+)+?([a-z]+)?-";"sed -r 's/OpenSSL\ ([0-9](\.[0-9]+)+?([a-z]+)?)-.*$/openssl:openssl:\1/'"; -openssl;;OpenSSL OR Apache-2.0;"^OpenSSL\ [0-9](\.[0-9]+)+?([a-z]+)?\ ";"sed -r 's/OpenSSL\ ([0-9](\.[0-9]+)+?([a-z]+)?)\ .*$/openssl:openssl:\1/'"; -openssl;;OpenSSL OR Apache-2.0;"^OpenSSL\ [0-9](\.[0-9]+)+?(-[a-z]+)$";"sed -r 's/OpenSSL\ ([0-9](\.[0-9]+)+?)((-[a-z]+)?)$/openssl:openssl:\1\2/'"; -openssl;;OpenSSL OR Apache-2.0;"part of OpenSSL\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/.*OpenSSL\ ([0-9](\.[0-9]+)+?).*$/openssl:openssl:\1/'"; -openssl;;OpenSSL OR Apache-2.0;"part of OpenSSL\ [0-9](\.[0-9]+)+?(-[a-z]+)\ ";"sed -r 's/.*OpenSSL\ ([0-9](\.[0-9]+)+?)((-[a-z]+)?)\ .*$/openssl:openssl:\1\2/'"; -openssl;;OpenSSL OR Apache-2.0;"part of OpenSSL\ [0-9](\.[0-9]+)+?([a-z]+)?-";"sed -r 's/.*OpenSSL\ ([0-9](\.[0-9]+)+?([a-z]+)?)-.*$/openssl:openssl:\1/'"; -openssl;;OpenSSL OR Apache-2.0;"part of OpenSSL\ [0-9](\.[0-9]+)+?([a-z]+)?\ ";"sed -r 's/.*OpenSSL\ ([0-9](\.[0-9]+)+?([a-z]+)?)\ .*$/openssl:openssl:\1/'"; -openssl;;OpenSSL OR Apache-2.0;"part of OpenSSL\ [0-9](\.[0-9]+)+?(-[a-z]+)$";"sed -r 's/.*OpenSSL\ ([0-9](\.[0-9]+)+?)((-[a-z]+)?)$/openssl:openssl:\1\2/'"; -openswan;;GPL-2.0-only;"^Openswan\ [0-9](\.[0-9]+)+?$";"sed -r 's/Openswan\ ([0-9](\.[0-9]+)+?)$/openswan:\1/'"; -openswan;;GPL-2.0-only;"^Linux\ Openswan\ [0-9](\.[0-9]+)+?$";"sed -r 's/Linux\ Openswan\ ([0-9](\.[0-9]+)+?)$/openswan:\1/'"; -openvpn;;GPL-2.0-only;"^OpenVPN\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/OpenVPN\ ([0-9](\.[0-9]+)+?)\ .*/openvpn:\1/'"; -# for future use / not yet used -# openwrt;;gpl;(OpenWrt)\ ([0-9]+\.[0-9]+\.[0-9])\ (r[0-9]+\-)([a-z0-9]+).*";sed -r 's/(OpenWrt)\ ([0-9]+\.[0-9]+\.[0-9])\ (r[0-9]+\-)([a-z0-9]+).*/openwrt:\2/'"; -opkg;;unknown;"opkg\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/opkg\ version\ ([0-9](\.[0-9]+)+?)/opkg:\1/'"; -ospf6d;;unknown;"^ospf6d\ version\ [0-9](\.[0-9]+)+$";"sed -r 's/ospf6d\ version\ ([0-9](\.[0-9]+)+?)$/ospf6d:\1/'"; -overlord;;unknown;"^overlord\ [0-9](\.[0-9]+)+?$";"sed -r 's/overlord\ ([0-9](\.[0-9]+)+?)$/overlord:\1/'"; -ozker;;unknown;"^ozKer\ [0-9](\.[0-9]+)+?(\.ozker\ build-[0-9]+)?$";"sed -r 's/ozker\ ([0-9](\.[0-9]+)+?).*/ozker:\1/'"; -p0f;;unknown;"^---\ p0f\ [0-9]\.[0-9]+[a-z]\ by\ Michal\ Zalewski\ \ ---$";"sed -r 's/---\ p0f\ ([0-9](\.[0-9]+)+?([a-z]+)?).*$/p0f:\1/'"; -px5g;;unknown;"^PX5G\ X\.509\ Certificate\ Generator\ Utility\ v[0-9]+(\.[0-9]+)+?$";"sed -r 's/PX5G\ X\.509\ Certificate\ Generator\ Utility\ v([0-9](\.[0-9]+)+?)$/px5g:\1/'"; -p910nd;;unknown;"p910nd\ Version\ [0-9](\.[0-9]+)+?";"sed -r 's/p910nd\ Version\ ([0-9](\.[0-9]+)+?).*/p910nd:\1/'"; -p910nd;;unknown;"p910nd\ Version\ [0-9](\.[0-9]+)+?\ Copyright\ \(c\)\ [0-9]+-[0-9]+\ Ken\ Yap\ and\ others,\ GPLv2";"sed -r 's/p910nd\ Version\ ([0-9](\.[0-9]+)+?).*/p910nd:\1/'"; -parted;;unknown;"GNU\ parted.\ [0-9](\.[0-9]+)+?$";"sed -r 's/GNU\ parted.\ ([0-9](\.[0-9]+)+?)$/gnu:parted:\1/'"; -passwd;;unknown;"^update-passwd\ [0-9][\.0-9]+$";"sed -r 's/update-passwd\ ([0-9](\.[0-9]+)+?)$/passwd:\1/'"; -pax-utils;;unknown;"^pax-utils-v[0-9]+(\.[0-9]+)+?:$";"sed -r 's/pax-utils-v([0-9](\.[0-9]+)+?)$/pax-utils:\1/'"; -pcre;;unknown;"^pcre[a-z]+\ version\ [0-9](\.[0-9]+)+?\ 20[0-9]+-[0-9]+-[0-9]+$";"sed -r 's/pcre[a-z]+\ version\ ([0-9](\.[0-9]+)+?)\ .*/pcre:\1/'"; -pcsc-lite;;GPL-3.0-only;"^pcsc-lite\ version\ [0-9](\.[0-9]+)+?\.$";"sed -r 's/pcsc-lite\ version\ ([0-9](\.[0-9]+)+?).*/pcsc-lite:\1/'"; -perl;;GPL-1.0-only OR Artistic-1.0-Perl;"This\ is\ perl\ [0-9],\ version\ [0-9]+,\ subversion\ [0-9]+.*built";"sed -r 's/This\ is\ perl\ ([0-9]+),\ version\ ([0-9]+),\ subversion\ ([0-9]+).*/perl:\1\.\2\.\3/'"; -perl;;GPL-1.0-only OR Artistic-1.0-Perl;"This\ is\ perl.*\(v[0-9]\.[0-9]+\.[0-9]+\)\ built";"sed -r 's/This\ is\ perl.*\(v([0-9](\.[0-9]+)+?)\).*/perl:\1/'"; -php;;PHP-3.01;"^PHP\ [0-9]\.[0-9]+([0-9]+)+?$";"sed -r 's/PHP\ ([0-9](\.[0-9]+)+?)$/php:\1/'"; -php;;PHP-3.01;"^X-Powered-By:\ PHP\/[0-9]\.[0-9]+(\.[0-9]+)+?$";"sed -r 's/X-Powered-By:\ PHP\/([0-9](\.[0-9]+)+?)$/php:\1/'"; -picocom;;unknown;"^picocom\ v[0-9]\.[0-9]+$";"sed -r 's/picocom\ v([0-9](\.[0-9]+)+?)$/picocom:\1/'"; -pimd;;unknown;"^pimd\ version\ ((\.)?[0-9]+)+$";"sed -r 's/pimd\ version\ ([0-9](\.[0-9]+)+?)$/pimd:\1/'"; -pinentry;;unknown;"pinentry.*\ \(pinentry\)\ [0-9]\.[0-9]\.[0-9]+$";"sed -r 's/pinentry.*\ \(pinentry\)\ ([0-9](\.[0-9]+)+?)$/pinentry:\1/'"; -portmap;;unknown;"portmap\ version\ [0-9]\.[0-9]+\ -\ ";"sed -r 's/portmap\ version\ ([0-9](\.[0-9]+)+?)\ .*/portmap:\1/'"; -portt;;unknown;"portt\ version\ [0-9]+";"sed -r 's/portt\ version\ ([0-9]+).*/portt:\1/'"; -pppd;;unknown;"pppd\.so\.[0-9](\.[0-9]+)+?$";"sed -r 's/pppd\.so\.([0-9](\.[0-9]+)+?)$/point-to-point_protocol:\1/'"; -pppd;;unknown;"pppd\ version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/pppd\ version\ ([0-9](\.[0-9]+)+?)\ /point-to-point_protocol:\1/'"; -pppd;;unknown;"pppd\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/pppd\ version\ ([0-9](\.[0-9]+)+?)$/point-to-point_protocol:\1/'"; -# point-to-point_protocol:2.4.2:b3 -> b3 is not in cve database! -pppd;;unknown;"pppd\ version\ [0-9](\.[0-9]+)+?([a-z][0-9]+)?$";"sed -r 's/pppd\ version\ ([0-9](\.[0-9]+)+?)(([a-z][0-9]+)?)$/point-to-point_protocol:\1/'"; -pppoe-discovery;strict;unknown;"Version\ [0-9]\.[0-9]+([a-z])?$";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?([a-z])?)$/pppoe-discovery:\1/'"; -pppoe;;unknown;"pppoe\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/pppoe\ version\ ([0-9](\.[0-9]+)+?)$/pppoe:\1/'"; -rox2;;unknown;"User-Agent: Siemens Canada Limited - ROX2 - [0-9](\.[0-9]+)?+$";"sed -r 's/User-Agent: Siemens Canada Limited - ROX2 - ([0-9](\.[0-9]+)+?)$/siemens:ruggedcom_rox:\1/'"; -rp-pppoe;;GPL-2.0-only;"^PPPoE\ Version\ [0-9](\.[0-9]+)+?,\ Copyright\ \(C\)\ [0-9]+\ Roaring\ Penguin\ Software\ Inc\.$";"sed -r 's/PPPoE\ Version ([0-9](\.[0-9]+)+?),\ Copyright\ \(C\)\ [0-9]+\ Roaring\ Penguin\ Software\ Inc\.$/roaring_penguin:pppoe:\1/'"; -rp-pppoe;;GPL-2.0-only;"^PPPoE\ Version\ [0-9](\.[0-9]+)+?,\ Copyright\ \(C\)\ [0-9]+-[0-9]+\ Roaring\ Penguin\ Software\ Inc\.$";"sed -r 's/PPPoE\ Version ([0-9](\.[0-9]+)+?).*/roaring_penguin:pppoe:\1/'"; -rp-pppoe;;GPL-2.0-only;"^PPPoE\ Version\ [0-9](\.[0-9]+)+?,\ Copyright\ .*\ Roaring\ Penguin\ Software\ Inc\.$";"sed -r 's/PPPoE\ Version ([0-9](\.[0-9]+)+?),\ Copyright\ .*\ Roaring\ Penguin\ Software\ Inc\.$/roaring_penguin:pppoe:\1/'"; -rp-pppoe;;unknown;"PPPoE\ Version\ [0-9](\.[0-9]+)+?,\ Copyright\ \(C\)\ [0-9]+-[0-9]+\ Roaring\ Penguin\ Software\ Inc\.";"sed -r 's/PPPoE\ Version ([0-9](\.[0-9]+)+?),\ Copyright\ .*\ Roaring\ Penguin\ Software\ Inc\.$/roaring_penguin:pppoe:\1/'"; -rp-pppoe;;GPL-2.0-only;"Roaring\ Penguin\ PPPoE\ Version\ [0-9](\.[0-9]+)+?";"sed -r 's/Roaring\ Penguin\ PPPoE\ Version ([0-9](\.[0-9]+)+?).*/roaring_penguin:pppoe:\1/'"; -rp-pppoe;;GPL-2.0-only;"PPPoE-Server\ Version\ [0-9](\.[0-9]+)+?,\ Copyright\ \(C\)\ 2001-2006\ Roaring\ Penguin\ Software\ Inc\.";"sed -r 's/PPPoE-Server\ Version ([0-9](\.[0-9]+)+?).*/roaring_penguin:pppoe:\1/'"; -pptp;;unknown;"^pptp\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/pptp\ version\ ([0-9](\.[0-9]+)+?)$/pptp:\1/'"; -pptp;;unknown;"^pptp-linux\ version [0-9](\.[0-9]+)+?$";"sed -r 's/pptp-linux\ version\ ([0-9](\.[0-9]+)+?)$/pptp:\1/'"; -accel-pptpd;;unknown;"accel-pptpd\ v[0-9](\.[0-9]+)+?\ \ compiled";"sed -r 's/accel-pptpd\ v([0-9](\.[0-9]+)+?)\ \ .*/accel:pptp:\1/'"; -procps-ng;;unknown;"procps-ng\ [0-9](\.[0-9]+)+?$";"sed -r 's/procps-ng\ ([0-9](\.[0-9]+)+?)$/procps-ng:\1/'"; -procps;;unknown;"procps\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/procps\ version\ ([0-9](\.[0-9]+)+?)/procps:\1/'"; -proftpd;;GPL-2.0-or-later;"^ProFTPD\ Version\ [0-9](\.[0-9]+)+[a-zA-Z]?$";"sed -r 's/ProFTPD\ Version\ ([0-9](\.[0-9]+)+[a-zA-Z]?)$/proftp:\1/'"; -prol2tp;;unknown;"^ProL2TP\ v[\.0-9]+\ ";"sed -r 's/ProL2TP\ v([0-9](\.[0-9]+)+?)\ .*/prol2tp:\1/'"; -proxyd;;unknown;"^proxyd\ VERSION\ [0-9]\.[0-9](\.[0-9]+)+?$";"sed -r 's/proxyd\ VERSION\ ([0-9](\.[0-9]+)+?)$/proxyd:\1/'"; -psmisc;;unknown;"PSmisc.\ [0-9]+(\.[0-9]+)+$";"sed -r 's/PSmisc.\ ([0-9]+(\.[0-9]+)+?)$/psmisc:\1/'"; -pt_chown;;unknown;"pt_chown\ \(.*\)\ [0-9]\.[0-9]+";"sed -r 's/pt_chown\ \(.*\)\ ([0-9](\.[0-9]+)+?)/ptchown:\1/'"; -ptpd2;;unknown;"ptpd2\ version\ [0-9]\.[0-9]+\.[0-9]+";"sed -r 's/ptpd2\ version\ ([0-9](\.[0-9]+)+?)/ptpd2:\1/'"; -pure-ftpd;;ISC;"pure-ftpd\ v[0-9](\.[0-9]+)+?\ \[privsep\]$";"sed -r 's/pure-ftpd\ v([0-9](\.[0-9]+)+?).*/pure-ftpd:\1/'"; -python;;Python-2.0.1;"^Python\ [0-9]\.[0-9]+\.[0-9]+\ ";"sed -r 's/Python\ ([0-9](\.[0-9]+)+?)\ .*/python:\1/'"; -python;;Python-2.0.1;"^Python\ [0-9](\.[0-9]+)+?$";"sed -r 's/Python\ ([0-9](\.[0-9]+)+?)$/python:\1/'"; -pyexpat;multi_grep;unknown;'"^pyexpat$"&&"^Python\ wrapper\ for\ Expat\ parser\.$"&&"^sqlite3_bind_parameter_index$"&&"^[0-9](\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/pyexpat:\1/'"; -#qmi;;unknown;"^qmi[-a-z]+\ [.\0-9]+$";"NA"; -qnx;;unknown;"Welcome\ to\ QNX\ Neutrino\ [0-9](\.[0-9]+)+?$";"sed -r 's/Welcome\ to\ QNX\ Neutrino\ ([0-9](\.[0-9]+)+?)$/qnx_neutrino_rtos:\1/'"; -qrencode;;unknown;"^qrencode\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/qrencode\ version\ ([0-9](\.[0-9]+)+?)$/qrencode:\1/'"; -quagga;;GPL-3.0-only;"^(ldpd|linkd)\ version\ 0\.9[\.0-9]+$";"sed -r 's/(ldpd|linkd)\ version\ ([0-9](\.[0-9]+)+?)$/quagga:\1/'"; -quagga;;GPL-3.0-only;"^Hello,\ this\ is\ Quagga\ \(version\ [0-9](\.[0-9]+)+?\)\.$";"sed -r 's/Hello,\ this\ is\ Quagga\ \(version\ ([0-9](\.[0-9]+)+?)\)\.$/quagga:\1/'"; -#quik;;unknown;"QUIK\ version\ [0-9]\.[0-9]+";"NA"; -qdiscman;;unknown;"^qdiscman\ [0-9](\.[0-9]+)+?\ release$";"sed -r 's/qdiscman\ ([0-9](\.[0-9]+)+?)$/qdiscman:\1/'"; -radlogin;;unknown;"radlogin\.c,v\ [0-9]\.[0-9]+\ [0-9]+";"sed -r 's/radlogin\.c,v\ ([0-9](\.[0-9]+)+?).*/radlogin:\1/'"; -radvd;strict;radvd-lic;"Version:\ [0-9]\.[0-9]+$";"sed -r 's/Version:\ ([0-9](\.[0-9]+)+?)$/radvd:\1/'"; -radvd;strict;radvd-lic;"Version:\ [0-9]\.[0-9]+\.[0-9]+$";"sed -r 's/Version:\ ([0-9](\.[0-9]+)+?)$/radvd:\1/'"; -radvdump;strict;radvd-lic;"Version:\ [0-9]\.[0-9]+$";"sed -r 's/Version:\ ([0-9](\.[0-9]+)+?)$/radvd:\1/'"; -radvdump;strict;radvd-lic;"Version:\ [0-9]\.[0-9]+\.[0-9]+$";"sed -r 's/Version:\ ([0-9](\.[0-9]+)+?)$/radvd:\1/'"; -ralink-dot1x;;unknown;"Ralink\ DOT1X\ daemon,\ version\ ...[0-9](\.[0-9])+?.";"sed -r 's/Ralink\ DOT1X\ daemon,\ version\ ...([0-9](\.[0-9]+)+?).*/ralink-dot1x:\1/'"; -rarp;;unknown;"^rarp\ [0-9]\.[0-9]+\ \([0-9]{4}-[0-9]{2}-[0-9]{2}\)$";"sed -r 's/rarp\ ([0-9](\.[0-9]+)+?)\ .*/rarp:\1/'"; -rdisc6;;unknown;"ndisc6\:\ IPv6\ Neighbor\/Router\ Discovery\ userland\ tool\ [0-9](\.[0-9])+?\ ";"sed -r 's/ndisc6\:\ IPv6\ Neighbor\/Router\ Discovery\ userland\ tool\ ([0-9](\.[0-9]+)+?)\ .*/ndisc6:\1/'"; -rdnssd;;unknown;"rdnssd\:\ IPv6\ Recursive\ DNS\ Server\ discovery\ Daemon\ [0-9](\.[0-9])+?\ ";"sed -r 's/rdnssd\:\ IPv6\ Recursive\ DNS\ Server\ discovery\ Daemon\ ([0-9](\.[0-9]+)+?)\ .*/rdnssd:\1/'"; -Realtek_camera_tool;;unknown;"Welcome\ to\ Realtek\ Camera\ Tool\.\ Version\ [0-9](\.[0-9]+)+?";"sed -r 's/Welcome\ to\ Realtek\ Camera\ Tool\.\ Version\ ([0-9](\.[0-9]+)+?)/realtek_camera_tool:\1/'"; -redis_cli;;BSD-3-Clause;"^redis-cli\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/redis-cli\ ([0-9](\.[0-9]+)+?).*/redis:\1/'"; -reiserfsck;;unknown;"reiserfsck\ [0-9](\.[0-9]+)+?$";"sed -r 's/reiserfsck\ ([0-9](\.[0-9]+)+?).*/reiserfsck:\1/'"; -rflow;;unknown;"[0-9]\.[0-9]+\ Copyright\ by\ Nikki\ Chumakov$";"sed -r 's/([0-9](\.[0-9]+)+?)\ Copyright\ by\ Nikki\ Chumakov$/rflow:\1/'"; -ripd;;GPL-2.0-only;"^ripd\ version\ [\.0-9]+a?";"sed -r 's/ripd\ version\ ([0-9](\.[0-9]+)+?)/quagga:\1/'"; -ripd;;GPL-2.0-only;"^ripd\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/ripd\ version\ ([0-9](\.[0-9]+)+?)$/quagga:\1/'"; -ripngd;;gpl;"^ripngd\ version\ [\.0-9]+$";"sed -r 's/ripngd\ version\ ([0-9](\.[0-9]+)+?)$/quagga:\1/'"; -ripngd;;unknown;"^ripngd\ version\ [0-9](\.[0-9]+)+?([a-z])?\ ";"sed -r 's/ripngd\ version\ ([0-9](\.[0-9]+)+?[a-z]?)\.*/quagga:\1:\2/'"; -rndimage;;unknown;"RNDIMGAE\ v[0-9](\.[0-9]+)+?";"sed -r 's/RNDIMGAE\ v([0-9](\.[0-9]+)+?).*/rndimgae:\1/'"; -rngd;;unknown;"^rngd\ [0-9]$";"sed -r 's/rngd\ ([0-9]+)$/rngd:\1/'"; -rngd;;unknown;"^rngd\ [0-9]\.[0-9]+$";"sed -r 's/rngd\ ([0-9]+\.[0-9]+)$/rngd:\1/'"; -roamd;;unknown;"^roamd\ version\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/roamd\ version\ ([0-9]+(\.[0-9]+)+?)$/roamd:\1/'"; -rngtest;;unknown;"^rngtest\ [0-9](\.[0-9]+)+?$";"sed -r 's/rngtest\ ([0-9](\.[0-9]+)+?)$/rngtest:\1/'"; -rpcinfo;;unknown;"rpcinfo\ \(.*\)\ [0-9](\.[0-9]+)+?";"sed -r 's/rpcinfo\ \(.*\)\ ([0-9](\.[0-9]+)+?)/rpcinfo:\1/'"; -rred;strict;unknown;"Version:\ [0-9]\.[0-9]+";"sed -r 's/Version:\ ([0-9](\.[0-9]+)+?)/rred:\1/'"; -rsh;strict;unknown;"Version:\ [0-9]\.[0-9]+";"sed -r 's/Version:\ ([0-9](\.[0-9]+)+?)/rsh:\1/'"; -rsync;;unknown;"^rsync\ \ version\ [0-9](\.[0-9]+)+?\ \ protocol\ version\ [0-9]+$";"sed -r 's/rsync\ \ version\ ([0-9](\.[0-9]+)+?)\ .*/rsync:\1/'"; -rsyslogd;;unknown;"rsyslogd\ [0-9](\.[0-9]+)+?,\ compiled\ with:$";"sed -r 's/rsyslogd\ ([0-9](\.[0-9]+)+?),\ .*/rsyslogd:\1/'"; -rsyslogd;;unknown;"^rsyslogd\ [0-9](\.[0-9]+)+?\ runtime\ debug\ support\ -\ help\ requested,\ rsyslog\ terminates$";"sed -r 's/rsyslogd\ ([0-9](\.[0-9]+)+?)\ .*/rsyslogd:\1/'"; -rsyslogd;;unknown;"^liblogging-stdlog\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/liblogging-stdlog\ version\ ([0-9](\.[0-9]+)+?).*/rsyslog:\1/'"; -rsyslogd;multi_grep;unknown;'":\ module\ compiled\ with\ rsyslog\ version\ \%s.$"&&"[0-9](\.[0-9]+)+?$"';"sed -r 's/([0-9](\.[0-9]+)+?)/rsyslogd:\1/'"; -rt2860apd;;unknown;"Ralink\ DOT1X\ daemon,\ version\ =\ .[0-9](\.[0-9])+?\'\ ";"sed -r 's/Ralink\ DOT1X\ daemon,\ version\ =\ .([0-9](\.[0-9]+)+?)\ .*/ralink-dot1x:\1/'"; -rtpproxy;strict;unknown;"^Basic\ version:\ [0-9]+$";"sed -r 's/Basic\ version:\ ([0-9]+)$/rtpproxy:\1/'"; -run-parts;;unknown;"run-parts\ program,\ version\ [\.0-9]+$";"sed -r 's/run-parts\ program,\ version\ ([0-9](\.[0-9]+)+?)$/run-parts:\1/'"; -scepclient;;unknown;"^scepclient [0-9]\.[0-9]$";"sed -r 's/scepclient\ ([0-9](\.[0-9]+)+?)$/scepclient:\1/'"; -screen;;GPL-3.0-only;"^Screen\ version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/Screen\ version\ ([0-9](\.[0-9]+)+?)\ .*/screen:\1/'"; -sdptool;;unknown;"sdptool\ -\ SDP\ tool\ v[0-9](\.[0-9]+)+?$";"sed -r 's/sdptool\ -\ SDP\ tool\ v([0-9](\.[0-9]+)+?)$/sdptool:\1/'"; -sead;;unknown;"^sead\ [0-9](\.[0-9]+)+?\ release$";"sed -r 's/sead\ ([0-9](\.[0-9]+)+?)\ .*/sead:\1/'"; -seama;;unknown;"^seama\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/seama\ version\ ([0-9](\.[0-9]+)+?)$/seama:\1/'"; -sed;;GPL-3.0-only;"\(GNU\ sed\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ sed\)\ ([0-9](\.[0-9]+)+?)$/gnu:sed:\1/'"; -sed;;GPL-3.0-only;"GNU\ sed\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/GNU\ sed\ version\ ([0-9](\.[0-9]+)+?)$/gnu:sed:\1/'"; -sendmail;;Sendmail;"\ This\ is\ Sendmail\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/\ This\ is\ Sendmail\ version\ ([0-9](\.[0-9]+)+?)$/sendmail:\1/'"; -servd;;unknown;"servd\ version\ [0-9]+$";"sed -r 's/servd\ version\ ([0-9]+)$/servd:\1/'"; -setserial;;unknown;"setserial\ version\ [0-9](\.[0-9]+)+?,\ [0-9]+-.*-20[0-9]+$";"sed -r 's/setserial\ version\ ([0-9](\.[0-9]+)+?),\ .*$/setserial:\1/'"; -setpci;;unknown;"setpci\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/setpci\ version\ ([0-9](\.[0-9]+)+?)$/pciutils:\1/'"; -sharutils;;unknown;"\(GNU\ sharutils\)\ [0-9](\.[0-9]+)+?";"sed -r 's/\(GNU\ sharutils\)\ ([0-9](\.[0-9]+)+?)$/gnu:sharutils:\1/'"; -signtools;;unknown;"^signver[-\ a-zA-Z7]+Version\ [\.0-9]+$";"sed -r 's/signver[-\ a-zA-Z7]+Version\ ([0-9](\.[0-9]+)+?)$/signtools:\1/'"; -siprotec_5;;proprietary;"FWAOS_V[0-9]+.[0-9]+.[0-9]+.[0-9]+$";"sed -r 's/FWAOS_V([0-9]+(\.[0-9]+)+?)$/siprotec_5:\1/'"; -sicam;;proprietary;"7KG[0-9][0-9]x\ V[0-9]+(\.[0-9]+)+?\ PCK\ FILE$";"sed -r 's/7KG[0-9][0-9]x\ V([0-9]+(\.[0-9]+)+?)\ PCK\ FILE/sicam_q100:\1/'"; -#sisco_mms_lite;;unknown;"MMS-LITE-80X-001";"NA"; -smbd;multi_grep;GPL-3.0-only;'"^smbd version %s started.$"&&"^[2-5]\.[0-9]+\.[0-9]+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/samba:\1/'"; -smbd;strict;GPL-3.0-only;"^Version\ [2-5]\.[0-9]+\.[0-9]+$";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?)$/samba:\1/'"; -smbd;strict;GPL-3.0-only;"^Version\ [2-5]\.[0-9]+\.[0-9]+[a-z]$";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?[a-z]?)$/samba:\1/'"; -smbftpd;;unknown;"^SmbFTPD\ Ver\ [0-9]\.[0-9]+$";"sed -r 's/SmbFTPD\ Ver\ ([0-9](\.[0-9]+)+?)$/smbftpd:\1/'"; -smbpasswd;strict;GPL-3.0-only;"Version\ [0-9]\.[0-9]+\.[0-9]+";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?)$/samba:\1/'"; -smcroute;;unknown;"^SMCRoute\ [Vv]ersion\ [\.0-9]+";"sed -r 's/SMCRoute\ [Vv]ersion\ ([0-9](\.[0-9]+)+?)/smcroute:\1/'"; -smidump;;unknown;"^smidump\ [0-9][\.0-9]+";"sed -r 's/smidump\ ([0-9](\.[0-9]+)+?)/smidump:\1/'"; -smtpclient;;unknown;"This\ is\ SMTPclient\ Version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/This\ is\ SMTPclient\ Version\ ([0-9](\.[0-9]+)+?)\ .*/smtpclient:\1/'"; -snmpd;;unknown;"NET-SNMP\ version:\ \ [0-9](\.[0-9]+)+?$";"sed -r 's/NET-SNMP\ version:\ \ ([0-9](\.[0-9]+)+?)$/net-snmp:\1/'"; -snmpd;;unknown;"^NET-SNMP\ version:\ [0-9](\.[0-9]+)+?$";"sed -r 's/NET-SNMP\ version:\ ([0-9](\.[0-9]+)+?)$/net-snmp:\1/'"; -snmpd;strict;unknown;"^Version:\ \ [0-9]\.[0-9]+\.[0-9]$";"sed -r 's/Version:\ \ ([0-9](\.[0-9]+)+?)$/net-snmp:\1/'"; -snort;strict;GPL-2.0-only;"^Version\ [0-9](\.[0-9])+?";"sed -r 's/Version:\ ([0-9](\.[0-9]+)+?)/snort:\1/'"; -#sntp;;unknown;"^sntp\ [0-9][\.0-9p]+";"NA"; -socat;;GPL-2.0-only;"socat\ version\ [0-9](\.[0-9]+)+?-[a-z][0-9]+\ ";"sed -r 's/socat\ version\ ([0-9](\.[0-9]+)+?)((-[a-z][0-9]+)?)\ .*/socat:\1:\2/'"; -socat;;GPL-2.0-only;"socat\ version\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/socat\ version\ ([0-9](\.[0-9]+)+?)\ .*/socat:\1/'"; -sqlite3;;public-domain;"SQLite\ version\ 3(\.[0-9]+)+?";"sed -r 's/SQLite\ version\ (3(\.[0-9]+)+?).*/sqlite:\1/'"; -sqlite3;multi_grep;public-domain;'"^sqlite3_version$"&&"^sqlite3_bind_parameter_index$"&&"^3(\.[0-9]+)?+$"';"sed -r 's/([0-9](\.[0-9]+)+?)$/sqlite3:\1/'"; -libsqlite3.so.0;strict;public-domain;"^3\.[0-9]+\.[0-9]+$";"sed -r 's/(3(\.[0-9]+)+?)$/sqlite:\1/'"; -squidclient;strict;unknown;"Version:\ [0-9]\.[0-9]\.[0-9]";"sed -r 's/Version:\ ([0-9](\.[0-9]+)+?)/squidclient:\1/'"; -squidguard;;unknown;"SquidGuard:\ [0-9]\.[0-9]\ Berkeley\ DB\ [0-9]\.[0-9]\.[0-9]+";"sed -r 's/SquidGuard:\ ([0-9](\.[0-9]+)+?)\ .*/squidguard:\1/'"; -squid;;unknown;"Squid\ Cache:\ Version\ [0-9](\.[0-9]+)+?$";"sed -r 's/Squid\ Cache:\ Version\ ([0-9](\.[0-9]+)+?)$/squid-cache:squid:\1/'"; -ssleay;;ssleay;"part\ of\ SSLeay\ [0-9]\.[0-9]+\.[0-9]+\ [0-9]+-";"sed -r 's/part\ of\ SSLeay\ ([0-9](\.[0-9]+)+?)\ .*/ssleay:\1/'"; -ssmtp;;unknown;"^sSMTP\ [0-9](\.[0-9]+)+?\ \(Not\ sendmail\ at\ all\)$";"sed -r 's/sSMTP\ ([0-9](\.[0-9]+)+?)\ \(Not\ sendmail\ at\ all\)$/ssmtp:ssmtp:\1/'"; -start-stop-deamon;;unknown;"^start-stop-daemon\ [0-9][\.0-9]+\ ";"sed -r 's/start-stop-daemon\ ([0-9](\.[0-9]+)+?)\ .*/start-stop-daemon:\1/'"; -strace;;unknown;"strace\ --\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/strace\ --\ version\ ([0-9](\.[0-9]+)+?)$/strace:\1/'"; -ltrace;;unknown;"^ltrace\ version\ [0-9](\.[0-9]+)+?\.$";"sed -r 's/ltrace\ version\ ([0-9](\.[0-9]+)+?)\.$/ltrace:\1/'"; -strongswan;;GPL-2.0-only;"Linux\ strongSwan\ [0-9](\.[0-9]+)+?$";"sed -r 's/Linux\ strongSwan\ ([0-9](\.[0-9]+)+?)$/strongswan:\1/'"; -strongswan;;GPL-2.0-only;"\ strongSwan\ [0-9](\.[0-9]+)+?$";"sed -r 's/.*\ strongSwan\ ([0-9](\.[0-9]+)+?)$/strongswan:\1/'"; -strongswan;;GPL-2.0-only;"^ipsec _copyright strongSwan [0-9](\.[0-9]+)+?$";"sed -r 's/ipsec _copyright strongSwan ([0-9](\.[0-9]+)+?)/strongswan:\1/'"; -stunnel;;GPL-2.0-only;"stunnel\ [0-9](\.[0-9]+)+?\ on\ ";"sed -r 's/stunnel\ ([0-9](\.[0-9]+)+?)\ .*/stunnel:\1/'"; -sudoreplay;;unknown;"sudoreplay\ version\ [0-9](\.[0-9]+)+?(p[0-9]+)?$";"sed -r 's/sudoreplay\ version\ ([0-9](\.[0-9]+)+?(p[0-9]+)?)$/sudo:\1/'"; -sudo;;ISC;"Sudo\ version\ [0-9](\.[0-9]+)+?(p[0-9]+)?$";"sed -r 's/Sudo\ version\ ([0-9](\.[0-9]+)+?(p[0-9]+)?)$/sudo:\1/'"; -sudo;;ISC;"\/sudo-[0-9](\.[0-9]+)+?(p[0-9]+)?\/";"sed -r 's/\/sudo-([0-9](\.[0-9]+)+?(p[0-9]+)?)\//sudo:\1/'"; -suricata;;unknown;"Suricata\ [0-9](\.[0-9]+)+?";"sed -r 's/Suricata\ ([0-9](\.[0-9]+)+?).*/suricata:\1/'"; -syslogd;;unknown;"^syslogd\ v[0-9](\.[0-9]+)+?$";"sed -r 's/syslogd\ v([0-9](\.[0-9]+)+?)$/syslogd:\1/'"; -sysstat;;unknown;"^sysstat\ version\ [0-9]+(\.[0-9]+)+?$";"sed -r 's/sysstat\ version\ ([0-9]+(\.[0-9]+)+?)$/sysstat:\1/'"; -systemd;strict;LGPL-2.1-or-later;"^[0-9]{3}$";"sed -r 's/([0-9]+)$/systemd:\1/'"; -systemd;;LGPL-2.1-or-later;"^systemd\ [0-9]{3}\ \([0-9]{3}\.[0-9].*\)$";"sed -r 's/systemd\ [0-9]{3}\ \(([0-9]{3}\.[0-9]).*\)$/systemd:\1/'"; -systemd;;LGPL-2.1-or-later;"^systemd\ [0-9]{3}$";"sed -r 's/systemd\ ([0-9]+)$/systemd:\1/'"; -systemd;;LGPL-2.1-or-later;"^systemd [v0-9.-]+.* running in %ssystem mode \(%s\)$";"sed -r 's/systemd v?([0-9.]+).*/systemd:\1/'"; -sysvinit;;GPL-2.0-or-later;"^INIT_VERSION\=sysvinit-[0-9]\.(\.[0-9]+)+?$";"sed -r 's/INIT_VERSION\=sysvinit-([0-9](\.[0-9]+)+?)$/sysvinit:\1/'"; -tar;;unknown;"\(GNU\ tar\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ tar\)\ ([0-9](\.[0-9]+)+?)$/gnu:tar:\1/'"; -tcci;;unknown;"^\ tcci\ version:\ tcci\ V[0-9](\.[0-9]+)+?\ ";"sed -r 's/\ tcci\ version:\ tcci\ V([0-9](\.[0-9]+)+?)\ .*/tcci:\1/'"; -tcpdump;strict;BSD-3-Clause;"^[2-9]\.[0-9]+\.[0-9]+$";"sed -r 's/([0-9](\.[0-9]+)+?)$/tcpdump:\1/'"; -tcpdump;multi_grep;BSD-3-Clause;'"^dump"&&"^\[\ -T\ type\ \]\ \[\ --version\ \]\ \[\ -V\ file\ \]$"&&"^[2-9](\.[0-9]+)+?$"';"sed -r 's/([0-9](\.[0-9]+)+?)/tcpdump:\1/'"; -tcpdump;;BSD-3-Clause;"tcpdump\.[2-9](\.[0-9]+)+?\ version";"sed -r 's/tcpdump\.([0-9](\.[0-9]+)+?)\ version/tcpdump:\1/'"; -tcpdump;;BSD-3-Clause;"^tcpdump\ version\ [2-9](\.[0-9]+)+?$";"sed -r 's/tcpdump\ version\ ([0-9](\.[0-9]+)+?)$/tcpdump:\1/'"; -tempfile;;unknown;"^tempfile\ [0-9][\.0-9]+$";"sed -r 's/tempfile\ ([0-9](\.[0-9]+)+?(p[0-9]+)?)$/tempfile:\1/'"; -texinfo;;unknown;"\(GNU\ texinfo\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(GNU\ texinfo\)\ ([0-9](\.[0-9]+)+?)$/gnu:sed:\1/'"; -thttpd;;bsd-style;"^thttpd\/[0-9]\.[0-9]+([a-z])?\ [0-9]{2}[a-z]+[0-9]{4}$";"sed -r 's/thttpd\/([0-9]+\.[0-9]+([a-z])?).*/acme_labs:thttpd:\1/'" -sthttpd;;bsd-style;"^sthttpd\/[0-9](\.[0-9]+)+?([a-z])?.*";"sed -r 's/sthttpd\/([0-9]+(\.[0-9]+)+?([a-z])?).*/:sthttpd:\1/'" -tinylogin;;GPL-2.0-only;"Tinylogin v[0-9](\.[0-9]+)+?\ \(.*\)\ multi-call\ binary$";"sed -r 's/Tinylogin\ v([0-9](\.[0-9]+)+?)\ .*/busybox:\1/'"; -tor;;unknown;"Tor\ v[0-9](\.[0-9]+)+?\ .git";"sed -r 's/Tor\ v([0-9](\.[0-9]+)+?)\ .*/tor:\1/'"; -traceroute;;GPL-2.0-only;"traceroute\.db\:\ Modern\ traceroute\ for\ Linux,\ version\ [0-9](\.[0-9]+)+?,\ [[:alpha:]]{3}\ [0-9]+\ [0-9]+";"sed -r 's/traceroute\.db\:\ Modern\ traceroute\ for\ Linux,\ version\ ([0-9](\.[0-9]+)+?)\ .*/traceroute:\1/'"; -traceroute;;GPL-2.0-only;"^Modern\ traceroute\ for\ Linux,\ [Vv]ersion\ [0-9]+(\.[0-9]+)+?";"sed -r 's/Modern\ traceroute\ for\ Linux,\ [Vv]ersion\ ([0-9]+(\.[0-9]+)+?)$/traceroute:\1/'"; -traceroute;strict;GPL-2.0-only;"^Version\ [0-9]\.[0-9]+a[0-9]+";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?).*/traceroute:\1/'"; -transmissionbt;;GPL-2.0-only or GPL-3.0-only;"^Transmission\ [0-9]+(\.[0-9]+)+?\ \(\)\ \ http\:\/\/www\.transmissionbt\.com\/$";"sed -r 's/Transmission\ ([0-9]+(\.[0-9]+)+?)\ .*/transmission:transmissionbt:\1/'"; -transmissionbt;;GPL-2.0-only or GPL-3.0-only;"^transmission-cli\ [0-9]\.[0-9]+\ \([0-9]+\)$";"sed -r 's/transmission-cli\ ([0-9](\.[0-9]+)+?)\ .*/transmission:transmissionbt:\1/'"; -trigger;;unknown;"trigger\ version\ [0-9]+$";"sed -r 's/trigger\ version\ ([0-9]+)$/trigger:\1/'"; -tune2fs;;unknown;"tune2fs\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/tune2fs\ ([0-9](\.[0-9]+)+?).*/e2fsprogs:\1/'"; -twonky;;unknown;"Twonky\ Version\ [0-9](\.[0-9]+)+?";"sed -r 's/Twonky\ Version\ ([0-9](\.[0-9]+)+?).*/twonky:\1/'"; -tzcode;;unknown;"\(tzcode\)\ 20[0-9][0-9][a-z]$";"sed -r 's/.*\(tzcode\)\ ([0-9]+[a-z]+?)$/tzcode:\1/'"; -tzdata;;unknown;"\(tzdata\)\ 20[0-9][0-9][a-z]$";"sed -r 's/.*\(tzdata\)\ ([0-9]+[a-z]+?)$/tzdata:\1/'"; -#tzo;;unknown;"^Tzo Version : [0-9](\.[0-9]+)+?";"NA"; -ubiquiti_speedtest;;unknown;"^Network\ Speed\ Tester\ client\ v[0-9](\.[0-9]+)+?\ \(c\)\ Ubiquiti\ Networks$";"sed -r 's/Network\ Speed\ Tester\ client\ v([0-9](\.[0-9]+)+?).*/ubiquiti:network_speed_tester:\1/'"; -ubnt-infctld;;unknown;"Multipurpose\(mtik,\ mcast\)\ control\ daemon\ v[0-9](\.[0-9]+)+?\ \(c\)\ Ubiquiti$";"sed -r 's/Multipurpose\(mtik,\ mcast\)\ control\ daemon\ v([0-9](\.[0-9]+)+?).*/ubiquiti:control_daemon:\1/'"; -u-boot;;GPL-2.0-only;"Compiled\ with\ U-Boot\ [0-9]+(\.[0-9]+)+?(rc[0-9]+)?";"sed -r 's/Compiled\ with\ U-Boot\ ([0-9]+(\.[0-9]+)+?(rc[0-9]+)?)/u-boot:\1/'"; -u-boot;;GPL-2.0-only;"^mk(env)?image\ version\ 20[0-9]+\.[0-9]+";"sed -r 's/mk.*image\ version\ ([0-9]+(\.[0-9]+)+?).*/u-boot:\1/'"; -u-boot;;GPL-2.0-only;"U-Boot\ [0-9]+(\.[0-9]+)+?\ ";"sed -r 's/U-Boot\ ([0-9]+(\.[0-9]+)+?(rc[0-9]+)?)\ .*/u-boot:\1/'"; -ucd-snmpd;;bsd-style;"UCD-snmp\ version:\ \ [0-9](\.[0-9]+)+?$";"sed -r 's/UCD-snmp\ version:\ \ ([0-9]+(\.[0-9]+)+?)$/ucd-snmp:\1/'"; -ucloud;;unknown;"ucloud_v2\ ver\.[0-9]+";"sed -r 's/ucloud_v2\ ver\.([0-9]+).*/ucloud:\1/'"; -udevadm;strict;unknown;"^[0-9]{3}$";"sed -r 's/([0-9]+)$/systemd:\1/'"; -udevinfo;;unknown;"^udevinfo,\ version\ [0-9]+$";"sed -r 's/udevinfo,\ version\ ([0-9]+)$/udevinfo:\1/'"; -udev;;unknown;"^udev-[0-9]\.[0-9](\.[0-9]+)+?$";"sed -r 's/udev-([0-9](\.[0-9]+)+?)$/systemd:\1/'"; -udhcp_client;;unknown;"info,\ udhcp\ client\ \(v[0-9](\.[0-9]+)+?\)\ started";"sed -r 's/info,\ udhcp\ client\ \(v([0-9](\.[0-9]+)+?)\)\ started.*/udhcp-client:\1/'"; -udhcpc;;unknown;"udhcpcd,\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/udhcpcd,\ version\ ([0-9](\.[0-9]+)+?).*/udhcpc:\1/'"; -udhcpc;;unknown;"udhcpc\ \(v[0-9](\.[0-9]+)+?(-pre)?\)\ started$";"sed -r 's/udhcpc\ \(v([0-9](\.[0-9]+)+?)(-pre)?\)\ .*/udhcpc:\1/'"; -udhcp;;unknown;"udhcp\ [0-9](\.[0-9]+)+?$";"sed -r 's/udhcp\ ([0-9](\.[0-9]+)+?)$/udhcp:\1/'"; -uefi_shell;;bsd-style;"\*\*\*\ UEFI\ Shell\ v[0-9]+\.[0-9]+,\ release\ [0-9]+[A-Z][0-9]+\ \*\*\*";"sed -r 's/\*\*\*\ UEFI\ Shell\ v([0-9]+\.[0-9]+),\ release\ ([0-9]+[A-Z][0-9]+)\ \*\*\*/uefi_shell:\1:\2/'"; -uefi_shell;;bsd-style;"\*\*\*\ UEFI\ Shell\ v[0-9]+\.[0-9]+,\ release\ [0-9]+\.[0-9]+\ \*\*\*";"sed -r 's/\*\*\*\ UEFI\ Shell\ v([0-9]+\.[0-9]+),\ release\ ([0-9]+\.[0-9]+)\ \*\*\*/uefi_shell:\1:\2/'"; -uefi_shell;;bsd-style;"UEFI\ SHELL\ [0-9]+\.[0-9]+\ [0-9]+[A-Z][0-9]+\ ";"sed -r 's/UEFI\ SHELL\ ([0-9]+\.[0-9]+)\ ([0-9]+[A-Z][0-9]+)\ /uefi_shell:\1:\2/'"; -uefi_shell;;bsd-style;"UEFI\ SHELL\ [0-9]+\.[0-9]+\ [0-9]+\.[0-9]+\ ";"sed -r 's/UEFI\ SHELL\ ([0-9]+\.[0-9]+)\ ([0-9]+\.[0-9]+)\ /uefi_shell:\1:\2/'"; -ulogd;;unknown;"^ulogd\ Version\ [0-9](\.[0-9]+)+?$";"sed -r 's/ulogd\ Version\ ([0-9](\.[0-9]+)+?)/ulogd:\1/'"; -ultravnc_linux_repeater;;unknown;"^UltraVnc\ Linux\ Repeater\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/UltraVnc\ Linux\ Repeater\ version\ ([0-9](\.[0-9]+)+?)$/ultravnc:repeater:\1/'"; -xlink-ult;;unknown;"XLINK\ v[0-9]+(\.[0-9]+)+?\ ";"sed -r 's/XLINK\ v([0-9]+(\.[0-9]+)+?)\ .*/xlink:\1/'"; -unrar;;unknown;"^UNRAR\ [0-9]\.[0-9]+\ freeware\ .*\ Copyright\ \(c\)\ [0-9]+-[0-9]+\ Alexander\ Roshal$";"sed -r 's/UNRAR\ ([0-9]+(\.[0-9]+)+?)\ .*/unrar:\1/'"; -upnpc-ddns;;unknown;"upnpc-ddns\ version:\ [0-9](\.[0-9]+)+?:\ ";"sed -r 's/upnpc-ddns\ version:\ ([0-9]+(\.[0-9]+)+?):\ /upnpc-ddns:\1/'"; -upnp_igd;;unknown;"UPnP\ ControlPoint\ [0-9](\.[0-9]+)+?\ for\ IGD";"sed -r 's/UPnP\ ControlPoint\ ([0-9](\.[0-9]+)+?)\ for\ IGD/upnp_controlpoint:\1/'"; -upnp_sdk;;unknown;"Intel\ SDK\ for\ UPnP\ devices\ \/[0-9](\.[0-9]+)+?$";"sed -r 's/Intel\ SDK\ for\ UPnP\ devices\ \/([0-9](\.[0-9]+)+?)$/portable_sdk_for_upnp:\1/'"; -upnp_sdk;;unknown;"Portable\ SDK\ for\ UPnP\ devices\ [0-9](\.[0-9]+)+?\ .*";"sed -r 's/Portable\ SDK\ for\ UPnP\ devices\ ([0-9](\.[0-9]+)+?)\ .*/portable_sdk_for_upnp:\1/'"; -usb-modeswitch;strict;unknown;"Version\ [0-9]\.[0-9]+\.[0-9]+\ ";"sed -r 's/Version\ ([0-9]+(\.[0-9]+)+?)\ .*/usb-modeswitch:\1/'"; -usbhid-dump;;unknown;"^usbhid-dump [0-9]\.[0-9]$";"sed -r 's/usbhid-dump\ ([0-9]+(\.[0-9]+)+?)$/usbhid:\1/'"; -util-linux;;GPL-2.0-or-later;"util-linux\ [0-9](\.[0-9]+)+?$";"sed -r 's/util-linux\ ([0-9](\.[0-9]+)+?)$/util-linux:\1/'"; -util-linux-ng;;GPL-2.0-or-later;"util-linux-ng\ [0-9](\.[0-9]+)+?";"sed -r 's/util-linux-ng\ ([0-9](\.[0-9]+)+?)$/util-linux-ng:\1/'"; -utmdaemon;strict;unknown;"version\ [0-9]\.[0-9]+(-beta)?";"sed -r 's/version\ ([0-9](\.[0-9]+)+?).*/utmdaemon:\1/'"; -uvm;;unknown;"UVM\ [0-9](\.[0-9]+)+?";"sed -r 's/UVM\ ([0-9](\.[0-9]+)+?)$/uvm:\1/'"; -veritysetup;;GPL-2.0-or-later;"veritysetup\ [0-9](\.[0-9]+)+?$";"sed -r 's/veritysetup\ ([0-9](\.[0-9]+)+?)$/veritysetup:\1/'"; -vim;;Vim;"VIM\ -\ Vi\ IMproved\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/VIM\ -\ Vi\ IMproved\ ([0-9]+(\.[0-9]+)+?)\ .*/vim:\1/'"; -visudo;;unknown;"visudo\ version\ [0-9](\.[0-9]+)+?(p[0-9]+)?$";"sed -r 's/visudo\ version\ ([0-9](\.[0-9]+)+?(p[0-9]+)?)$/sudo:\1/'"; -vsftpd;;GPL-2.0-only;"^vsftpd: version [0-9](\.[0-9]+)+?$";"sed -r 's/vsftpd:\ version\ ([0-9](\.[0-9]+)+?)/vsftpd_project:vsftpd:\1/'"; -vxworks;;unknown;"^VxWorks\ [0-9](\.[0-9]+)+?$";"sed -r 's/VxWorks\ ([0-9](\.[0-9]+)+?)$/vxworks:\1/'"; -vxworks;;unknown;"VxWorks[0-9](\.[0-9]+)+?$";"sed -r 's/VxWorks([0-9](\.[0-9]+)+?)$/vxworks:\1/'"; -vxworks;;unknown;"VxWorks\ [0-9](\.[0-9]+)+?\ SMP";"sed -r 's/VxWorks\ ([0-9](\.[0-9]+)+).*/vxworks:\1/'"; -vxworks;;unknown;"vxWorks\ [0-9]\ SR[0-9]+$";"sed -r 's/[Vv]xWorks\ ([0-9])\ (SR[0-9]+)$/vxworks:\1:sr\2/'"; -vxworks;;unknown;"VxWorks\ operating\ system\ version\ \"[0-9](\.[0-9]+)+?\"";"sed -r 's/VxWorks\ operating\ system\ version\ \"([0-9](\.[0-9]+)+?)\"$/vxworks:\1/'"; -watchdog;;unknown;"watchdog\ version\ [0-9](\.[0-9]+)+?,\ usage\:";"sed -r 's/watchdog\ version\ ([0-9](\.[0-9]+)+?),\ .*/watchdog:\1/'"; -webio;;BSD-3-Clause;"^Webio\ Embedded\ server\ v[0-9](\.[0-9]+)+?$";"sed -r 's/Webio\ Embedded\ server\ v([0-9](\.[0-9]+)+?).*/webio:\1/'"; -watchquagga;;GPL-2.0-or-later;"watchquagga\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/watchquagga\ version\ ([0-9](\.[0-9]+)+?).*$/quagga:\1/'"; -wget;;GPL-3.0-only;"Wget\ [0-9](\.[0-9]+)+?,\ a\ non-interactive\ network\ retriever";"sed -r 's/Wget\ ([0-9](\.[0-9]+)+?),\ a\ .*/wget:\1/'"; -wget;;GPL-3.0-only;"Wget\ [0-9](\.[0-9]+)+?\ built\ on\ ";"sed -r 's/Wget\ ([0-9](\.[0-9]+)+?)\ built\ on.*/wget:\1/'"; -wget;multi_grep;GPL-3.0-only;'"^GNU Wget %s, a non-interactive network retriever.$"&&"^[0-9]\.[0-9]{2}(\.[0-9]+)+?$"';"sed -r 's/([0-9](\.[0-9]+)+?)/wget:\1/'"; -whatis;;unknown;"whatis\ [0-9](\.[0-9]+)+?$";"sed -r 's/whatis\ ([0-9](\.[0-9]+)+?)$/whatis:\1/'"; -which;;GPL-2.0-or-later;"^GNU\ which\ v[0-9]\.[0-9]+.*";"sed -r 's/GNU\ which\ v([0-9](\.[0-9]+)+?).*/gnu:which:\1/'"; -whiptail;;unknown;"whiptail\ \(newt\):\ [0-9](\.[0-9]+)+?";"sed -r 's/whiptail\ \(newt\):\ ([0-9](\.[0-9]+)+?)/whiptail:\1/'"; -whois;strict;unknown;"Version\ [0-9]\.[0-9]+\.[0-9]+";"sed -r 's/Version\ ([0-9](\.[0-9]+)+?)/whois:\1/'"; -wifidog;;GPL-2.0-or-later;"^This\ is\ WiFiDog\ version\ [0-9]+(\.[0-9]+)+?";"sed -r 's/This\ is\ WiFiDog\ version\ ([0-9]+(\.[0-9]+)+?)/wifidog:\1/'"; -wimaxc;;unknown;"Beceem\ CSCM\ Command\ Line\ Client\ [0-9](\.[0-9]+)+?";"sed -r 's/Beceem\ CSCM\ Command\ Line\ Client\ ([0-9](\.[0-9]+)+?).*$/beceem:\1/'"; -wimaxd;;unknown;"Beceem\ CM\ Server\ [0-9](\.[0-9]+)+?";"sed -r 's/Beceem\ CM\ Server\ ([0-9](\.[0-9]+)+?).*$/beceem:\1/'"; -wireless-tools;;GPL-2.0-only;"Wireless-Tools\ version\ [0-9]+";"sed -r 's/Wireless-Tools\ version\ ([0-9]+).*$/wireless_tools:\1/'"; -wlxmlpatch;;unknown;"wlxmlpatch\ v[0-9](\.[0-9]+)+?$";"sed -r 's/wlxmlpatch\ v([0-9](\.[0-9]+)+?)$/wlxmlpatch:\1/'"; -wol;;unknown;"wol\ [0-9](\.[0-9]+)+?";"sed -r 's/wol\ ([0-9](\.[0-9]+)+?)/wol:\1/'"; -libwolfssl.so;strict;GPL-3.0-only;"^[0-9]\.[0-9](\.[0-9])+?$";"sed -r 's/([0-9](\.[0-9]+)+?)$/wolfssl:\1/'"; -wpa_cli;;BSD-3-Clause;"wpa_cli\ v[0-9](\.[0-9]+)+?$";"sed -r 's/wpa_cli\ v([0-9](\.[0-9]+)+?).*/wpa_cli:\1/'"; -wpa_cli;;BSD-3-Clause;"wpa_cli\ v[0-9](\.[0-9]+)+?\.x$";"sed -r 's/wpa_cli\ v([0-9](\.[0-9]+)+?).*/wpa_cli:\1/'"; -wpa_supplicant;;BSD-3-Clause;"^wpa_supplicant\ v[0-9](\.[0-9]+)+?(-devel)?$";"sed -r 's/wpa_supplicant\ v([0-9](\.[0-9]+)+?).*/wpa_supplicant:\1/'"; -wpa_supplicant;;BSD-3-Clause;"^wpa_supplicant\ v[0-9](\.[0-9]+)+?\.x$";"sed -r 's/wpa_supplicant\ v([0-9](\.[0-9]+)+?).*/wpa_supplicant:\1/'"; -wps_enr;strict;unknown;"^Version:\ [0-9](\.[0-9]+)+?$";"sed -r 's/Version:\ ([0-9](\.[0-9]+)+?)$/wps_enr:\1/'"; -xargs;multi_grep;GPL-3.0-only;'"^xargs$"&&"^environment\ is\ too\ large\ for\ exec$"&&"[0-9](\.[0-9]+)+?"';"sed -r 's/([0-9](\.[0-9]+)+?)/xargs:\1/'"; -xdb_70_monitor;;unknown;"^\*\*\*\*\ \ XDB\ 70\ Monitor\ V\ [0-9]+\.[0-9]+\ \(.*\),\ Copyright\ \(C\)\ SIEMENS\ AG\ [0-9]+\.\ All\ rights\ reserved\.\ \*\*\*\*$";"sed -r 's/\*\*\*\*\ \ XDB\ 70\ Monitor\ V\ ([0-9](\.[0-9]+)+?)$/siemens:xdb-monitor:\1/'"; -xfsprogs;;GPL-2.0-only;"^mkfs\.xfs\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/mkfs\.xfs\ version\ ([0-9](\.[0-9]+)+?)$/xfsprogs:\1/'"; -xfsprogs;;GPL-2.0-only;"^xfs_db\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/xfs_db\ version\ ([0-9](\.[0-9]+)+?)$/xfsprogs:\1/'"; -xfsprogs;;GPL-2.0-only;"^xfs_growfs\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/xfs_growfs\ version\ ([0-9](\.[0-9]+)+?)$/xfsprogs:\1/'"; -xfsprogs;;GPL-2.0-only;"^xfs_repair\ version\ [0-9](\.[0-9]+)+?$";"sed -r 's/xfs_repair\ version\ ([0-9](\.[0-9]+)+?)$/xfsprogs:\1/'"; -xl2tpd;;unknown;"xl2tpd\ server\ version\ xl2tpd-[0-9](\.[0-9]+)+?$";"sed -r 's/xl2tpd\ server\ version\ xl2tpd-([0-9](\.[0-9]+)+?)$/xl2tpd:\1/'"; -xl2tpd;;unknown;"xl2tpd\ version\ xl2tpd-[0-9](\.[0-9]+)+?\ started";"sed -r 's/xl2tpd\ version\ xl2tpd-([0-9](\.[0-9]+)+?)\ started.*$/xl2tpd:\1/'"; -xl2tpd;;unknown;"xl2tpd\ version:\ \ xl2tpd-[0-9](\.[0-9]+)+?$";"sed -r 's/xl2tpd\ version:\ \ xl2tpd-([0-9](\.[0-9]+)+?)$/xl2tpd:\1/'"; -xlink;;unknown;"XLINK\ v[0-9]+(\.[0-9]+)+?\ ";"sed -r 's/XLINK\ v([0-9]+(\.[0-9]+)+?)\ .*/xlink:\1/'"; -xmldb;;unknown;"xmldb\ version\ [0-9]+";"sed -r 's/xmldb\ version\ ([0-9]+)$/xmldb:\1/'"; -xsupplicant;;unknown;"^Xsupplicant\ [0-9](\.[0-9]+)+?$";"sed -r 's/Xsupplicant\ ([0-9]+(\.[0-9]+)+?)$/xsupplicant:\1/'"; -xxd;;unknown;"xxd\ V[0-9]\.[0-9]+.*by\ Juergen\ Weigert$";"sed -r 's/xxd\ V([0-9]+(\.[0-9]+)+?).*/xxd:\1/'"; -xz-utils;;unknown;"\(XZ\ Utils\)\ [0-9](\.[0-9]+)+?$";"sed -r 's/\(XZ\ Utils\)\ ([0-9](\.[0-9]+)+?)$/xz-utils:\1/'"; -yat2m;;unknown;"yat2m\ [0-9]\.[0-9]+";"sed -r 's/yat2m\ ([0-9](\.[0-9]+)+?)$/yat2m:\1/'"; -ypdomainname;;unknown;"hostname\ [0-9]\.[0-9]+";"sed -r 's/hostname\ ([0-9](\.[0-9]+)+?)/hostname:\1/'"; -zebra;;GPL-2.0-only;"[Zz]ebra\ version\ [0-9](\.[0-9]+)+?([a-z])?";"sed -r 's/[Zz]ebra\ version\ ([0-9](\.[0-9]+)+?([a-z])?)/gnu:zebra:\1/'"; -zend-engine;;unknown;"Zend\ Engine\ v[0-9](\.[0-9]+)+?,\ Copyright.*Technologies$";"sed -r 's/Zend\ Engine\ v([0-9](\.[0-9]+)+?).*/zend:engine:\1/'"; -#zic;;unknown;"zic\.c.*[0-9](\.[0-9]+)+?$";"sed -r 's/.*zic\.c.*([0-9](\.[0-9]+)+?)(([a-z])?)$/zic:\1:\2/'"; -zic;;unknown;"zic\.c.*[0-9](\.[0-9]+)+$";"sed -r 's/.*zic\.c.*([0-9]\.[0-9]+?)$/zic:\1/'"; -zipcloack;;unknown;"ZipCloak\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/ZipCloak\ ([0-9](\.[0-9]+)+?)\ /info-zip:zipcloak:\1/'"; -zipnote;;unknown;"ZipNote\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/ZipNote\ ([0-9](\.[0-9]+)+?)\ /info-zip:zipnote:\1/'"; -zipsplit;;bsd-style;"ZipSplit\ [0-9](\.[0-9]+)+?";"sed -r 's/ZipSplit\ ([0-9](\.[0-9]+)+?)/info-zip:zip:\1/'"; -zlib;;Zlib;"deflate\ [0-9](\.[0-9]+)+?\ Copyright.*Mark\ Adler";"sed -r 's/deflate\ ([0-9](\.[0-9]+)+?)\ .*/zlib:\1/'"; -zlib;;Zlib;"inflate\ [0-9](\.[0-9]+)+?\ Copyright.*Mark Adler";"sed -r 's/inflate\ ([0-9](\.[0-9]+)+?)\ .*/zlib:\1/'"; -zlib;;Zlib;"^\ unzip\ [0-9]\.([0-9]+)\ Copyright 1998-20[0-9][0-9] Gilles Vollant.*$";"sed -r 's/\ unzip\ ([0-9])\.([0-9])([0-9]*)\ Copyright 1998-20[0-9][0-9] Gilles Vollant.*/zlib:\1.\2.\3/'"; -log4j-core*.jar;zgrep;Apache-2.0;"Log4jReleaseVersion";"sed -r 's/Log4jReleaseVersion:\ ([0-9](\.[0-9]+)+?)/log4j:\1/'"; \ No newline at end of file diff --git a/surfactant/plugin/manager.py b/surfactant/plugin/manager.py index 6d83b223..7ce42f66 100644 --- a/surfactant/plugin/manager.py +++ b/surfactant/plugin/manager.py @@ -25,6 +25,7 @@ def _register_plugins(pm: pluggy.PluginManager) -> None: mach_o_file, ole_file, pe_file, + native_lib_file, ) from surfactant.input_readers import cytrics_reader from surfactant.output import ( @@ -62,6 +63,7 @@ def _register_plugins(pm: pluggy.PluginManager) -> None: cyclonedx_writer, spdx_writer, cytrics_reader, + native_lib_file, ) for plugin in internal_plugins: pm.register(plugin) From 2db9dd311aea1ecc5ea37283eaa8a733831b49d0 Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Mon, 29 Jul 2024 00:15:58 -0700 Subject: [PATCH 05/42] adding script to parse EMBA database and save as json --- scripts/native_libraries/get_emba_db.py | 126 ++++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 scripts/native_libraries/get_emba_db.py diff --git a/scripts/native_libraries/get_emba_db.py b/scripts/native_libraries/get_emba_db.py new file mode 100644 index 00000000..62bbc179 --- /dev/null +++ b/scripts/native_libraries/get_emba_db.py @@ -0,0 +1,126 @@ +# import json +# import requests + + +# def load_database() -> dict: +# url = "https://raw.githubusercontent.com/e-m-b-a/emba/master/config/bin_version_strings.cfg" +# response = requests.get(url) +# if response.status_code == 200: +# print("success") +# return json.loads(response.text) +# return None + + + + +# import requests +# import json + +# def load_database() -> dict: +# url = "https://raw.githubusercontent.com/e-m-b-a/emba/master/config/bin_version_strings.cfg" +# response = requests.get(url) +# print(f"HTTP Status Code: {response.status_code}") # Print status code + +# if response.status_code == 200: +# print("success") +# try: +# return json.loads(response.text) +# except json.JSONDecodeError as e: +# print(f"JSON decoding failed: {e}") +# return None +# else: +# print(f"Failed to fetch data. Status code: {response.status_code}") +# return None + +# database = load_database() +# if database: +# print("Loaded data:", database) +# else: +# print("No data loaded.") + + + + +# import requests + +# def load_database() -> list: +# url = "https://raw.githubusercontent.com/e-m-b-a/emba/master/config/bin_version_strings.cfg" +# response = requests.get(url) +# print(f"HTTP Status Code: {response.status_code}") # Print status code + +# if response.status_code == 200: +# print("success") +# data = response.text +# database = [] +# for line in data.splitlines(): +# line = line.strip() +# # Skip empty lines and comments +# if not line or line.startswith("#"): +# continue +# # Split the line into fields +# fields = line.split(';') +# if len(fields) == 5: # Adjusted to 5 fields based on your example +# identifier, mode, license_type, version_identifier_regex, version_transformation_regex = fields +# database.append({ +# 'identifier': identifier, +# 'mode': mode, +# 'license_type': license_type, +# 'version_identifier_regex': version_identifier_regex, +# 'version_transformation_regex': version_transformation_regex, +# }) +# return database +# else: +# print(f"Failed to fetch data. Status code: {response.status_code}") +# return None + +# database = load_database() +# if database: +# print("Loaded entries:", len(database)) +# for entry in database: +# print("this is entry: ", entry) +# else: +# print("No data loaded.") + + + +import json + +import requests + + +def load_database() -> dict: + url = "https://raw.githubusercontent.com/RetireJS/retire.js/master/repository/jsrepository-master.json" + response = requests.get(url) + if response.status_code == 200: + return json.loads(response.text) + return None + + +def strip_irrelevant_data(emba_db: dict) -> dict: + clean_db = {} + reg_temp = "\u00a7\u00a7version\u00a7\u00a7" + version_regex = r"\d+(?:\.\d+)*" + for library, lib_entry in emba_db.items(): + if "extractors" in lib_entry: + clean_db[library] = {} + patterns = lib_entry["extractors"] + possible_entries = [ + "filename", + "filecontent", + "hashes", + ] + for entry in possible_entries: + if entry in patterns: + entry_list = [] + for reg in patterns[entry]: + entry_list.append(reg.replace(reg_temp, version_regex)) + clean_db[library][entry] = entry_list + return clean_db + + +newdb = load_database() + +if newdb is not None: + cleaned = strip_irrelevant_data(newdb) + with open("native_lib_patterns.json", "w") as f: + json.dump(cleaned, f, indent=4) \ No newline at end of file From e8da55001665460e9e947bb6071ea99ca235d6bd Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Mon, 29 Jul 2024 00:16:19 -0700 Subject: [PATCH 06/42] adding script to parse EMBA database and save as json --- surfactant/infoextractors/native_lib_file.py | 1 - 1 file changed, 1 deletion(-) diff --git a/surfactant/infoextractors/native_lib_file.py b/surfactant/infoextractors/native_lib_file.py index 1794d190..6f766339 100644 --- a/surfactant/infoextractors/native_lib_file.py +++ b/surfactant/infoextractors/native_lib_file.py @@ -12,7 +12,6 @@ def supports_file(filetype) -> bool: return filetype in ("PE", "ELF", "MACHO32", "MACHO64") - #return filetype in {ExeType.PE, ExeType.ELF, ExeType.MACHO32} @surfactant.plugin.hookimpl From 1c6a771ba23ad6d722ed02e3eb19eef5e9ca01e1 Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Mon, 29 Jul 2024 19:42:13 -0700 Subject: [PATCH 07/42] change format of native lib patterns database --- scripts/native_libraries/get_emba_db.py | 182 ++++++++---------------- 1 file changed, 60 insertions(+), 122 deletions(-) diff --git a/scripts/native_libraries/get_emba_db.py b/scripts/native_libraries/get_emba_db.py index 62bbc179..66bf175c 100644 --- a/scripts/native_libraries/get_emba_db.py +++ b/scripts/native_libraries/get_emba_db.py @@ -1,126 +1,64 @@ -# import json -# import requests - - -# def load_database() -> dict: -# url = "https://raw.githubusercontent.com/e-m-b-a/emba/master/config/bin_version_strings.cfg" -# response = requests.get(url) -# if response.status_code == 200: -# print("success") -# return json.loads(response.text) -# return None - - - - -# import requests -# import json - -# def load_database() -> dict: -# url = "https://raw.githubusercontent.com/e-m-b-a/emba/master/config/bin_version_strings.cfg" -# response = requests.get(url) -# print(f"HTTP Status Code: {response.status_code}") # Print status code - -# if response.status_code == 200: -# print("success") -# try: -# return json.loads(response.text) -# except json.JSONDecodeError as e: -# print(f"JSON decoding failed: {e}") -# return None -# else: -# print(f"Failed to fetch data. Status code: {response.status_code}") -# return None - -# database = load_database() -# if database: -# print("Loaded data:", database) -# else: -# print("No data loaded.") - - - - -# import requests - -# def load_database() -> list: -# url = "https://raw.githubusercontent.com/e-m-b-a/emba/master/config/bin_version_strings.cfg" -# response = requests.get(url) -# print(f"HTTP Status Code: {response.status_code}") # Print status code - -# if response.status_code == 200: -# print("success") -# data = response.text -# database = [] -# for line in data.splitlines(): -# line = line.strip() -# # Skip empty lines and comments -# if not line or line.startswith("#"): -# continue -# # Split the line into fields -# fields = line.split(';') -# if len(fields) == 5: # Adjusted to 5 fields based on your example -# identifier, mode, license_type, version_identifier_regex, version_transformation_regex = fields -# database.append({ -# 'identifier': identifier, -# 'mode': mode, -# 'license_type': license_type, -# 'version_identifier_regex': version_identifier_regex, -# 'version_transformation_regex': version_transformation_regex, -# }) -# return database -# else: -# print(f"Failed to fetch data. Status code: {response.status_code}") -# return None - -# database = load_database() -# if database: -# print("Loaded entries:", len(database)) -# for entry in database: -# print("this is entry: ", entry) -# else: -# print("No data loaded.") - - - import json - import requests +import os - -def load_database() -> dict: - url = "https://raw.githubusercontent.com/RetireJS/retire.js/master/repository/jsrepository-master.json" +def load_database(url): response = requests.get(url) - if response.status_code == 200: - return json.loads(response.text) - return None - - -def strip_irrelevant_data(emba_db: dict) -> dict: - clean_db = {} - reg_temp = "\u00a7\u00a7version\u00a7\u00a7" - version_regex = r"\d+(?:\.\d+)*" - for library, lib_entry in emba_db.items(): - if "extractors" in lib_entry: - clean_db[library] = {} - patterns = lib_entry["extractors"] - possible_entries = [ - "filename", - "filecontent", - "hashes", - ] - for entry in possible_entries: - if entry in patterns: - entry_list = [] - for reg in patterns[entry]: - entry_list.append(reg.replace(reg_temp, version_regex)) - clean_db[library][entry] = entry_list - return clean_db - - -newdb = load_database() - -if newdb is not None: - cleaned = strip_irrelevant_data(newdb) - with open("native_lib_patterns.json", "w") as f: - json.dump(cleaned, f, indent=4) \ No newline at end of file + response.raise_for_status() + return response.text + +def parse_cfg_file(content): + database = {} + lines = content.splitlines() + + # Skip the first line if it's a header + if lines and lines[0].startswith('#'): + lines = lines[1:] + + for line in lines: + line = line.strip() + + # Split by semicolons + fields = line.split(';') + + # Ensure the line has the correct number of fields + if len(fields) >= 5: + # Original name + original_name = fields[0] + + # Custom name pattern combined with the original name + name = f"{original_name}-\\b(lib|lib[A-Za-z0-9_\\-]+)\\.(dll|so|dylib)\\b(?:\\s*\\d+\\.\\d+(\\.\\d+)?)?" + + ### usually package names will have this pattern + ### ^libexample-(\d+\.\d+\.\d+)$ OR ^libexample-(\d+\.\d+\.\d+)\.(dll|so|dylib)$ + # May look like this: + + # DLL or SO Files: libexample-1.0.0.dll, mylibrary-2.3.4.so + # Package Archives: example-library-1.2.3.tar.gz, my-toolkit-v1.0.0.zip + + #filecontent = fields[2] if len(fields) > 2 else '' + filecontent = fields[3].strip('"') if len(fields) > 3 else '' + transformation_rule = fields[4].strip('"') if len(fields) > 4 else '' + + # Create a dictionary for this entry and add it to the database + database[original_name] = { + 'filename': name, + #'filecontent': filecontent, + 'filecontent': filecontent, + 'transformation_rule': transformation_rule + } + + return database + +url = "https://raw.githubusercontent.com/e-m-b-a/emba/master/config/bin_version_strings.cfg" +json_file_path = "surfactant/infoextractors/native_lib_patterns.json" + +# Load the content from the URL +file_content = load_database(url) + +# Parse the content +parsed_data = parse_cfg_file(file_content) + +# Write the parsed data to a JSON file +with open(json_file_path, 'w') as json_file: + json.dump(parsed_data, json_file, indent=4) From c546a125a6b1e9573791f3827833338c34633597 Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Tue, 30 Jul 2024 18:48:50 -0700 Subject: [PATCH 08/42] updating parsing of emba db --- scripts/native_libraries/get_emba_db.py | 86 ++++++++++++++++--------- 1 file changed, 54 insertions(+), 32 deletions(-) diff --git a/scripts/native_libraries/get_emba_db.py b/scripts/native_libraries/get_emba_db.py index 66bf175c..e3791d27 100644 --- a/scripts/native_libraries/get_emba_db.py +++ b/scripts/native_libraries/get_emba_db.py @@ -10,44 +10,66 @@ def load_database(url): def parse_cfg_file(content): database = {} lines = content.splitlines() - - # Skip the first line if it's a header - if lines and lines[0].startswith('#'): - lines = lines[1:] + filtered_lines = [] + + print("this is lines[1]: ", lines[1]) + print("this is lines[10]: ", lines[10]) for line in lines: + if not (line.startswith('#') or line.startswith('identifier')): + filtered_lines.append(line) + + for line in filtered_lines: line = line.strip() # Split by semicolons fields = line.split(';') + #print("this is fields: ", fields) + + for line in fields: + if (len(line) == 6 or len(line) == 5): + break; + else: + print("not 6: ", len(line)) + + # Name of library + lib_name = fields[0] - # Ensure the line has the correct number of fields - if len(fields) >= 5: - # Original name - original_name = fields[0] - - # Custom name pattern combined with the original name - name = f"{original_name}-\\b(lib|lib[A-Za-z0-9_\\-]+)\\.(dll|so|dylib)\\b(?:\\s*\\d+\\.\\d+(\\.\\d+)?)?" - - ### usually package names will have this pattern - ### ^libexample-(\d+\.\d+\.\d+)$ OR ^libexample-(\d+\.\d+\.\d+)\.(dll|so|dylib)$ - # May look like this: + # Custom name pattern combined with the original name + name = f"{lib_name}-\\b(lib|lib[A-Za-z0-9_\\-]+)\\.(dll|so|dylib)\\b(?:\\s*\\d+\\.\\d+(\\.\\d+)?)?" + + ### usually package names will have this pattern + ### ^libexample-(\d+\.\d+\.\d+)$ OR ^libexample-(\d+\.\d+\.\d+)\.(dll|so|dylib)$ + # May look like this: - # DLL or SO Files: libexample-1.0.0.dll, mylibrary-2.3.4.so - # Package Archives: example-library-1.2.3.tar.gz, my-toolkit-v1.0.0.zip + # DLL or SO Files: libexample-1.0.0.dll, mylibrary-2.3.4.so + # Package Archives: example-library-1.2.3.tar.gz, my-toolkit-v1.0.0.zip - #filecontent = fields[2] if len(fields) > 2 else '' - filecontent = fields[3].strip('"') if len(fields) > 3 else '' - transformation_rule = fields[4].strip('"') if len(fields) > 4 else '' - - # Create a dictionary for this entry and add it to the database - database[original_name] = { - 'filename': name, - #'filecontent': filecontent, - 'filecontent': filecontent, - 'transformation_rule': transformation_rule - } - + #filecontent = fields[2] if len(fields) > 2 else '' + filecontent = fields[3].strip('"') if len(fields) > 3 else '' + transformation_rule = fields[4].strip('"') if len(fields) > 4 else '' + + # Create a dictionary for this entry and add it to the database + database[lib_name] = { + 'filename': name, + 'filecontent': filecontent, + 'transformation_rule': transformation_rule + } + print("this is fil_lines[0]: ", filtered_lines[0]) + print("this is fil_lines[1]: ", filtered_lines[1]) + print("this is fil_lines[2]: ", filtered_lines[2]) + print("this is fil_lines[10]: ", filtered_lines[10]) + fields2 = filtered_lines[1].split(';') + fields3 = len(filtered_lines[1].split(';')) + print("fields2: ", fields2) + print("len of fields3: ", fields3) + + print("length: ", len(fields[0])) + print("length: ", len(fields[1])) + print("length: ", len(fields)) + print("this is fields[0]", fields[0]) + print("this is fields[1]", fields[1]) + print("this is fields: ", fields) return database url = "https://raw.githubusercontent.com/e-m-b-a/emba/master/config/bin_version_strings.cfg" @@ -59,6 +81,6 @@ def parse_cfg_file(content): # Parse the content parsed_data = parse_cfg_file(file_content) -# Write the parsed data to a JSON file -with open(json_file_path, 'w') as json_file: - json.dump(parsed_data, json_file, indent=4) +# # Write the parsed data to a JSON file +# with open(json_file_path, 'w') as json_file: +# json.dump(parsed_data, json_file, indent=4) From c384649296eb47b4fcc512b44aeeb86906b477d2 Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Tue, 6 Aug 2024 00:39:07 -0700 Subject: [PATCH 09/42] matching native libs --- scripts/js_libraries/match_javascript.py | 5 +- scripts/native_libraries/get_emba_db.py | 60 +++++++++----------- scripts/native_libraries/match_native_lib.py | 31 ++++++++++ 3 files changed, 61 insertions(+), 35 deletions(-) create mode 100644 scripts/native_libraries/match_native_lib.py diff --git a/scripts/js_libraries/match_javascript.py b/scripts/js_libraries/match_javascript.py index 03128fa6..8a512ca4 100644 --- a/scripts/js_libraries/match_javascript.py +++ b/scripts/js_libraries/match_javascript.py @@ -33,7 +33,10 @@ def find_js_match(expressions: dict, filename: str) -> str: get_test_file() -with open("js_library_patterns.json", "r") as f: +# with open("js_library_patterns.json", "r") as f: +# patterns = json.load(f) + +with open("/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/js_library_patterns.json", "r") as f: patterns = json.load(f) library_name = find_js_match(patterns, "testFile.js") diff --git a/scripts/native_libraries/get_emba_db.py b/scripts/native_libraries/get_emba_db.py index e3791d27..9c4c5229 100644 --- a/scripts/native_libraries/get_emba_db.py +++ b/scripts/native_libraries/get_emba_db.py @@ -11,9 +11,6 @@ def parse_cfg_file(content): database = {} lines = content.splitlines() filtered_lines = [] - - print("this is lines[1]: ", lines[1]) - print("this is lines[10]: ", lines[10]) for line in lines: if not (line.startswith('#') or line.startswith('identifier')): @@ -24,19 +21,12 @@ def parse_cfg_file(content): # Split by semicolons fields = line.split(';') - #print("this is fields: ", fields) - - for line in fields: - if (len(line) == 6 or len(line) == 5): - break; - else: - print("not 6: ", len(line)) # Name of library lib_name = fields[0] # Custom name pattern combined with the original name - name = f"{lib_name}-\\b(lib|lib[A-Za-z0-9_\\-]+)\\.(dll|so|dylib)\\b(?:\\s*\\d+\\.\\d+(\\.\\d+)?)?" + name = [f"{lib_name}-\\b(lib|lib[A-Za-z0-9_\\-]+)\\.(dll|so|dylib)\\b(?:\\s*\\d+\\.\\d+(\\.\\d+)?)?"] ### usually package names will have this pattern ### ^libexample-(\d+\.\d+\.\d+)$ OR ^libexample-(\d+\.\d+\.\d+)\.(dll|so|dylib)$ @@ -47,31 +37,21 @@ def parse_cfg_file(content): #filecontent = fields[2] if len(fields) > 2 else '' filecontent = fields[3].strip('"') if len(fields) > 3 else '' - transformation_rule = fields[4].strip('"') if len(fields) > 4 else '' + #transformation_rule = fields[4].strip('"') if len(fields) > 4 else '' # Create a dictionary for this entry and add it to the database - database[lib_name] = { - 'filename': name, - 'filecontent': filecontent, - 'transformation_rule': transformation_rule - } - print("this is fil_lines[0]: ", filtered_lines[0]) - print("this is fil_lines[1]: ", filtered_lines[1]) - print("this is fil_lines[2]: ", filtered_lines[2]) - print("this is fil_lines[10]: ", filtered_lines[10]) - fields2 = filtered_lines[1].split(';') - fields3 = len(filtered_lines[1].split(';')) - print("fields2: ", fields2) - print("len of fields3: ", fields3) + if lib_name not in database: + database[lib_name] = { + 'filename': name, + 'filecontent': [filecontent], + #'transformation_rule': transformation_rule + } + else: + database[lib_name]['filecontent'].append(filecontent) - print("length: ", len(fields[0])) - print("length: ", len(fields[1])) - print("length: ", len(fields)) - print("this is fields[0]", fields[0]) - print("this is fields[1]", fields[1]) - print("this is fields: ", fields) return database + url = "https://raw.githubusercontent.com/e-m-b-a/emba/master/config/bin_version_strings.cfg" json_file_path = "surfactant/infoextractors/native_lib_patterns.json" @@ -81,6 +61,18 @@ def parse_cfg_file(content): # Parse the content parsed_data = parse_cfg_file(file_content) -# # Write the parsed data to a JSON file -# with open(json_file_path, 'w') as json_file: -# json.dump(parsed_data, json_file, indent=4) +for key in parsed_data: + filecontent_list = parsed_data[key]["filecontent"] + + # Remove leading ^ from each string in the filecontent list + for i in range(len(filecontent_list)): + if filecontent_list[i].startswith('^'): + filecontent_list[i] = filecontent_list[i][1:] + + if filecontent_list[i].endswith('$'): + filecontent_list[i] = filecontent_list[i][:-1] + + +# Write the parsed data to a JSON file +with open(json_file_path, 'w') as json_file: + json.dump(parsed_data, json_file, indent=4) diff --git a/scripts/native_libraries/match_native_lib.py b/scripts/native_libraries/match_native_lib.py new file mode 100644 index 00000000..bb5c3333 --- /dev/null +++ b/scripts/native_libraries/match_native_lib.py @@ -0,0 +1,31 @@ +import json +import re + + +def find_js_match(expressions: dict, filename: str) -> str: + for name, library in expressions.items(): + if "filename" in library: + for pattern in library["filename"]: + if re.search(pattern, filename): + return name + try: + with open(filename, "r") as jsfile: + contents = jsfile.read() + for name, library in expressions.items(): + if "filecontent" in library: + for pattern in library["filecontent"]: + if re.search(pattern, contents): + return name + except FileNotFoundError: + print(f"File not found: {filename}") + return None + + + +with open("/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json", "r") as f: + patterns = json.load(f) + +#print("this is patterns: ", patterns) + +library_name = find_js_match(patterns, "7z_win32.exe") +print(library_name) From 0957c219e7993598736f7bd8f17268bbc6b61d64 Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Mon, 12 Aug 2024 00:12:49 -0700 Subject: [PATCH 10/42] testing with more native libs --- scripts/native_libraries/get_emba_db.py | 9 --------- scripts/native_libraries/match_native_lib.py | 7 ++++--- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/scripts/native_libraries/get_emba_db.py b/scripts/native_libraries/get_emba_db.py index 9c4c5229..14b66fa0 100644 --- a/scripts/native_libraries/get_emba_db.py +++ b/scripts/native_libraries/get_emba_db.py @@ -27,17 +27,8 @@ def parse_cfg_file(content): # Custom name pattern combined with the original name name = [f"{lib_name}-\\b(lib|lib[A-Za-z0-9_\\-]+)\\.(dll|so|dylib)\\b(?:\\s*\\d+\\.\\d+(\\.\\d+)?)?"] - - ### usually package names will have this pattern - ### ^libexample-(\d+\.\d+\.\d+)$ OR ^libexample-(\d+\.\d+\.\d+)\.(dll|so|dylib)$ - # May look like this: - - # DLL or SO Files: libexample-1.0.0.dll, mylibrary-2.3.4.so - # Package Archives: example-library-1.2.3.tar.gz, my-toolkit-v1.0.0.zip - #filecontent = fields[2] if len(fields) > 2 else '' filecontent = fields[3].strip('"') if len(fields) > 3 else '' - #transformation_rule = fields[4].strip('"') if len(fields) > 4 else '' # Create a dictionary for this entry and add it to the database if lib_name not in database: diff --git a/scripts/native_libraries/match_native_lib.py b/scripts/native_libraries/match_native_lib.py index bb5c3333..b743aef4 100644 --- a/scripts/native_libraries/match_native_lib.py +++ b/scripts/native_libraries/match_native_lib.py @@ -2,14 +2,14 @@ import re -def find_js_match(expressions: dict, filename: str) -> str: +def find_native_match(expressions: dict, filename: str) -> str: for name, library in expressions.items(): if "filename" in library: for pattern in library["filename"]: if re.search(pattern, filename): return name try: - with open(filename, "r") as jsfile: + with open(filename, "r", encoding="ISO-8859-1") as jsfile: contents = jsfile.read() for name, library in expressions.items(): if "filecontent" in library: @@ -25,7 +25,8 @@ def find_js_match(expressions: dict, filename: str) -> str: with open("/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json", "r") as f: patterns = json.load(f) + #print("this is patterns: ", patterns) -library_name = find_js_match(patterns, "7z_win32.exe") +library_name = find_native_match(patterns, "binutils-2.13.92.tar.bz2") print(library_name) From 8616fccba5c0f9748dacb431c092e98417df85bd Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Mon, 12 Aug 2024 12:48:35 -0700 Subject: [PATCH 11/42] testing with more libraries --- scripts/native_libraries/get_emba_db.py | 4 ++-- scripts/native_libraries/match_native_lib.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/native_libraries/get_emba_db.py b/scripts/native_libraries/get_emba_db.py index 14b66fa0..1860b049 100644 --- a/scripts/native_libraries/get_emba_db.py +++ b/scripts/native_libraries/get_emba_db.py @@ -26,7 +26,8 @@ def parse_cfg_file(content): lib_name = fields[0] # Custom name pattern combined with the original name - name = [f"{lib_name}-\\b(lib|lib[A-Za-z0-9_\\-]+)\\.(dll|so|dylib)\\b(?:\\s*\\d+\\.\\d+(\\.\\d+)?)?"] + #name = [f"{lib_name}-\\b(lib|lib[A-Za-z0-9_\\-]+)\\.(dll|so|dylib)\\b(?:\\s*\\d+\\.\\d+(\\.\\d+)?)?"] + name = [] filecontent = fields[3].strip('"') if len(fields) > 3 else '' @@ -35,7 +36,6 @@ def parse_cfg_file(content): database[lib_name] = { 'filename': name, 'filecontent': [filecontent], - #'transformation_rule': transformation_rule } else: database[lib_name]['filecontent'].append(filecontent) diff --git a/scripts/native_libraries/match_native_lib.py b/scripts/native_libraries/match_native_lib.py index b743aef4..240eee4b 100644 --- a/scripts/native_libraries/match_native_lib.py +++ b/scripts/native_libraries/match_native_lib.py @@ -28,5 +28,5 @@ def find_native_match(expressions: dict, filename: str) -> str: #print("this is patterns: ", patterns) -library_name = find_native_match(patterns, "binutils-2.13.92.tar.bz2") +library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/busybox-1_36_1.tar.bz2") print(library_name) From 7635f8e937d8aa225cfa59d73901719c10287ed2 Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Mon, 12 Aug 2024 16:59:55 -0700 Subject: [PATCH 12/42] more general updates --- scripts/js_libraries/match_javascript.py | 7 ++----- scripts/native_libraries/get_emba_db.py | 7 ++++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/scripts/js_libraries/match_javascript.py b/scripts/js_libraries/match_javascript.py index 8a512ca4..d8aacda5 100644 --- a/scripts/js_libraries/match_javascript.py +++ b/scripts/js_libraries/match_javascript.py @@ -33,11 +33,8 @@ def find_js_match(expressions: dict, filename: str) -> str: get_test_file() -# with open("js_library_patterns.json", "r") as f: -# patterns = json.load(f) - -with open("/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/js_library_patterns.json", "r") as f: +with open("js_library_patterns.json", "r") as f: patterns = json.load(f) library_name = find_js_match(patterns, "testFile.js") -print(library_name) +print(library_name) \ No newline at end of file diff --git a/scripts/native_libraries/get_emba_db.py b/scripts/native_libraries/get_emba_db.py index 1860b049..7c15d66f 100644 --- a/scripts/native_libraries/get_emba_db.py +++ b/scripts/native_libraries/get_emba_db.py @@ -27,14 +27,15 @@ def parse_cfg_file(content): # Custom name pattern combined with the original name #name = [f"{lib_name}-\\b(lib|lib[A-Za-z0-9_\\-]+)\\.(dll|so|dylib)\\b(?:\\s*\\d+\\.\\d+(\\.\\d+)?)?"] - name = [] + name_patterns = [] + # Remove double quotes, if any filecontent = fields[3].strip('"') if len(fields) > 3 else '' - # Create a dictionary for this entry and add it to the database + # Create a dictionary for this entry and add it to the database-> 'grape' instead of '"grape"' if lib_name not in database: database[lib_name] = { - 'filename': name, + 'filename': name_patterns, 'filecontent': [filecontent], } else: From ea9be51f4c3d7bc5d0acd66767977f54be57ccf8 Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Tue, 13 Aug 2024 00:16:19 -0700 Subject: [PATCH 13/42] matching native libs --- scripts/native_libraries/match_native_lib.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/native_libraries/match_native_lib.py b/scripts/native_libraries/match_native_lib.py index 240eee4b..848f7391 100644 --- a/scripts/native_libraries/match_native_lib.py +++ b/scripts/native_libraries/match_native_lib.py @@ -7,14 +7,16 @@ def find_native_match(expressions: dict, filename: str) -> str: if "filename" in library: for pattern in library["filename"]: if re.search(pattern, filename): + print("found") return name try: - with open(filename, "r", encoding="ISO-8859-1") as jsfile: - contents = jsfile.read() + with open(filename, "r", encoding="ISO-8859-1") as nativefile: + contents = nativefile.read() for name, library in expressions.items(): if "filecontent" in library: for pattern in library["filecontent"]: if re.search(pattern, contents): + print("found 2") return name except FileNotFoundError: print(f"File not found: {filename}") @@ -29,4 +31,4 @@ def find_native_match(expressions: dict, filename: str) -> str: #print("this is patterns: ", patterns) library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/busybox-1_36_1.tar.bz2") -print(library_name) +print(library_name) \ No newline at end of file From 459886d498a28040e157d5c9fd59a8b716d144a4 Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Tue, 13 Aug 2024 17:15:27 -0700 Subject: [PATCH 14/42] dealing with 'strict' mode --- scripts/native_libraries/get_emba_db.py | 33 +++++++++++++------- scripts/native_libraries/match_native_lib.py | 17 +++++----- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/scripts/native_libraries/get_emba_db.py b/scripts/native_libraries/get_emba_db.py index 7c15d66f..66fc599e 100644 --- a/scripts/native_libraries/get_emba_db.py +++ b/scripts/native_libraries/get_emba_db.py @@ -25,27 +25,36 @@ def parse_cfg_file(content): # Name of library lib_name = fields[0] - # Custom name pattern combined with the original name - #name = [f"{lib_name}-\\b(lib|lib[A-Za-z0-9_\\-]+)\\.(dll|so|dylib)\\b(?:\\s*\\d+\\.\\d+(\\.\\d+)?)?"] + # Empty filename because EMBA doesn't need filename patterns name_patterns = [] - # Remove double quotes, if any + # Remove double quotes, if any-> 'grape' instead of '"grape"' filecontent = fields[3].strip('"') if len(fields) > 3 else '' - # Create a dictionary for this entry and add it to the database-> 'grape' instead of '"grape"' - if lib_name not in database: - database[lib_name] = { - 'filename': name_patterns, - 'filecontent': [filecontent], - } - else: - database[lib_name]['filecontent'].append(filecontent) + # Create a dictionary for this entry and add it to the database + if fields[1] == '' or fields[1] == "strict": + if fields[1] == "strict": + if lib_name not in database: + database[lib_name] = { + 'filename': lib_name, + 'filecontent': [], + } + else: + database[lib_name]['filecontent'].append(filecontent) + else: + if lib_name not in database: + database[lib_name] = { + 'filename': name_patterns, + 'filecontent': [filecontent], + } + else: + database[lib_name]['filecontent'].append(filecontent) return database url = "https://raw.githubusercontent.com/e-m-b-a/emba/master/config/bin_version_strings.cfg" -json_file_path = "surfactant/infoextractors/native_lib_patterns.json" +json_file_path = "/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json" # Load the content from the URL file_content = load_database(url) diff --git a/scripts/native_libraries/match_native_lib.py b/scripts/native_libraries/match_native_lib.py index 848f7391..acdd5c6e 100644 --- a/scripts/native_libraries/match_native_lib.py +++ b/scripts/native_libraries/match_native_lib.py @@ -7,7 +7,7 @@ def find_native_match(expressions: dict, filename: str) -> str: if "filename" in library: for pattern in library["filename"]: if re.search(pattern, filename): - print("found") + print("found through filename") return name try: with open(filename, "r", encoding="ISO-8859-1") as nativefile: @@ -15,20 +15,19 @@ def find_native_match(expressions: dict, filename: str) -> str: for name, library in expressions.items(): if "filecontent" in library: for pattern in library["filecontent"]: - if re.search(pattern, contents): - print("found 2") - return name + try: + if re.search(pattern, contents): + print("found through filecontent") + return name + except: + breakpoint() except FileNotFoundError: print(f"File not found: {filename}") return None - with open("/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json", "r") as f: patterns = json.load(f) - -#print("this is patterns: ", patterns) - -library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/busybox-1_36_1.tar.bz2") +library_name = find_native_match(patterns, "binutils-2.13.92.tar.bz2") print(library_name) \ No newline at end of file From 65236c396726cf69a954f4c4076d641416d98655 Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Wed, 14 Aug 2024 14:05:37 -0700 Subject: [PATCH 15/42] making some updates to matching script --- scripts/native_libraries/get_emba_db.py | 17 ++++++++--------- scripts/native_libraries/match_native_lib.py | 19 ++++++++++++------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/scripts/native_libraries/get_emba_db.py b/scripts/native_libraries/get_emba_db.py index 66fc599e..6f5a829f 100644 --- a/scripts/native_libraries/get_emba_db.py +++ b/scripts/native_libraries/get_emba_db.py @@ -36,11 +36,11 @@ def parse_cfg_file(content): if fields[1] == "strict": if lib_name not in database: database[lib_name] = { - 'filename': lib_name, + 'filename': [lib_name], 'filecontent': [], } - else: - database[lib_name]['filecontent'].append(filecontent) + #else: + # database[lib_name]['filecontent'].append(filecontent) else: if lib_name not in database: database[lib_name] = { @@ -56,10 +56,8 @@ def parse_cfg_file(content): url = "https://raw.githubusercontent.com/e-m-b-a/emba/master/config/bin_version_strings.cfg" json_file_path = "/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json" -# Load the content from the URL file_content = load_database(url) -# Parse the content parsed_data = parse_cfg_file(file_content) for key in parsed_data: @@ -70,10 +68,11 @@ def parse_cfg_file(content): if filecontent_list[i].startswith('^'): filecontent_list[i] = filecontent_list[i][1:] - if filecontent_list[i].endswith('$'): - filecontent_list[i] = filecontent_list[i][:-1] - + if filecontent_list[i].endswith('\\$'): + pass + else: + if filecontent_list[i].endswith('$'): + filecontent_list[i] = filecontent_list[i][:-1] -# Write the parsed data to a JSON file with open(json_file_path, 'w') as json_file: json.dump(parsed_data, json_file, indent=4) diff --git a/scripts/native_libraries/match_native_lib.py b/scripts/native_libraries/match_native_lib.py index acdd5c6e..1e8d21e1 100644 --- a/scripts/native_libraries/match_native_lib.py +++ b/scripts/native_libraries/match_native_lib.py @@ -6,28 +6,33 @@ def find_native_match(expressions: dict, filename: str) -> str: for name, library in expressions.items(): if "filename" in library: for pattern in library["filename"]: - if re.search(pattern, filename): - print("found through filename") - return name + try: + if re.search(pattern, filename): + print("found through filename") + return name + except: + breakpoint() + try: with open(filename, "r", encoding="ISO-8859-1") as nativefile: contents = nativefile.read() + print("this is contents: ", contents) for name, library in expressions.items(): if "filecontent" in library: for pattern in library["filecontent"]: try: if re.search(pattern, contents): print("found through filecontent") + print("pattern") return name - except: - breakpoint() + except re.error as e: + print(f"Regex error with pattern '{pattern}': {e}") except FileNotFoundError: print(f"File not found: {filename}") return None - with open("/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json", "r") as f: patterns = json.load(f) -library_name = find_native_match(patterns, "binutils-2.13.92.tar.bz2") +library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/busybox-1_36_1.tar.bz2") print(library_name) \ No newline at end of file From f630d706761335650abaa837dd28815f235411af Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Thu, 15 Aug 2024 16:46:30 -0700 Subject: [PATCH 16/42] testing pattern matching with a sample file --- scripts/native_libraries/match_native_lib.py | 56 +++++++++++++++++--- scripts/native_libraries/test.exe | 3 ++ 2 files changed, 52 insertions(+), 7 deletions(-) create mode 100644 scripts/native_libraries/test.exe diff --git a/scripts/native_libraries/match_native_lib.py b/scripts/native_libraries/match_native_lib.py index 1e8d21e1..20281b2e 100644 --- a/scripts/native_libraries/match_native_lib.py +++ b/scripts/native_libraries/match_native_lib.py @@ -1,38 +1,80 @@ +# import json +# import re + + +# def find_native_match(expressions: dict, filename: str) -> str: +# for name, library in expressions.items(): +# if "filename" in library: +# for pattern in library["filename"]: +# try: +# if re.search(pattern, filename): +# print("found through filename") +# return name +# except: +# breakpoint() + +# try: +# with open(filename, "r", encoding="ISO-8859-1") as nativefile: +# contents = nativefile.read() +# for name, library in expressions.items(): +# if "filecontent" in library: +# for pattern in library["filecontent"]: +# try: +# if re.search(pattern, contents): +# print("found through filecontent") +# print("pattern") +# return name +# except re.error as e: +# print(f"Regex error with pattern '{pattern}': {e}") +# except FileNotFoundError: +# print(f"File not found: {filename}") +# print("this is last: ", pattern) +# return None + +# with open("/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json", "r") as f: +# patterns = json.load(f) + +# library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/busybox-1_36_1.tar.bz2") +# print(library_name) + + import json import re - def find_native_match(expressions: dict, filename: str) -> str: for name, library in expressions.items(): if "filename" in library: for pattern in library["filename"]: try: + print(f"Checking filename pattern: {repr(pattern)} against {filename}") if re.search(pattern, filename): print("found through filename") return name - except: - breakpoint() + except re.error as e: + print(f"Regex error with filename pattern '{pattern}': {e}") try: with open(filename, "r", encoding="ISO-8859-1") as nativefile: contents = nativefile.read() - print("this is contents: ", contents) + print(f"File contents read successfully. Length: {len(contents)} characters.") + for name, library in expressions.items(): if "filecontent" in library: for pattern in library["filecontent"]: try: + print(f"Checking filecontent pattern: {repr(pattern)}") if re.search(pattern, contents): print("found through filecontent") - print("pattern") return name except re.error as e: - print(f"Regex error with pattern '{pattern}': {e}") + print(f"Regex error with filecontent pattern '{pattern}': {e}") except FileNotFoundError: print(f"File not found: {filename}") + print("No matches found.") return None with open("/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json", "r") as f: patterns = json.load(f) -library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/busybox-1_36_1.tar.bz2") +library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/test.exe") print(library_name) \ No newline at end of file diff --git a/scripts/native_libraries/test.exe b/scripts/native_libraries/test.exe new file mode 100644 index 00000000..d11cfc83 --- /dev/null +++ b/scripts/native_libraries/test.exe @@ -0,0 +1,3 @@ +Linux-2.5.3 +lighttpd-1.0 +(GNU Binutils for Debian) 2.34 \ No newline at end of file From 2134c60082ff77f5f5ece2db281efedbea1ea0e2 Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Mon, 19 Aug 2024 21:02:58 -0700 Subject: [PATCH 17/42] incorporating tar file decompression --- scripts/native_libraries/match_native_lib.py | 39 +++++++++++++++----- scripts/native_libraries/test.exe | 3 +- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/scripts/native_libraries/match_native_lib.py b/scripts/native_libraries/match_native_lib.py index 20281b2e..e3e4b46a 100644 --- a/scripts/native_libraries/match_native_lib.py +++ b/scripts/native_libraries/match_native_lib.py @@ -40,13 +40,14 @@ import json import re +import tarfile +import os def find_native_match(expressions: dict, filename: str) -> str: for name, library in expressions.items(): if "filename" in library: for pattern in library["filename"]: try: - print(f"Checking filename pattern: {repr(pattern)} against {filename}") if re.search(pattern, filename): print("found through filename") return name @@ -54,20 +55,38 @@ def find_native_match(expressions: dict, filename: str) -> str: print(f"Regex error with filename pattern '{pattern}': {e}") try: - with open(filename, "r", encoding="ISO-8859-1") as nativefile: - contents = nativefile.read() - print(f"File contents read successfully. Length: {len(contents)} characters.") + # with open(filename, "r", encoding="ISO-8859-1") as nativefile: + # contents = nativefile.read() + with tarfile.open(filename, "r:bz2") as tar: + tar.extractall(path="/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files") + + # Add matches to list + match_list = [] for name, library in expressions.items(): if "filecontent" in library: for pattern in library["filecontent"]: try: - print(f"Checking filecontent pattern: {repr(pattern)}") - if re.search(pattern, contents): - print("found through filecontent") - return name + #change 'contents' to temp dir where decompressed files are + # loop through all files in temp file and search against patterns below + for root, dirs, files in os.walk("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files"): + for file_name in files: + file_path = os.path.join(root, file_name) + try: + with open(file_path, "r", encoding="ISO-8859-1") as f: + contents = f.read() + if re.search(pattern, contents): + print("found through filecontent") + match_list.append(name) + except Exception as e: + print(f"Could not read file {file_path}: {e}") + except re.error as e: - print(f"Regex error with filecontent pattern '{pattern}': {e}") + print(f"Regex error with filecontent pattern '{pattern}': {e}") + return match_list + + # Delete all temp files after matches are found to keep dir clean? + except FileNotFoundError: print(f"File not found: {filename}") print("No matches found.") @@ -76,5 +95,5 @@ def find_native_match(expressions: dict, filename: str) -> str: with open("/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json", "r") as f: patterns = json.load(f) -library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/test.exe") +library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/binutils-2.13.92.tar.bz2") print(library_name) \ No newline at end of file diff --git a/scripts/native_libraries/test.exe b/scripts/native_libraries/test.exe index d11cfc83..5f370b1b 100644 --- a/scripts/native_libraries/test.exe +++ b/scripts/native_libraries/test.exe @@ -1,3 +1,4 @@ Linux-2.5.3 lighttpd-1.0 -(GNU Binutils for Debian) 2.34 \ No newline at end of file +(GNU Binutils for Debian) 2.34 +Boa HTTPd 1.0 \ No newline at end of file From 45654f11a425eae4d8dc04262fd4b14914fcd1d1 Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Tue, 20 Aug 2024 16:48:08 -0700 Subject: [PATCH 18/42] moving tar decompression to new file --- scripts/native_libraries/match_native_lib.py | 180 ++++++++++++------ scripts/native_libraries/tar_decompression.py | 39 ++++ scripts/native_libraries/test.exe | 4 - 3 files changed, 157 insertions(+), 66 deletions(-) create mode 100644 scripts/native_libraries/tar_decompression.py delete mode 100644 scripts/native_libraries/test.exe diff --git a/scripts/native_libraries/match_native_lib.py b/scripts/native_libraries/match_native_lib.py index e3e4b46a..823dddbc 100644 --- a/scripts/native_libraries/match_native_lib.py +++ b/scripts/native_libraries/match_native_lib.py @@ -1,47 +1,11 @@ -# import json -# import re - - -# def find_native_match(expressions: dict, filename: str) -> str: -# for name, library in expressions.items(): -# if "filename" in library: -# for pattern in library["filename"]: -# try: -# if re.search(pattern, filename): -# print("found through filename") -# return name -# except: -# breakpoint() - -# try: -# with open(filename, "r", encoding="ISO-8859-1") as nativefile: -# contents = nativefile.read() -# for name, library in expressions.items(): -# if "filecontent" in library: -# for pattern in library["filecontent"]: -# try: -# if re.search(pattern, contents): -# print("found through filecontent") -# print("pattern") -# return name -# except re.error as e: -# print(f"Regex error with pattern '{pattern}': {e}") -# except FileNotFoundError: -# print(f"File not found: {filename}") -# print("this is last: ", pattern) -# return None - -# with open("/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json", "r") as f: -# patterns = json.load(f) - -# library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/busybox-1_36_1.tar.bz2") -# print(library_name) - - import json import re import tarfile import os +#from scripts import native_binaries + +#def check_file(filename): + def find_native_match(expressions: dict, filename: str) -> str: for name, library in expressions.items(): @@ -52,35 +16,64 @@ def find_native_match(expressions: dict, filename: str) -> str: print("found through filename") return name except re.error as e: - print(f"Regex error with filename pattern '{pattern}': {e}") + print(f"Invalid regex filename pattern '{pattern}': {e}") try: - # with open(filename, "r", encoding="ISO-8859-1") as nativefile: - # contents = nativefile.read() - with tarfile.open(filename, "r:bz2") as tar: - tar.extractall(path="/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files") + #try to use tempfile module here so it takes care of cleanup + # first check to see if file is compressed? .tar is not compressed + # if not compressed, keep it here + # if compressed, call tar_decompression() -> + + # check to see if it's a tar file: + + # IF MODE == .gz, .bz2, or .xz, call tar_decompression() + mode = "" + + if filename.endswith('.tar'): + mode = 'r:gz' + + elif filename.endswith('.tar.gz'): + mode = 'r:gz' + + elif filename.endswith('.tar.bz2'): + mode = 'r:bz2' + + elif filename.endswith('.tar.xz'): + mode = 'r:xz' + + if mode == '.tar': + with tarfile.open(filename, 'r') as tar: + + print("Opened tarfile") + tar.extractall(path="./extraction_dir") + print("All files extracted") + + else: + with tarfile.open(filename, mode) as tar: + tar.extractall(path="/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_3") - # Add matches to list match_list = [] for name, library in expressions.items(): if "filecontent" in library: for pattern in library["filecontent"]: try: - #change 'contents' to temp dir where decompressed files are - # loop through all files in temp file and search against patterns below - for root, dirs, files in os.walk("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files"): - for file_name in files: - file_path = os.path.join(root, file_name) - try: - with open(file_path, "r", encoding="ISO-8859-1") as f: - contents = f.read() - if re.search(pattern, contents): - print("found through filecontent") - match_list.append(name) - except Exception as e: - print(f"Could not read file {file_path}: {e}") - + # Save all decompressed files in temp dir + # loop through all files in temp dir and search against patterns below + if mode != '.tar': + for root, dirs, files in os.walk("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_3"): + for file_name in files: + file_path = os.path.join(root, file_name) + try: + with open(file_path, "r", encoding="ISO-8859-1") as f: + contents = f.read() + if re.search(pattern, contents): + print("found through filecontent") + match_list.append(name) + except Exception as e: + print(f"Could not read file {file_path}: {e}") + else: + print("not .tar") except re.error as e: print(f"Regex error with filecontent pattern '{pattern}': {e}") return match_list @@ -95,5 +88,68 @@ def find_native_match(expressions: dict, filename: str) -> str: with open("/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json", "r") as f: patterns = json.load(f) -library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/binutils-2.13.92.tar.bz2") -print(library_name) \ No newline at end of file +library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/bgpd.pl-0.08.tar") +print(library_name) + + + + + + +# def find_native_match(expressions: dict, filename: str) -> str: +# for name, library in expressions.items(): +# if "filename" in library: +# for pattern in library["filename"]: +# try: +# if re.search(pattern, filename): +# print("found through filename") +# return name +# except re.error as e: +# print(f"Invalid regex filename pattern '{pattern}': {e}") + +# try: +# #try to use tempfile module here so it takes care of cleanup +# # first check to see if file is compressed? .tar is not compressed +# # if not compressed, keep it here +# # if compressed, call tar_decompression() -> + +# # check to see if it's a tar file: + +# with tarfile.open(filename, "r:bz2") as tar: +# tar.extractall(path="/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_3") + +# match_list = [] + +# for name, library in expressions.items(): +# if "filecontent" in library: +# for pattern in library["filecontent"]: +# try: +# # Save all decompressed files in temp dir +# # loop through all files in temp dir and search against patterns below +# for root, dirs, files in os.walk("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_3"): +# for file_name in files: +# file_path = os.path.join(root, file_name) +# try: +# with open(file_path, "r", encoding="ISO-8859-1") as f: +# contents = f.read() +# if re.search(pattern, contents): +# print("found through filecontent") +# match_list.append(name) +# except Exception as e: +# print(f"Could not read file {file_path}: {e}") +# except re.error as e: +# print(f"Regex error with filecontent pattern '{pattern}': {e}") +# return match_list + +# # Delete all temp files after matches are found to keep dir clean? + +# except FileNotFoundError: +# print(f"File not found: {filename}") +# print("No matches found.") +# return None + +# with open("/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json", "r") as f: +# patterns = json.load(f) + +# library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/7z_win32.exe") +# print(library_name) \ No newline at end of file diff --git a/scripts/native_libraries/tar_decompression.py b/scripts/native_libraries/tar_decompression.py new file mode 100644 index 00000000..4fecf523 --- /dev/null +++ b/scripts/native_libraries/tar_decompression.py @@ -0,0 +1,39 @@ +import json +import pathlib +import re +from typing import Any, Dict, List + +from loguru import logger +import tarfile +import os + +import surfactant.plugin +from surfactant.sbomtypes import SBOM, Software + +def open_tar_file(filename): + try: + #try to use tempfile module here so it takes care of cleanup + # with tarfile.open(filename, "r:bz2") as tar: + # tar.extractall(path="/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/new_files") + + # # Save all decompressed files in temp dir + # for root, dirs, files in os.walk("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/new_files"): + # for file_name in files: + # file_path = os.path.join(root, file_name) + + # Delete all temp files after matches are found to keep dir clean? + # + # + contents = {} + with tarfile.open(filename, 'r') as tar: + print("Opened tarfile") + tar.extractall(path="scripts/native_libraries/new_dir") + print("All files extracted") + + except FileNotFoundError: + print(f"File not found: {filename}") + + + +tar_file = open_tar_file("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/bgpd.pl-0.08.tar") +print(tar_file) \ No newline at end of file diff --git a/scripts/native_libraries/test.exe b/scripts/native_libraries/test.exe deleted file mode 100644 index 5f370b1b..00000000 --- a/scripts/native_libraries/test.exe +++ /dev/null @@ -1,4 +0,0 @@ -Linux-2.5.3 -lighttpd-1.0 -(GNU Binutils for Debian) 2.34 -Boa HTTPd 1.0 \ No newline at end of file From a6e6a5558d98532c67c0fdb168160789bbdbd37e Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Wed, 21 Aug 2024 19:52:35 -0700 Subject: [PATCH 19/42] handling decompression infoextractor --- .../native_libraries/file_decompression.py | 101 +++++++ scripts/native_libraries/match_native_lib.py | 271 +++++++++++------- scripts/native_libraries/tar_decompression.py | 39 --- surfactant/infoextractors/native_lib_file.py | 74 ++++- 4 files changed, 336 insertions(+), 149 deletions(-) create mode 100644 scripts/native_libraries/file_decompression.py delete mode 100644 scripts/native_libraries/tar_decompression.py diff --git a/scripts/native_libraries/file_decompression.py b/scripts/native_libraries/file_decompression.py new file mode 100644 index 00000000..fae830de --- /dev/null +++ b/scripts/native_libraries/file_decompression.py @@ -0,0 +1,101 @@ +import json +import pathlib +import re +from typing import Any, Dict, List + +from loguru import logger +import tarfile +import zipfile +import tempfile +import os + +import surfactant.plugin +from surfactant.sbomtypes import SBOM, Software + +# Check if it's a tar file or zip file +# if tar, check if it's just .tar or a compressed tar +# extract accordingly + +# if zip: use zipfile module + +def check_compression_type(filename): + mode = '' + + if filename.endswith('.zip'): + decompress_zip_file(filename) + elif filename.endswith('.tar'): + open_tar_file(filename) + elif filename.endswith('.tar.gz'): + mode = 'r:gz' + elif filename.endswith('.tar.bz2'): + mode = 'r:bz2' + elif filename.endswith('.tar.xz'): + mode = 'r:xz' + else: + print('not supported') + return + + if mode: + decompress_file(filename, mode) + + if filename.endswith('.zip'): + decompress_zip_file(filename) + + +def create_temp_dir(filename): + with tempfile.TemporaryDirectory() as temp: + pass + + +def decompress_zip_file(filename): + # use temp dir + pass + +def decompress_file(filename, compression_type): + # use temp dir + with tarfile.open(filename, compression_type) as tar: + tar.exrtactall() + +def open_tar_file(filename): + #use temp dir + try: + if tar_file(): + contents = {} + with tarfile.open(filename, 'r') as tar: + print("Opened tarfile") + tar.extractall(path="scripts/native_libraries/new_dir") + print("All files extracted") + + except FileNotFoundError: + print(f"File not found: {filename}") + + + # if filename.endswith('.tar'): + # with tarfile.open(filename, 'r') as tar: + + # print("Opened tarfile") + # tar.extractall(path="./extraction_dir") + # print("All files extracted") + + # else: + # with tarfile.open(filename, mode) as tar: + # tar.extractall(path="/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_3") + + + +tar_file = open_tar_file("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/bgpd.pl-0.08.tar") +print(tar_file) + + +#try to use tempfile module here so it takes care of cleanup + # with tarfile.open(filename, "r:bz2") as tar: + # tar.extractall(path="/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/new_files") + + # # Save all decompressed files in temp dir + # for root, dirs, files in os.walk("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/new_files"): + # for file_name in files: + # file_path = os.path.join(root, file_name) + + # Delete all temp files after matches are found to keep dir clean? + # + # \ No newline at end of file diff --git a/scripts/native_libraries/match_native_lib.py b/scripts/native_libraries/match_native_lib.py index 823dddbc..f4466797 100644 --- a/scripts/native_libraries/match_native_lib.py +++ b/scripts/native_libraries/match_native_lib.py @@ -2,100 +2,12 @@ import re import tarfile import os +from elftools.elf.elffile import ELFFile #from scripts import native_binaries #def check_file(filename): -def find_native_match(expressions: dict, filename: str) -> str: - for name, library in expressions.items(): - if "filename" in library: - for pattern in library["filename"]: - try: - if re.search(pattern, filename): - print("found through filename") - return name - except re.error as e: - print(f"Invalid regex filename pattern '{pattern}': {e}") - - try: - #try to use tempfile module here so it takes care of cleanup - # first check to see if file is compressed? .tar is not compressed - # if not compressed, keep it here - # if compressed, call tar_decompression() -> - - # check to see if it's a tar file: - - # IF MODE == .gz, .bz2, or .xz, call tar_decompression() - mode = "" - - if filename.endswith('.tar'): - mode = 'r:gz' - - elif filename.endswith('.tar.gz'): - mode = 'r:gz' - - elif filename.endswith('.tar.bz2'): - mode = 'r:bz2' - - elif filename.endswith('.tar.xz'): - mode = 'r:xz' - - if mode == '.tar': - with tarfile.open(filename, 'r') as tar: - - print("Opened tarfile") - tar.extractall(path="./extraction_dir") - print("All files extracted") - - else: - with tarfile.open(filename, mode) as tar: - tar.extractall(path="/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_3") - - match_list = [] - - for name, library in expressions.items(): - if "filecontent" in library: - for pattern in library["filecontent"]: - try: - # Save all decompressed files in temp dir - # loop through all files in temp dir and search against patterns below - if mode != '.tar': - for root, dirs, files in os.walk("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_3"): - for file_name in files: - file_path = os.path.join(root, file_name) - try: - with open(file_path, "r", encoding="ISO-8859-1") as f: - contents = f.read() - if re.search(pattern, contents): - print("found through filecontent") - match_list.append(name) - except Exception as e: - print(f"Could not read file {file_path}: {e}") - else: - print("not .tar") - except re.error as e: - print(f"Regex error with filecontent pattern '{pattern}': {e}") - return match_list - - # Delete all temp files after matches are found to keep dir clean? - - except FileNotFoundError: - print(f"File not found: {filename}") - print("No matches found.") - return None - -with open("/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json", "r") as f: - patterns = json.load(f) - -library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/bgpd.pl-0.08.tar") -print(library_name) - - - - - - # def find_native_match(expressions: dict, filename: str) -> str: # for name, library in expressions.items(): # if "filename" in library: @@ -115,8 +27,15 @@ def find_native_match(expressions: dict, filename: str) -> str: # # check to see if it's a tar file: -# with tarfile.open(filename, "r:bz2") as tar: -# tar.extractall(path="/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_3") +# # IF MODE == .gz, .bz2, or .xz, call tar_decompression() +# mode = "" + +# if filename.endswith('.tar') or filename.endswith('.tar.gz') or filename.endswith('.tar.bz2') or filename.endswith('.tar') or filename.endswith('.zip'): +# pass +# # call + +# elif filename.endswith('.exe') or filename.endswith('.so') or filename.endswith('.dll'): +# pass # match_list = [] @@ -126,17 +45,20 @@ def find_native_match(expressions: dict, filename: str) -> str: # try: # # Save all decompressed files in temp dir # # loop through all files in temp dir and search against patterns below -# for root, dirs, files in os.walk("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_3"): -# for file_name in files: -# file_path = os.path.join(root, file_name) -# try: -# with open(file_path, "r", encoding="ISO-8859-1") as f: -# contents = f.read() -# if re.search(pattern, contents): -# print("found through filecontent") -# match_list.append(name) -# except Exception as e: -# print(f"Could not read file {file_path}: {e}") +# if mode != '.tar': +# for root, dirs, files in os.walk("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_3"): +# for file_name in files: +# file_path = os.path.join(root, file_name) +# try: +# with open(file_path, "r", encoding="ISO-8859-1") as f: +# contents = f.read() +# if re.search(pattern, contents): +# print("found through filecontent") +# match_list.append(name) +# except Exception as e: +# print(f"Could not read file {file_path}: {e}") +# else: +# print("not .tar") # except re.error as e: # print(f"Regex error with filecontent pattern '{pattern}': {e}") # return match_list @@ -151,5 +73,146 @@ def find_native_match(expressions: dict, filename: str) -> str: # with open("/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json", "r") as f: # patterns = json.load(f) -# library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/7z_win32.exe") -# print(library_name) \ No newline at end of file +# library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/bgpd.pl-0.08.tar") +# print(library_name) + + +# def find_native_match(expressions: dict, filename: str) -> str: +# for name, library in expressions.items(): +# if "filename" in library: +# for pattern in library["filename"]: +# try: +# if re.search(pattern, filename): +# print("found through filename") +# return name +# except re.error as e: +# print(f"Invalid regex filename pattern '{pattern}': {e}") + +# try: +# #try to use tempfile module here so it takes care of cleanup +# # first check to see if file is compressed? .tar is not compressed +# # if not compressed, keep it here +# # if compressed, call tar_decompression() -> + +# # check to see if it's a tar file: + +# if filename.endswith('.tar.bz2'): +# with tarfile.open(filename, "r:bz2") as tar: +# tar.extractall(path="/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_3") + +# match_list = [] + +# for name, library in expressions.items(): +# if "filecontent" in library: +# for pattern in library["filecontent"]: +# try: +# # Save all decompressed files in temp dir +# # loop through all files in temp dir and search against patterns below +# for root, dirs, files in os.walk("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_3"): +# for file_name in files: +# file_path = os.path.join(root, file_name) +# try: +# with open(file_path, "r", encoding="ISO-8859-1") as f: +# contents = f.read() +# if re.search(pattern, contents): +# print("found through filecontent") +# match_list.append(name) +# except Exception as e: +# print(f"Could not read file {file_path}: {e}") +# except re.error as e: +# print(f"Regex error with filecontent pattern '{pattern}': {e}") +# return match_list +# else: +# with open(filename, 'rb') as file: +# elf_file = ELFFile(file) + +# sections = {} +# for section in elf_file.iter_sections(): +# section_name = section.name +# section_data = section.data() +# sections[section_name] = section_data + +# # Extract segments +# segments = {} +# for segment in elf_file.iter_segments(): +# segment_type = segment.header.p_type +# segment_data = segment.data() +# segments[segment_type] = segment_data + +# except FileNotFoundError: +# print(f"File not found: {filename}") + + + + +# # Delete all temp files after matches are found to keep dir clean? + +# print("No matches found.") +# return None + +# with open("/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json", "r") as f: +# patterns = json.load(f) + +# library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/busybox") +# print(library_name) + + + + +def find_native_match(expressions: dict, filename: str) -> str: + for name, library in expressions.items(): + if "filename" in library: + for pattern in library["filename"]: + try: + if re.search(pattern, filename): + print("found through filename") + return name + except re.error as e: + print(f"Invalid regex filename pattern '{pattern}': {e}") + + try: + #try to use tempfile module here so it takes care of cleanup + # first check to see if file is compressed? .tar is not compressed + # if not compressed, keep it here + # if compressed, call tar_decompression() -> + + # check to see if it's a tar file: + + with tarfile.open(filename, "r:bz2") as tar: + tar.extractall(path="/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_5") + + match_list = [] + + for name, library in expressions.items(): + if "filecontent" in library: + for pattern in library["filecontent"]: + try: + # Save all decompressed files in temp dir + # loop through all files in temp dir and search against patterns below + for root, dirs, files in os.walk("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_5"): + for file_name in files: + file_path = os.path.join(root, file_name) + try: + with open(file_path, "r", encoding="ISO-8859-1") as f: + contents = f.read() + if re.search(pattern, contents): + print("found through filecontent") + match_list.append(name) + except Exception as e: + print(f"Could not read file {file_path}: {e}") + except re.error as e: + print(f"Regex error with filecontent pattern '{pattern}': {e}") + return match_list + + # Delete all temp files after matches are found to keep dir clean? + + except FileNotFoundError: + print(f"File not found: {filename}") + print("No matches found.") + return None + +with open("/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json", "r") as f: + patterns = json.load(f) + +library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/new1.tar.bz2") +print(library_name) \ No newline at end of file diff --git a/scripts/native_libraries/tar_decompression.py b/scripts/native_libraries/tar_decompression.py deleted file mode 100644 index 4fecf523..00000000 --- a/scripts/native_libraries/tar_decompression.py +++ /dev/null @@ -1,39 +0,0 @@ -import json -import pathlib -import re -from typing import Any, Dict, List - -from loguru import logger -import tarfile -import os - -import surfactant.plugin -from surfactant.sbomtypes import SBOM, Software - -def open_tar_file(filename): - try: - #try to use tempfile module here so it takes care of cleanup - # with tarfile.open(filename, "r:bz2") as tar: - # tar.extractall(path="/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/new_files") - - # # Save all decompressed files in temp dir - # for root, dirs, files in os.walk("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/new_files"): - # for file_name in files: - # file_path = os.path.join(root, file_name) - - # Delete all temp files after matches are found to keep dir clean? - # - # - contents = {} - with tarfile.open(filename, 'r') as tar: - print("Opened tarfile") - tar.extractall(path="scripts/native_libraries/new_dir") - print("All files extracted") - - except FileNotFoundError: - print(f"File not found: {filename}") - - - -tar_file = open_tar_file("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/bgpd.pl-0.08.tar") -print(tar_file) \ No newline at end of file diff --git a/surfactant/infoextractors/native_lib_file.py b/surfactant/infoextractors/native_lib_file.py index 6f766339..d6bcf7f0 100644 --- a/surfactant/infoextractors/native_lib_file.py +++ b/surfactant/infoextractors/native_lib_file.py @@ -10,8 +10,13 @@ from surfactant.filetypeid import id_magic #from enum import Enum, auto +def check_compression(filename): + if is_tar_file() or is_zip_file: + # call file_decompression + pass + def supports_file(filetype) -> bool: - return filetype in ("PE", "ELF", "MACHO32", "MACHO64") + return filetype in ("PE", "ELF", "MACHOFAT", "MACHOFAT64", "MACHO32", "MACHO64") @surfactant.plugin.hookimpl @@ -22,11 +27,68 @@ def extract_file_info(sbom: SBOM, software: Software, filename: str, filetype: s def extract_native_lib_info(filename): native_lib_info: Dict[str, Any] = {"nativeLibraries": []} - native_lib_file = pathlib.Path(__file__).parent / "native_lib_patterns.json" + native_lib_patterns = pathlib.Path(__file__).parent / "native_lib_patterns.json" + with open(native_lib_patterns, "r") as f: + patterns = json.load(f) + + for name, library in patterns.items(): + if "filename" in library: + for pattern in library["filename"]: + try: + if re.search(pattern, filename): + print("found through filename") + return name + except re.error as e: + print(f"Invalid regex filename pattern '{pattern}': {e}") try: - with open(native_lib_file, "r") as regex: - database = json.load(regex) + #try to use tempfile module here so it takes care of cleanup + # first check to see if file is compressed? .tar is not compressed + # if not compressed, keep it here + # if compressed, call tar_decompression() -> + + # check to see if file is compressed (tar or zip file) + + + + + with tarfile.open(filename, "r:bz2") as tar: + tar.extractall(path="/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_5") + + match_list = [] + + for name, library in expressions.items(): + if "filecontent" in library: + for pattern in library["filecontent"]: + try: + # Save all decompressed files in temp dir + # loop through all files in temp dir and search against patterns below + for root, dirs, files in os.walk("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_5"): + for file_name in files: + file_path = os.path.join(root, file_name) + try: + with open(file_path, "r", encoding="ISO-8859-1") as f: + contents = f.read() + if re.search(pattern, contents): + print("found through filecontent") + match_list.append(name) + except Exception as e: + print(f"Could not read file {file_path}: {e}") + except re.error as e: + print(f"Regex error with filecontent pattern '{pattern}': {e}") + return match_list + + # Delete all temp files after matches are found to keep dir clean? + except FileNotFoundError: - logger.warning(f"File not found: {native_lib_file}") - return None \ No newline at end of file + print(f"File not found: {filename}") + print("No matches found.") + return None + +def is_tar_file(filename: str) -> bool: + pattern = r'\.tar(\.(gz|bz2|xz))?$' + return bool(re.search(pattern, filename)) + +def is_zip_file(filename: str) -> bool: + pattern = r'\.zip$' + return bool(re.search(pattern, filename)) \ No newline at end of file From 781fc02dd7cdb437b0e4bcbf0d3ae0ee1075bc7f Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Fri, 23 Aug 2024 21:30:39 -0700 Subject: [PATCH 20/42] adding different compression types --- .../native_libraries/file_decompression.py | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/scripts/native_libraries/file_decompression.py b/scripts/native_libraries/file_decompression.py index fae830de..6bf96c03 100644 --- a/scripts/native_libraries/file_decompression.py +++ b/scripts/native_libraries/file_decompression.py @@ -12,12 +12,6 @@ import surfactant.plugin from surfactant.sbomtypes import SBOM, Software -# Check if it's a tar file or zip file -# if tar, check if it's just .tar or a compressed tar -# extract accordingly - -# if zip: use zipfile module - def check_compression_type(filename): mode = '' @@ -36,34 +30,36 @@ def check_compression_type(filename): return if mode: - decompress_file(filename, mode) - - if filename.endswith('.zip'): - decompress_zip_file(filename) - + decompress_tar_file(filename, mode) -def create_temp_dir(filename): - with tempfile.TemporaryDirectory() as temp: - pass +def create_temp_dir(): + # Create a temporary directory + temp_dir = tempfile.mkdtemp() + #with tempfile.TemporaryDirectory() as temp: + return temp_dir def decompress_zip_file(filename): # use temp dir pass -def decompress_file(filename, compression_type): +def decompress_tar_file(filename, compression_type): # use temp dir + temp_dir = create_temp_dir() with tarfile.open(filename, compression_type) as tar: - tar.exrtactall() + # insert extract path + tar.exrtactall(path=temp_dir) + # return extracted file to native_lib_file ? so the func should return this dir def open_tar_file(filename): #use temp dir + temp_dir = create_temp_dir() try: if tar_file(): contents = {} with tarfile.open(filename, 'r') as tar: print("Opened tarfile") - tar.extractall(path="scripts/native_libraries/new_dir") + tar.extractall(path=temp_dir) print("All files extracted") except FileNotFoundError: From 3456621bce1d58b29a54aed0f3705e43a1436f58 Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Mon, 26 Aug 2024 01:14:24 -0700 Subject: [PATCH 21/42] adding different compression types --- .../native_libraries/file_decompression.py | 47 +++------- scripts/native_libraries/match_native_lib.py | 87 ++++++++++++------- surfactant/infoextractors/native_lib_file.py | 2 +- 3 files changed, 68 insertions(+), 68 deletions(-) diff --git a/scripts/native_libraries/file_decompression.py b/scripts/native_libraries/file_decompression.py index 6bf96c03..7719d304 100644 --- a/scripts/native_libraries/file_decompression.py +++ b/scripts/native_libraries/file_decompression.py @@ -22,19 +22,20 @@ def check_compression_type(filename): elif filename.endswith('.tar.gz'): mode = 'r:gz' elif filename.endswith('.tar.bz2'): + print("hello") mode = 'r:bz2' elif filename.endswith('.tar.xz'): mode = 'r:xz' else: print('not supported') - return if mode: + print("we have mode") decompress_tar_file(filename, mode) def create_temp_dir(): # Create a temporary directory - temp_dir = tempfile.mkdtemp() + temp_dir = tempfile.mkdtemp(prefix='surfactant-temp') #with tempfile.TemporaryDirectory() as temp: return temp_dir @@ -48,50 +49,26 @@ def decompress_tar_file(filename, compression_type): temp_dir = create_temp_dir() with tarfile.open(filename, compression_type) as tar: # insert extract path - tar.exrtactall(path=temp_dir) + tar.extractall(path=temp_dir) + print("extracted") # return extracted file to native_lib_file ? so the func should return this dir def open_tar_file(filename): #use temp dir temp_dir = create_temp_dir() try: - if tar_file(): - contents = {} - with tarfile.open(filename, 'r') as tar: - print("Opened tarfile") - tar.extractall(path=temp_dir) - print("All files extracted") + contents = {} + with tarfile.open(filename, 'r') as tar: + print("Opened tarfile") + tar.extractall(path=temp_dir) + print("All files extracted") except FileNotFoundError: print(f"File not found: {filename}") - # if filename.endswith('.tar'): - # with tarfile.open(filename, 'r') as tar: - - # print("Opened tarfile") - # tar.extractall(path="./extraction_dir") - # print("All files extracted") - # else: - # with tarfile.open(filename, mode) as tar: - # tar.extractall(path="/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_3") - -tar_file = open_tar_file("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/bgpd.pl-0.08.tar") -print(tar_file) - - -#try to use tempfile module here so it takes care of cleanup - # with tarfile.open(filename, "r:bz2") as tar: - # tar.extractall(path="/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/new_files") - - # # Save all decompressed files in temp dir - # for root, dirs, files in os.walk("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/new_files"): - # for file_name in files: - # file_path = os.path.join(root, file_name) - - # Delete all temp files after matches are found to keep dir clean? - # - # \ No newline at end of file +# tar_file = open_tar_file("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/bgpd.pl-0.08.tar") +# print(tar_file) \ No newline at end of file diff --git a/scripts/native_libraries/match_native_lib.py b/scripts/native_libraries/match_native_lib.py index f4466797..449fa043 100644 --- a/scripts/native_libraries/match_native_lib.py +++ b/scripts/native_libraries/match_native_lib.py @@ -2,7 +2,7 @@ import re import tarfile import os -from elftools.elf.elffile import ELFFile +import file_decompression #from scripts import native_binaries #def check_file(filename): @@ -171,48 +171,71 @@ def find_native_match(expressions: dict, filename: str) -> str: print(f"Invalid regex filename pattern '{pattern}': {e}") try: - #try to use tempfile module here so it takes care of cleanup - # first check to see if file is compressed? .tar is not compressed - # if not compressed, keep it here - # if compressed, call tar_decompression() -> - - # check to see if it's a tar file: + # check to see if it's a tar file + pattern = r'\.tar(\.(gz|bz2|xz))?$' + if re.search(pattern, filename): + compression_type = file_decompression.check_compression_type(filename) - with tarfile.open(filename, "r:bz2") as tar: - tar.extractall(path="/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_5") + # check to see if it's a zip file + pattern = r'\.zip$' + if re.search(pattern, filename): + compression_type = file_decompression.check_compression_type(filename) match_list = [] - for name, library in expressions.items(): - if "filecontent" in library: - for pattern in library["filecontent"]: - try: - # Save all decompressed files in temp dir - # loop through all files in temp dir and search against patterns below - for root, dirs, files in os.walk("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_5"): - for file_name in files: - file_path = os.path.join(root, file_name) - try: - with open(file_path, "r", encoding="ISO-8859-1") as f: - contents = f.read() - if re.search(pattern, contents): - print("found through filecontent") - match_list.append(name) - except Exception as e: - print(f"Could not read file {file_path}: {e}") - except re.error as e: - print(f"Regex error with filecontent pattern '{pattern}': {e}") - return match_list + # check if it's a file or a dir + # this is catching everything, even dirs + if os.path.isfile(filename): + print("i was one file") + for name, library in expressions.items(): + if "filecontent" in library: + for pattern in library["filecontent"]: + try: + with open(filename, "rb") as f: + contents = f.read() + if re.search(pattern.encode('utf-8'), contents): + print("found through filecontent") + match_list.append(name) + except Exception as e: + print(f"Could not read file {filename}: {e}") + return match_list + + # should have dir here to traverse + elif os.path.isdir(filename): + print("i was more files") + for name, library in expressions.items(): + if "filecontent" in library: + for pattern in library["filecontent"]: + try: + # Save all decompressed files in temp dir + # loop through all files in temp dir and search against patterns below + + # also, how do we get the dir where the decompressed files are? + # can we call supports_file() here again and only run this on ELF, PE, MACH-O files + for root, dirs, files in os.walk("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_5"): + for file_name in files: + file_path = os.path.join(root, file_name) + try: + with open(file_path, "rb") as f: + contents = f.read() + if re.search(pattern, contents): + print("found through filecontent") + match_list.append(name) + except Exception as e: + print(f"Could not read file {file_path}: {e}") + except re.error as e: + print(f"Regex error with filecontent pattern '{pattern}': {e}") + return match_list # Delete all temp files after matches are found to keep dir clean? except FileNotFoundError: - print(f"File not found: {filename}") - print("No matches found.") + print(f"File not found: {filename}") + # print("No matches found.") return None with open("/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json", "r") as f: patterns = json.load(f) -library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/new1.tar.bz2") +library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/binutils-2.13.92.tar.bz2") print(library_name) \ No newline at end of file diff --git a/surfactant/infoextractors/native_lib_file.py b/surfactant/infoextractors/native_lib_file.py index d6bcf7f0..a44c6fdc 100644 --- a/surfactant/infoextractors/native_lib_file.py +++ b/surfactant/infoextractors/native_lib_file.py @@ -8,7 +8,6 @@ import surfactant.plugin from surfactant.sbomtypes import SBOM, Software from surfactant.filetypeid import id_magic -#from enum import Enum, auto def check_compression(filename): if is_tar_file() or is_zip_file: @@ -22,6 +21,7 @@ def supports_file(filetype) -> bool: @surfactant.plugin.hookimpl def extract_file_info(sbom: SBOM, software: Software, filename: str, filetype: str) -> object: if not supports_file(filetype): + #call check_compression() here? return None return extract_native_lib_info(filename) From 3f76dafb46447f23e7b69cf9dca9ba63929836b3 Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Tue, 8 Oct 2024 22:55:34 -0700 Subject: [PATCH 22/42] native lib plugin --- .../native_libraries/file_decompression.py | 50 ++-- scripts/native_libraries/match_native_lib.py | 232 ++++-------------- surfactant/infoextractors/native_lib_file.py | 98 +++----- surfactant/plugin/manager.py | 4 +- 4 files changed, 113 insertions(+), 271 deletions(-) diff --git a/scripts/native_libraries/file_decompression.py b/scripts/native_libraries/file_decompression.py index 7719d304..1459b6c1 100644 --- a/scripts/native_libraries/file_decompression.py +++ b/scripts/native_libraries/file_decompression.py @@ -16,22 +16,26 @@ def check_compression_type(filename): mode = '' if filename.endswith('.zip'): - decompress_zip_file(filename) + print("It's a zip file") + temp_folder = decompress_zip_file(filename) elif filename.endswith('.tar'): - open_tar_file(filename) + print("this is a tar file") + temp_folder = extract_tar_file(filename) elif filename.endswith('.tar.gz'): mode = 'r:gz' elif filename.endswith('.tar.bz2'): - print("hello") + print("Mode is bz2") mode = 'r:bz2' elif filename.endswith('.tar.xz'): mode = 'r:xz' else: - print('not supported') + print("Compression format not supported") if mode: - print("we have mode") - decompress_tar_file(filename, mode) + print("Calling decompress tar file") + temp_folder = decompress_tar_file(filename, mode) + print("After calling decompress_tar_file: ", temp_folder) + return temp_folder def create_temp_dir(): # Create a temporary directory @@ -39,36 +43,34 @@ def create_temp_dir(): #with tempfile.TemporaryDirectory() as temp: return temp_dir - def decompress_zip_file(filename): # use temp dir - pass + print("Decompressing zip files") + temp_folder = create_temp_dir() + with zipfile.ZipFile(filename, 'r') as zip: + zip.extractall(path=temp_folder) + return temp_folder def decompress_tar_file(filename, compression_type): - # use temp dir - temp_dir = create_temp_dir() + print("Inside decompress_tar_file") + temp_folder = create_temp_dir() with tarfile.open(filename, compression_type) as tar: # insert extract path - tar.extractall(path=temp_dir) - print("extracted") - # return extracted file to native_lib_file ? so the func should return this dir + tar.extractall(path=temp_folder) + print("this is Temp Folder: ", temp_folder) + print("Finished extraction") + return temp_folder -def open_tar_file(filename): - #use temp dir +def extract_tar_file(filename): temp_dir = create_temp_dir() try: - contents = {} with tarfile.open(filename, 'r') as tar: print("Opened tarfile") tar.extractall(path=temp_dir) - print("All files extracted") - + print("All files extracted of tar file") except FileNotFoundError: print(f"File not found: {filename}") + except tarfile.TarError as e: + print(f"Error extracting tar file: {e}") - - - - -# tar_file = open_tar_file("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/bgpd.pl-0.08.tar") -# print(tar_file) \ No newline at end of file + return temp_dir \ No newline at end of file diff --git a/scripts/native_libraries/match_native_lib.py b/scripts/native_libraries/match_native_lib.py index 449fa043..9eaa92cf 100644 --- a/scripts/native_libraries/match_native_lib.py +++ b/scripts/native_libraries/match_native_lib.py @@ -3,190 +3,56 @@ import tarfile import os import file_decompression -#from scripts import native_binaries -#def check_file(filename): - - -# def find_native_match(expressions: dict, filename: str) -> str: -# for name, library in expressions.items(): -# if "filename" in library: -# for pattern in library["filename"]: -# try: -# if re.search(pattern, filename): -# print("found through filename") -# return name -# except re.error as e: -# print(f"Invalid regex filename pattern '{pattern}': {e}") - -# try: -# #try to use tempfile module here so it takes care of cleanup -# # first check to see if file is compressed? .tar is not compressed -# # if not compressed, keep it here -# # if compressed, call tar_decompression() -> - -# # check to see if it's a tar file: - -# # IF MODE == .gz, .bz2, or .xz, call tar_decompression() -# mode = "" - -# if filename.endswith('.tar') or filename.endswith('.tar.gz') or filename.endswith('.tar.bz2') or filename.endswith('.tar') or filename.endswith('.zip'): -# pass -# # call - -# elif filename.endswith('.exe') or filename.endswith('.so') or filename.endswith('.dll'): -# pass - -# match_list = [] - -# for name, library in expressions.items(): -# if "filecontent" in library: -# for pattern in library["filecontent"]: -# try: -# # Save all decompressed files in temp dir -# # loop through all files in temp dir and search against patterns below -# if mode != '.tar': -# for root, dirs, files in os.walk("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_3"): -# for file_name in files: -# file_path = os.path.join(root, file_name) -# try: -# with open(file_path, "r", encoding="ISO-8859-1") as f: -# contents = f.read() -# if re.search(pattern, contents): -# print("found through filecontent") -# match_list.append(name) -# except Exception as e: -# print(f"Could not read file {file_path}: {e}") -# else: -# print("not .tar") -# except re.error as e: -# print(f"Regex error with filecontent pattern '{pattern}': {e}") -# return match_list - -# # Delete all temp files after matches are found to keep dir clean? - -# except FileNotFoundError: -# print(f"File not found: {filename}") -# print("No matches found.") -# return None - -# with open("/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json", "r") as f: -# patterns = json.load(f) - -# library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/bgpd.pl-0.08.tar") -# print(library_name) - - -# def find_native_match(expressions: dict, filename: str) -> str: -# for name, library in expressions.items(): -# if "filename" in library: -# for pattern in library["filename"]: -# try: -# if re.search(pattern, filename): -# print("found through filename") -# return name -# except re.error as e: -# print(f"Invalid regex filename pattern '{pattern}': {e}") - -# try: -# #try to use tempfile module here so it takes care of cleanup -# # first check to see if file is compressed? .tar is not compressed -# # if not compressed, keep it here -# # if compressed, call tar_decompression() -> - -# # check to see if it's a tar file: - -# if filename.endswith('.tar.bz2'): -# with tarfile.open(filename, "r:bz2") as tar: -# tar.extractall(path="/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_3") - -# match_list = [] - -# for name, library in expressions.items(): -# if "filecontent" in library: -# for pattern in library["filecontent"]: -# try: -# # Save all decompressed files in temp dir -# # loop through all files in temp dir and search against patterns below -# for root, dirs, files in os.walk("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_3"): -# for file_name in files: -# file_path = os.path.join(root, file_name) -# try: -# with open(file_path, "r", encoding="ISO-8859-1") as f: -# contents = f.read() -# if re.search(pattern, contents): -# print("found through filecontent") -# match_list.append(name) -# except Exception as e: -# print(f"Could not read file {file_path}: {e}") -# except re.error as e: -# print(f"Regex error with filecontent pattern '{pattern}': {e}") -# return match_list -# else: -# with open(filename, 'rb') as file: -# elf_file = ELFFile(file) - -# sections = {} -# for section in elf_file.iter_sections(): -# section_name = section.name -# section_data = section.data() -# sections[section_name] = section_data - -# # Extract segments -# segments = {} -# for segment in elf_file.iter_segments(): -# segment_type = segment.header.p_type -# segment_data = segment.data() -# segments[segment_type] = segment_data - -# except FileNotFoundError: -# print(f"File not found: {filename}") - - - - -# # Delete all temp files after matches are found to keep dir clean? - -# print("No matches found.") -# return None - -# with open("/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json", "r") as f: -# patterns = json.load(f) - -# library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/busybox") -# print(library_name) +def is_elf(file_path): + with open(file_path, "rb") as f: + header = f.read(4) + return header == b'\x7fELF' +def is_pe(file_path): + with open(file_path, "rb") as f: + header = f.read(2) + return header == b'MZ' +def is_macho(file_path): + with open(file_path, "rb") as f: + header = f.read(4) + return header in [b'\xCF\xFA\xED\xFE', b'\xCE\xFA\xED\xFE'] # 64-bit and 32-bit +def supports_file(file_path): + """Check if the file is ELF, PE, or MACH-O.""" + return is_elf(file_path) or is_pe(file_path) or is_macho(file_path) def find_native_match(expressions: dict, filename: str) -> str: + match_list = [] + temp_folder = None + + #find match through filename for name, library in expressions.items(): + #does this check to see if the field filename exists or if the filename field has elements? if "filename" in library: for pattern in library["filename"]: try: if re.search(pattern, filename): + print("this is pattern, ", pattern) print("found through filename") return name except re.error as e: print(f"Invalid regex filename pattern '{pattern}': {e}") try: - # check to see if it's a tar file - pattern = r'\.tar(\.(gz|bz2|xz))?$' + # Check for tar or zip files + pattern = r'\.tar(\.(gz|bz2|xz))?$|\.zip$' if re.search(pattern, filename): - compression_type = file_decompression.check_compression_type(filename) - - # check to see if it's a zip file - pattern = r'\.zip$' - if re.search(pattern, filename): - compression_type = file_decompression.check_compression_type(filename) - - match_list = [] + temp_folder = file_decompression.check_compression_type(filename) + else: + temp_folder = filename + print("This is the returned temp_folder: ", temp_folder) # check if it's a file or a dir - # this is catching everything, even dirs - if os.path.isfile(filename): - print("i was one file") + #MAybe we keep this as temp_folder. Basically, if the file is not compressed, set temp_folder to the filename. + if os.path.isfile(temp_folder): + print("Is a single file") for name, library in expressions.items(): if "filecontent" in library: for pattern in library["filecontent"]: @@ -199,43 +65,41 @@ def find_native_match(expressions: dict, filename: str) -> str: except Exception as e: print(f"Could not read file {filename}: {e}") return match_list - - # should have dir here to traverse - elif os.path.isdir(filename): - print("i was more files") + + elif os.path.isdir(temp_folder): + print("Is a dir") for name, library in expressions.items(): if "filecontent" in library: for pattern in library["filecontent"]: - try: - # Save all decompressed files in temp dir - # loop through all files in temp dir and search against patterns below - - # also, how do we get the dir where the decompressed files are? - # can we call supports_file() here again and only run this on ELF, PE, MACH-O files - for root, dirs, files in os.walk("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_5"): - for file_name in files: - file_path = os.path.join(root, file_name) + # can we call supports_file() here again and only run this on ELF, PE, MACH-O files + for root, dirs, files in os.walk(temp_folder): + for file_name in files: + file_path = os.path.join(root, file_name) + if supports_file(file_path): try: with open(file_path, "rb") as f: contents = f.read() if re.search(pattern, contents): print("found through filecontent") match_list.append(name) + else: + print(f"No match in {file_path} for pattern: {pattern}") except Exception as e: - print(f"Could not read file {file_path}: {e}") - except re.error as e: - print(f"Regex error with filecontent pattern '{pattern}': {e}") + print(f"Could not read file {file_path}: {e}") + # else: + # print("no elf, pe, or macho files") return match_list # Delete all temp files after matches are found to keep dir clean? except FileNotFoundError: print(f"File not found: {filename}") - # print("No matches found.") - return None + return match_list + with open("/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json", "r") as f: patterns = json.load(f) -library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/binutils-2.13.92.tar.bz2") -print(library_name) \ No newline at end of file + +library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/zlib1.dll") +print("Libs found: ", library_name) \ No newline at end of file diff --git a/surfactant/infoextractors/native_lib_file.py b/surfactant/infoextractors/native_lib_file.py index a44c6fdc..2c6d7249 100644 --- a/surfactant/infoextractors/native_lib_file.py +++ b/surfactant/infoextractors/native_lib_file.py @@ -9,10 +9,6 @@ from surfactant.sbomtypes import SBOM, Software from surfactant.filetypeid import id_magic -def check_compression(filename): - if is_tar_file() or is_zip_file: - # call file_decompression - pass def supports_file(filetype) -> bool: return filetype in ("PE", "ELF", "MACHOFAT", "MACHOFAT64", "MACHO32", "MACHO64") @@ -21,74 +17,54 @@ def supports_file(filetype) -> bool: @surfactant.plugin.hookimpl def extract_file_info(sbom: SBOM, software: Software, filename: str, filetype: str) -> object: if not supports_file(filetype): - #call check_compression() here? return None return extract_native_lib_info(filename) def extract_native_lib_info(filename): native_lib_info: Dict[str, Any] = {"nativeLibraries": []} native_lib_patterns = pathlib.Path(__file__).parent / "native_lib_patterns.json" - with open(native_lib_patterns, "r") as f: - patterns = json.load(f) - - for name, library in patterns.items(): - if "filename" in library: - for pattern in library["filename"]: - try: - if re.search(pattern, filename): - print("found through filename") - return name - except re.error as e: - print(f"Invalid regex filename pattern '{pattern}': {e}") + # Load regex patterns into database var try: - #try to use tempfile module here so it takes care of cleanup - # first check to see if file is compressed? .tar is not compressed - # if not compressed, keep it here - # if compressed, call tar_decompression() -> - - # check to see if file is compressed (tar or zip file) - + with open(native_lib_patterns, "r") as regex: + database = json.load(regex) + except FileNotFoundError: + logger.warning(f"File not found: {native_lib_patterns}") + return None + # Match based on filename + filenames_list = match_by_attribute("filename", filename, database) + if len(filenames_list) > 0: + #native_lib_info["nativeLibraries"] = filenames_list + native_lib_info["nativeLibraries"].extend(filenames_list) + #Match based on filecontent + try: + with open(filename, "rb") as native_file: + filecontent = native_file.read() + filecontent_list = match_by_attribute("filecontent", filecontent, database) - with tarfile.open(filename, "r:bz2") as tar: - tar.extractall(path="/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_5") + #this overwrites the list, need to extend the list + #native_lib_info["nativeLibraries"] = filecontent_list + native_lib_info["nativeLibraries"].extend(filecontent_list) - match_list = [] - - for name, library in expressions.items(): - if "filecontent" in library: - for pattern in library["filecontent"]: - try: - # Save all decompressed files in temp dir - # loop through all files in temp dir and search against patterns below - for root, dirs, files in os.walk("/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/decompressed_files_5"): - for file_name in files: - file_path = os.path.join(root, file_name) - try: - with open(file_path, "r", encoding="ISO-8859-1") as f: - contents = f.read() - if re.search(pattern, contents): - print("found through filecontent") - match_list.append(name) - except Exception as e: - print(f"Could not read file {file_path}: {e}") - except re.error as e: - print(f"Regex error with filecontent pattern '{pattern}': {e}") - return match_list - - # Delete all temp files after matches are found to keep dir clean? - except FileNotFoundError: - print(f"File not found: {filename}") - print("No matches found.") - return None - -def is_tar_file(filename: str) -> bool: - pattern = r'\.tar(\.(gz|bz2|xz))?$' - return bool(re.search(pattern, filename)) + logger.warning(f"File not found: {filename}") + return native_lib_info -def is_zip_file(filename: str) -> bool: - pattern = r'\.zip$' - return bool(re.search(pattern, filename)) \ No newline at end of file +def match_by_attribute(attribute: str, content: str, database: Dict) -> List[Dict]: + libs = [] + for name, library in database.items(): + if attribute in library: + for pattern in library[attribute]: + if attribute == "filename": + matches = re.search(pattern, content) + else: + matches = re.search(pattern.encode('utf-8'), content) + try: + if matches: + #libs.append({"library": name, "version": matches.group(1)}) + libs.append({"library": name}) + except re.error as e: + print(f"Invalid regex filename pattern '{pattern}': {e}") + return libs diff --git a/surfactant/plugin/manager.py b/surfactant/plugin/manager.py index 7ce42f66..c90b9d08 100644 --- a/surfactant/plugin/manager.py +++ b/surfactant/plugin/manager.py @@ -25,7 +25,7 @@ def _register_plugins(pm: pluggy.PluginManager) -> None: mach_o_file, ole_file, pe_file, - native_lib_file, + native_lib_file ) from surfactant.input_readers import cytrics_reader from surfactant.output import ( @@ -63,7 +63,7 @@ def _register_plugins(pm: pluggy.PluginManager) -> None: cyclonedx_writer, spdx_writer, cytrics_reader, - native_lib_file, + native_lib_file ) for plugin in internal_plugins: pm.register(plugin) From fe86f6ae627605643a5b74759df5cece2d37d407 Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Tue, 8 Oct 2024 22:56:16 -0700 Subject: [PATCH 23/42] Remove unnecessary native libraries From 31d742b52d7e21cfa6cf3369b178976c30151caa Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Mon, 14 Oct 2024 12:49:16 -0700 Subject: [PATCH 24/42] cleaning native lib detection --- .../native_libraries/file_decompression.py | 76 ------------- scripts/native_libraries/match_native_lib.py | 105 ------------------ surfactant/infoextractors/native_lib_file.py | 24 ++-- 3 files changed, 16 insertions(+), 189 deletions(-) delete mode 100644 scripts/native_libraries/file_decompression.py delete mode 100644 scripts/native_libraries/match_native_lib.py diff --git a/scripts/native_libraries/file_decompression.py b/scripts/native_libraries/file_decompression.py deleted file mode 100644 index 1459b6c1..00000000 --- a/scripts/native_libraries/file_decompression.py +++ /dev/null @@ -1,76 +0,0 @@ -import json -import pathlib -import re -from typing import Any, Dict, List - -from loguru import logger -import tarfile -import zipfile -import tempfile -import os - -import surfactant.plugin -from surfactant.sbomtypes import SBOM, Software - -def check_compression_type(filename): - mode = '' - - if filename.endswith('.zip'): - print("It's a zip file") - temp_folder = decompress_zip_file(filename) - elif filename.endswith('.tar'): - print("this is a tar file") - temp_folder = extract_tar_file(filename) - elif filename.endswith('.tar.gz'): - mode = 'r:gz' - elif filename.endswith('.tar.bz2'): - print("Mode is bz2") - mode = 'r:bz2' - elif filename.endswith('.tar.xz'): - mode = 'r:xz' - else: - print("Compression format not supported") - - if mode: - print("Calling decompress tar file") - temp_folder = decompress_tar_file(filename, mode) - print("After calling decompress_tar_file: ", temp_folder) - return temp_folder - -def create_temp_dir(): - # Create a temporary directory - temp_dir = tempfile.mkdtemp(prefix='surfactant-temp') - #with tempfile.TemporaryDirectory() as temp: - return temp_dir - -def decompress_zip_file(filename): - # use temp dir - print("Decompressing zip files") - temp_folder = create_temp_dir() - with zipfile.ZipFile(filename, 'r') as zip: - zip.extractall(path=temp_folder) - return temp_folder - -def decompress_tar_file(filename, compression_type): - print("Inside decompress_tar_file") - temp_folder = create_temp_dir() - with tarfile.open(filename, compression_type) as tar: - # insert extract path - tar.extractall(path=temp_folder) - print("this is Temp Folder: ", temp_folder) - print("Finished extraction") - return temp_folder - -def extract_tar_file(filename): - temp_dir = create_temp_dir() - try: - with tarfile.open(filename, 'r') as tar: - print("Opened tarfile") - tar.extractall(path=temp_dir) - print("All files extracted of tar file") - except FileNotFoundError: - print(f"File not found: {filename}") - except tarfile.TarError as e: - print(f"Error extracting tar file: {e}") - - return temp_dir \ No newline at end of file diff --git a/scripts/native_libraries/match_native_lib.py b/scripts/native_libraries/match_native_lib.py deleted file mode 100644 index 9eaa92cf..00000000 --- a/scripts/native_libraries/match_native_lib.py +++ /dev/null @@ -1,105 +0,0 @@ -import json -import re -import tarfile -import os -import file_decompression - -def is_elf(file_path): - with open(file_path, "rb") as f: - header = f.read(4) - return header == b'\x7fELF' - -def is_pe(file_path): - with open(file_path, "rb") as f: - header = f.read(2) - return header == b'MZ' - -def is_macho(file_path): - with open(file_path, "rb") as f: - header = f.read(4) - return header in [b'\xCF\xFA\xED\xFE', b'\xCE\xFA\xED\xFE'] # 64-bit and 32-bit - -def supports_file(file_path): - """Check if the file is ELF, PE, or MACH-O.""" - return is_elf(file_path) or is_pe(file_path) or is_macho(file_path) - -def find_native_match(expressions: dict, filename: str) -> str: - match_list = [] - temp_folder = None - - #find match through filename - for name, library in expressions.items(): - #does this check to see if the field filename exists or if the filename field has elements? - if "filename" in library: - for pattern in library["filename"]: - try: - if re.search(pattern, filename): - print("this is pattern, ", pattern) - print("found through filename") - return name - except re.error as e: - print(f"Invalid regex filename pattern '{pattern}': {e}") - - try: - # Check for tar or zip files - pattern = r'\.tar(\.(gz|bz2|xz))?$|\.zip$' - if re.search(pattern, filename): - temp_folder = file_decompression.check_compression_type(filename) - else: - temp_folder = filename - print("This is the returned temp_folder: ", temp_folder) - - # check if it's a file or a dir - #MAybe we keep this as temp_folder. Basically, if the file is not compressed, set temp_folder to the filename. - if os.path.isfile(temp_folder): - print("Is a single file") - for name, library in expressions.items(): - if "filecontent" in library: - for pattern in library["filecontent"]: - try: - with open(filename, "rb") as f: - contents = f.read() - if re.search(pattern.encode('utf-8'), contents): - print("found through filecontent") - match_list.append(name) - except Exception as e: - print(f"Could not read file {filename}: {e}") - return match_list - - elif os.path.isdir(temp_folder): - print("Is a dir") - for name, library in expressions.items(): - if "filecontent" in library: - for pattern in library["filecontent"]: - # can we call supports_file() here again and only run this on ELF, PE, MACH-O files - for root, dirs, files in os.walk(temp_folder): - for file_name in files: - file_path = os.path.join(root, file_name) - if supports_file(file_path): - try: - with open(file_path, "rb") as f: - contents = f.read() - if re.search(pattern, contents): - print("found through filecontent") - match_list.append(name) - else: - print(f"No match in {file_path} for pattern: {pattern}") - except Exception as e: - print(f"Could not read file {file_path}: {e}") - # else: - # print("no elf, pe, or macho files") - return match_list - - # Delete all temp files after matches are found to keep dir clean? - - except FileNotFoundError: - print(f"File not found: {filename}") - return match_list - - -with open("/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json", "r") as f: - patterns = json.load(f) - - -library_name = find_native_match(patterns, "/Users/tenzing1/surfactant_new_venv/Surfactant/scripts/native_libraries/zlib1.dll") -print("Libs found: ", library_name) \ No newline at end of file diff --git a/surfactant/infoextractors/native_lib_file.py b/surfactant/infoextractors/native_lib_file.py index 2c6d7249..09770817 100644 --- a/surfactant/infoextractors/native_lib_file.py +++ b/surfactant/infoextractors/native_lib_file.py @@ -32,24 +32,33 @@ def extract_native_lib_info(filename): logger.warning(f"File not found: {native_lib_patterns}") return None - # Match based on filename + found_libraries = set() + + # Match based on filename filenames_list = match_by_attribute("filename", filename, database) if len(filenames_list) > 0: - #native_lib_info["nativeLibraries"] = filenames_list - native_lib_info["nativeLibraries"].extend(filenames_list) + for match in filenames_list: + library_name = match["library"] + if library_name not in found_libraries: + native_lib_info["nativeLibraries"].append(match) + found_libraries.add(library_name) - #Match based on filecontent + # Match based on filecontent try: with open(filename, "rb") as native_file: filecontent = native_file.read() filecontent_list = match_by_attribute("filecontent", filecontent, database) - #this overwrites the list, need to extend the list - #native_lib_info["nativeLibraries"] = filecontent_list - native_lib_info["nativeLibraries"].extend(filecontent_list) + # Extend the list and add the new libraries found + for match in filecontent_list: + library_name = match["library"] + if library_name not in found_libraries: + native_lib_info["nativeLibraries"].append(match) + found_libraries.add(library_name) except FileNotFoundError: logger.warning(f"File not found: {filename}") + return native_lib_info def match_by_attribute(attribute: str, content: str, database: Dict) -> List[Dict]: @@ -63,7 +72,6 @@ def match_by_attribute(attribute: str, content: str, database: Dict) -> List[Dic matches = re.search(pattern.encode('utf-8'), content) try: if matches: - #libs.append({"library": name, "version": matches.group(1)}) libs.append({"library": name}) except re.error as e: print(f"Invalid regex filename pattern '{pattern}': {e}") From 3189b0404019ebe5c9ae7ee1f6ee14fbdc6477eb Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Mon, 14 Oct 2024 14:18:43 -0700 Subject: [PATCH 25/42] deleted sample library From 747500ae43b21cd4d7600123febc0c4cbb01be7b Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Mon, 14 Oct 2024 15:00:16 -0700 Subject: [PATCH 26/42] delete example lib From 4037a7a6943e61faf2ca6a621a573b1010a6b922 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 22:18:30 +0000 Subject: [PATCH 27/42] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/js_libraries/match_javascript.py | 2 +- scripts/native_libraries/get_emba_db.py | 42 ++++++++++---------- surfactant/infoextractors/native_lib_file.py | 7 ++-- surfactant/plugin/manager.py | 4 +- 4 files changed, 29 insertions(+), 26 deletions(-) diff --git a/scripts/js_libraries/match_javascript.py b/scripts/js_libraries/match_javascript.py index d8aacda5..03128fa6 100644 --- a/scripts/js_libraries/match_javascript.py +++ b/scripts/js_libraries/match_javascript.py @@ -37,4 +37,4 @@ def find_js_match(expressions: dict, filename: str) -> str: patterns = json.load(f) library_name = find_js_match(patterns, "testFile.js") -print(library_name) \ No newline at end of file +print(library_name) diff --git a/scripts/native_libraries/get_emba_db.py b/scripts/native_libraries/get_emba_db.py index 6f5a829f..b1f7d4bc 100644 --- a/scripts/native_libraries/get_emba_db.py +++ b/scripts/native_libraries/get_emba_db.py @@ -1,54 +1,56 @@ import json + import requests -import os + def load_database(url): response = requests.get(url) response.raise_for_status() return response.text + def parse_cfg_file(content): database = {} lines = content.splitlines() filtered_lines = [] for line in lines: - if not (line.startswith('#') or line.startswith('identifier')): + if not (line.startswith("#") or line.startswith("identifier")): filtered_lines.append(line) - + for line in filtered_lines: line = line.strip() # Split by semicolons - fields = line.split(';') - + fields = line.split(";") + # Name of library lib_name = fields[0] - + # Empty filename because EMBA doesn't need filename patterns name_patterns = [] # Remove double quotes, if any-> 'grape' instead of '"grape"' - filecontent = fields[3].strip('"') if len(fields) > 3 else '' - + filecontent = fields[3].strip('"') if len(fields) > 3 else "" + # Create a dictionary for this entry and add it to the database - if fields[1] == '' or fields[1] == "strict": + if fields[1] == "" or fields[1] == "strict": if fields[1] == "strict": if lib_name not in database: database[lib_name] = { - 'filename': [lib_name], - 'filecontent': [], + "filename": [lib_name], + "filecontent": [], } - #else: + # else: # database[lib_name]['filecontent'].append(filecontent) else: if lib_name not in database: database[lib_name] = { - 'filename': name_patterns, - 'filecontent': [filecontent], + "filename": name_patterns, + "filecontent": [filecontent], } else: - database[lib_name]['filecontent'].append(filecontent) + database[lib_name]["filecontent"].append(filecontent) return database @@ -62,17 +64,17 @@ def parse_cfg_file(content): for key in parsed_data: filecontent_list = parsed_data[key]["filecontent"] - + # Remove leading ^ from each string in the filecontent list for i in range(len(filecontent_list)): - if filecontent_list[i].startswith('^'): + if filecontent_list[i].startswith("^"): filecontent_list[i] = filecontent_list[i][1:] - if filecontent_list[i].endswith('\\$'): + if filecontent_list[i].endswith("\\$"): pass else: - if filecontent_list[i].endswith('$'): + if filecontent_list[i].endswith("$"): filecontent_list[i] = filecontent_list[i][:-1] -with open(json_file_path, 'w') as json_file: +with open(json_file_path, "w") as json_file: json.dump(parsed_data, json_file, indent=4) diff --git a/surfactant/infoextractors/native_lib_file.py b/surfactant/infoextractors/native_lib_file.py index 09770817..8558aaff 100644 --- a/surfactant/infoextractors/native_lib_file.py +++ b/surfactant/infoextractors/native_lib_file.py @@ -7,7 +7,6 @@ import surfactant.plugin from surfactant.sbomtypes import SBOM, Software -from surfactant.filetypeid import id_magic def supports_file(filetype) -> bool: @@ -20,6 +19,7 @@ def extract_file_info(sbom: SBOM, software: Software, filename: str, filetype: s return None return extract_native_lib_info(filename) + def extract_native_lib_info(filename): native_lib_info: Dict[str, Any] = {"nativeLibraries": []} native_lib_patterns = pathlib.Path(__file__).parent / "native_lib_patterns.json" @@ -34,7 +34,7 @@ def extract_native_lib_info(filename): found_libraries = set() - # Match based on filename + # Match based on filename filenames_list = match_by_attribute("filename", filename, database) if len(filenames_list) > 0: for match in filenames_list: @@ -61,6 +61,7 @@ def extract_native_lib_info(filename): return native_lib_info + def match_by_attribute(attribute: str, content: str, database: Dict) -> List[Dict]: libs = [] for name, library in database.items(): @@ -69,7 +70,7 @@ def match_by_attribute(attribute: str, content: str, database: Dict) -> List[Dic if attribute == "filename": matches = re.search(pattern, content) else: - matches = re.search(pattern.encode('utf-8'), content) + matches = re.search(pattern.encode("utf-8"), content) try: if matches: libs.append({"library": name}) diff --git a/surfactant/plugin/manager.py b/surfactant/plugin/manager.py index c90b9d08..1936ff3b 100644 --- a/surfactant/plugin/manager.py +++ b/surfactant/plugin/manager.py @@ -23,9 +23,9 @@ def _register_plugins(pm: pluggy.PluginManager) -> None: java_file, js_file, mach_o_file, + native_lib_file, ole_file, pe_file, - native_lib_file ) from surfactant.input_readers import cytrics_reader from surfactant.output import ( @@ -63,7 +63,7 @@ def _register_plugins(pm: pluggy.PluginManager) -> None: cyclonedx_writer, spdx_writer, cytrics_reader, - native_lib_file + native_lib_file, ) for plugin in internal_plugins: pm.register(plugin) From 9ee1835c3d2b128bdfe54cd49bd11982399d66a7 Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Tue, 12 Nov 2024 18:25:49 -0800 Subject: [PATCH 28/42] works now with updated emba DB --- scripts/native_libraries/get_emba_db.py | 33 +++++++++++++++----- surfactant/infoextractors/native_lib_file.py | 8 +++-- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/scripts/native_libraries/get_emba_db.py b/scripts/native_libraries/get_emba_db.py index b1f7d4bc..6cf40384 100644 --- a/scripts/native_libraries/get_emba_db.py +++ b/scripts/native_libraries/get_emba_db.py @@ -1,7 +1,9 @@ import json +import os import requests +from surfactant.configmanager import ConfigManager def load_database(url): response = requests.get(url) @@ -20,6 +22,8 @@ def parse_cfg_file(content): for line in filtered_lines: line = line.strip() + if line.startswith("vx"): + print("this is line1: ", line) # Split by semicolons fields = line.split(";") @@ -30,9 +34,22 @@ def parse_cfg_file(content): # Empty filename because EMBA doesn't need filename patterns name_patterns = [] - # Remove double quotes, if any-> 'grape' instead of '"grape"' - filecontent = fields[3].strip('"') if len(fields) > 3 else "" + if line.startswith("vx"): + print("before strip: ", line) + # Remove double quotes, if any-> 'grape' instead of '"grape"' + # filecontent = fields[3].strip('"') if len(fields) > 3 else '' + # if filecontent.startswith("Vx"): + # print("after strip: ", filecontent) + + # Check if it starts with one double quote and ends with two double quotes + if fields[3].startswith('"') and fields[3].endswith('""'): + filecontent = fields[3][1:-1] + elif fields[3].endswith('""'): + filecontent = fields[3][:-1] + else: + filecontent = fields[3].strip('"') + # Create a dictionary for this entry and add it to the database if fields[1] == "" or fields[1] == "strict": if fields[1] == "strict": @@ -55,10 +72,11 @@ def parse_cfg_file(content): return database -url = "https://raw.githubusercontent.com/e-m-b-a/emba/master/config/bin_version_strings.cfg" -json_file_path = "/Users/tenzing1/surfactant_new_venv/Surfactant/surfactant/infoextractors/native_lib_patterns.json" +emba_database_url = "https://raw.githubusercontent.com/e-m-b-a/emba/master/config/bin_version_strings.cfg" +json_file_path = ConfigManager().get_data_dir_path() / "native_lib_patterns"/ "emba.json" +print("this is json file path: ", json_file_path) -file_content = load_database(url) +file_content = load_database(emba_database_url) parsed_data = parse_cfg_file(file_content) @@ -76,5 +94,6 @@ def parse_cfg_file(content): if filecontent_list[i].endswith("$"): filecontent_list[i] = filecontent_list[i][:-1] -with open(json_file_path, "w") as json_file: - json.dump(parsed_data, json_file, indent=4) +os.makedirs(os.path.dirname(json_file_path), exist_ok=True) +with open(json_file_path, 'w') as json_file: + json.dump(parsed_data, json_file, indent=4) \ No newline at end of file diff --git a/surfactant/infoextractors/native_lib_file.py b/surfactant/infoextractors/native_lib_file.py index 8558aaff..d3bd69a9 100644 --- a/surfactant/infoextractors/native_lib_file.py +++ b/surfactant/infoextractors/native_lib_file.py @@ -7,6 +7,8 @@ import surfactant.plugin from surfactant.sbomtypes import SBOM, Software +from surfactant.configmanager import ConfigManager +from surfactant.filetypeid import id_magic def supports_file(filetype) -> bool: @@ -22,7 +24,8 @@ def extract_file_info(sbom: SBOM, software: Software, filename: str, filetype: s def extract_native_lib_info(filename): native_lib_info: Dict[str, Any] = {"nativeLibraries": []} - native_lib_patterns = pathlib.Path(__file__).parent / "native_lib_patterns.json" + #native_lib_patterns = pathlib.Path(__file__).parent / "native_lib_patterns.json" + native_lib_patterns = ConfigManager().get_data_dir_path() / "native_lib_patterns" / "emba.json" # Load regex patterns into database var try: @@ -70,7 +73,8 @@ def match_by_attribute(attribute: str, content: str, database: Dict) -> List[Dic if attribute == "filename": matches = re.search(pattern, content) else: - matches = re.search(pattern.encode("utf-8"), content) + print(f"problem pattern: {pattern}") + matches = re.search(pattern.encode('utf-8'), content) try: if matches: libs.append({"library": name}) From 43f2fdf053102da2a86d3cf828e17dc554aa17f1 Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Mon, 25 Nov 2024 00:41:48 -0800 Subject: [PATCH 29/42] make separate entries for isLibrary and containsLibrary --- scripts/native_libraries/get_emba_db.py | 35 ++++--------- surfactant/infoextractors/native_lib_file.py | 52 +++++++++++++++----- 2 files changed, 51 insertions(+), 36 deletions(-) diff --git a/scripts/native_libraries/get_emba_db.py b/scripts/native_libraries/get_emba_db.py index 6cf40384..a101973f 100644 --- a/scripts/native_libraries/get_emba_db.py +++ b/scripts/native_libraries/get_emba_db.py @@ -22,8 +22,6 @@ def parse_cfg_file(content): for line in filtered_lines: line = line.strip() - if line.startswith("vx"): - print("this is line1: ", line) # Split by semicolons fields = line.split(";") @@ -34,14 +32,6 @@ def parse_cfg_file(content): # Empty filename because EMBA doesn't need filename patterns name_patterns = [] - if line.startswith("vx"): - print("before strip: ", line) - - # Remove double quotes, if any-> 'grape' instead of '"grape"' - # filecontent = fields[3].strip('"') if len(fields) > 3 else '' - # if filecontent.startswith("Vx"): - # print("after strip: ", filecontent) - # Check if it starts with one double quote and ends with two double quotes if fields[3].startswith('"') and fields[3].endswith('""'): filecontent = fields[3][1:-1] @@ -58,8 +48,6 @@ def parse_cfg_file(content): "filename": [lib_name], "filecontent": [], } - # else: - # database[lib_name]['filecontent'].append(filecontent) else: if lib_name not in database: database[lib_name] = { @@ -71,28 +59,25 @@ def parse_cfg_file(content): return database - -emba_database_url = "https://raw.githubusercontent.com/e-m-b-a/emba/master/config/bin_version_strings.cfg" +# Use database from specific commit +emba_database_url = "https://raw.githubusercontent.com/e-m-b-a/emba/11d6c281189c3a14fc56f243859b0bccccce8b9a/config/bin_version_strings.cfg" json_file_path = ConfigManager().get_data_dir_path() / "native_lib_patterns"/ "emba.json" -print("this is json file path: ", json_file_path) file_content = load_database(emba_database_url) parsed_data = parse_cfg_file(file_content) -for key in parsed_data: - filecontent_list = parsed_data[key]["filecontent"] +for key, value in parsed_data.items(): + filecontent_list = value["filecontent"] # Remove leading ^ from each string in the filecontent list - for i in range(len(filecontent_list)): - if filecontent_list[i].startswith("^"): - filecontent_list[i] = filecontent_list[i][1:] + for i, content in enumerate(filecontent_list): # Use enumerate to get index and value + if content.startswith("^"): + filecontent_list[i] = content[1:] - if filecontent_list[i].endswith("\\$"): - pass - else: - if filecontent_list[i].endswith("$"): - filecontent_list[i] = filecontent_list[i][:-1] + if not content.endswith("\\$"): + if content.endswith("$"): + filecontent_list[i] = content[:-1] os.makedirs(os.path.dirname(json_file_path), exist_ok=True) with open(json_file_path, 'w') as json_file: diff --git a/surfactant/infoextractors/native_lib_file.py b/surfactant/infoextractors/native_lib_file.py index d3bd69a9..c222796a 100644 --- a/surfactant/infoextractors/native_lib_file.py +++ b/surfactant/infoextractors/native_lib_file.py @@ -24,7 +24,6 @@ def extract_file_info(sbom: SBOM, software: Software, filename: str, filetype: s def extract_native_lib_info(filename): native_lib_info: Dict[str, Any] = {"nativeLibraries": []} - #native_lib_patterns = pathlib.Path(__file__).parent / "native_lib_patterns.json" native_lib_patterns = ConfigManager().get_data_dir_path() / "native_lib_patterns" / "emba.json" # Load regex patterns into database var @@ -36,14 +35,16 @@ def extract_native_lib_info(filename): return None found_libraries = set() + library_names = [] + contains_library_names = [] # Match based on filename filenames_list = match_by_attribute("filename", filename, database) if len(filenames_list) > 0: for match in filenames_list: - library_name = match["library"] + library_name = match["isLibrary"] if library_name not in found_libraries: - native_lib_info["nativeLibraries"].append(match) + library_names.append(library_name) # Collect library names found_libraries.add(library_name) # Match based on filecontent @@ -54,30 +55,59 @@ def extract_native_lib_info(filename): # Extend the list and add the new libraries found for match in filecontent_list: - library_name = match["library"] + library_name = match["containsLibrary"] if library_name not in found_libraries: - native_lib_info["nativeLibraries"].append(match) + contains_library_names.append(library_name) # Collect containsLibrary names found_libraries.add(library_name) except FileNotFoundError: logger.warning(f"File not found: {filename}") + # Create the single entry for isLibrary + if library_names: + native_lib_info["nativeLibraries"].append({ + "isLibrary": library_names # Store all libraries in a list under isLibrary + }) + + # Create the single entry for containsLibrary + if contains_library_names: + native_lib_info["nativeLibraries"].append({ + "containsLibrary": contains_library_names # Store all containsLibrary in a list + }) + return native_lib_info + + + + + + + + + + + def match_by_attribute(attribute: str, content: str, database: Dict) -> List[Dict]: libs = [] for name, library in database.items(): + # name: lspci + # library: {'filename': [], 'filecontent': ['lspci\\ version\\ [0-9](\\.[0-9]+)+?']} if attribute in library: for pattern in library[attribute]: if attribute == "filename": matches = re.search(pattern, content) - else: - print(f"problem pattern: {pattern}") + if matches: + libs.append({"isLibrary": name}) + #else: + elif attribute == "filecontent": matches = re.search(pattern.encode('utf-8'), content) - try: if matches: - libs.append({"library": name}) - except re.error as e: - print(f"Invalid regex filename pattern '{pattern}': {e}") + libs.append({"containsLibrary": name}) + # try: + # if matches: + # libs.append({"library": name}) + # # except re.error as e: + # # print(f"Invalid regex filename pattern '{pattern}': {e}") return libs From 8e375133acd01b1a0163f3ed970d7c38ff1a722d Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Mon, 25 Nov 2024 01:58:44 -0800 Subject: [PATCH 30/42] cleaning up code --- surfactant/infoextractors/native_lib_file.py | 26 +++----------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/surfactant/infoextractors/native_lib_file.py b/surfactant/infoextractors/native_lib_file.py index c222796a..b44b0185 100644 --- a/surfactant/infoextractors/native_lib_file.py +++ b/surfactant/infoextractors/native_lib_file.py @@ -44,7 +44,7 @@ def extract_native_lib_info(filename): for match in filenames_list: library_name = match["isLibrary"] if library_name not in found_libraries: - library_names.append(library_name) # Collect library names + library_names.append(library_name) found_libraries.add(library_name) # Match based on filecontent @@ -57,7 +57,7 @@ def extract_native_lib_info(filename): for match in filecontent_list: library_name = match["containsLibrary"] if library_name not in found_libraries: - contains_library_names.append(library_name) # Collect containsLibrary names + contains_library_names.append(library_name) found_libraries.add(library_name) except FileNotFoundError: @@ -66,34 +66,21 @@ def extract_native_lib_info(filename): # Create the single entry for isLibrary if library_names: native_lib_info["nativeLibraries"].append({ - "isLibrary": library_names # Store all libraries in a list under isLibrary + "isLibrary": library_names }) # Create the single entry for containsLibrary if contains_library_names: native_lib_info["nativeLibraries"].append({ - "containsLibrary": contains_library_names # Store all containsLibrary in a list + "containsLibrary": contains_library_names }) return native_lib_info - - - - - - - - - - - def match_by_attribute(attribute: str, content: str, database: Dict) -> List[Dict]: libs = [] for name, library in database.items(): - # name: lspci - # library: {'filename': [], 'filecontent': ['lspci\\ version\\ [0-9](\\.[0-9]+)+?']} if attribute in library: for pattern in library[attribute]: if attribute == "filename": @@ -105,9 +92,4 @@ def match_by_attribute(attribute: str, content: str, database: Dict) -> List[Dic matches = re.search(pattern.encode('utf-8'), content) if matches: libs.append({"containsLibrary": name}) - # try: - # if matches: - # libs.append({"library": name}) - # # except re.error as e: - # # print(f"Invalid regex filename pattern '{pattern}': {e}") return libs From 7d5718d145a48de6d3d8abbb809e2227101a1299 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 10:01:21 +0000 Subject: [PATCH 31/42] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/native_libraries/get_emba_db.py | 28 +++++++++++--------- surfactant/infoextractors/native_lib_file.py | 16 ++++------- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/scripts/native_libraries/get_emba_db.py b/scripts/native_libraries/get_emba_db.py index a101973f..8992fdd1 100644 --- a/scripts/native_libraries/get_emba_db.py +++ b/scripts/native_libraries/get_emba_db.py @@ -1,10 +1,11 @@ import json - import os + import requests from surfactant.configmanager import ConfigManager + def load_database(url): response = requests.get(url) response.raise_for_status() @@ -34,12 +35,12 @@ def parse_cfg_file(content): # Check if it starts with one double quote and ends with two double quotes if fields[3].startswith('"') and fields[3].endswith('""'): - filecontent = fields[3][1:-1] + filecontent = fields[3][1:-1] elif fields[3].endswith('""'): - filecontent = fields[3][:-1] + filecontent = fields[3][:-1] else: - filecontent = fields[3].strip('"') - + filecontent = fields[3].strip('"') + # Create a dictionary for this entry and add it to the database if fields[1] == "" or fields[1] == "strict": if fields[1] == "strict": @@ -59,9 +60,10 @@ def parse_cfg_file(content): return database + # Use database from specific commit emba_database_url = "https://raw.githubusercontent.com/e-m-b-a/emba/11d6c281189c3a14fc56f243859b0bccccce8b9a/config/bin_version_strings.cfg" -json_file_path = ConfigManager().get_data_dir_path() / "native_lib_patterns"/ "emba.json" +json_file_path = ConfigManager().get_data_dir_path() / "native_lib_patterns" / "emba.json" file_content = load_database(emba_database_url) @@ -72,13 +74,13 @@ def parse_cfg_file(content): # Remove leading ^ from each string in the filecontent list for i, content in enumerate(filecontent_list): # Use enumerate to get index and value - if content.startswith("^"): - filecontent_list[i] = content[1:] + if content.startswith("^"): + filecontent_list[i] = content[1:] - if not content.endswith("\\$"): - if content.endswith("$"): - filecontent_list[i] = content[:-1] + if not content.endswith("\\$"): + if content.endswith("$"): + filecontent_list[i] = content[:-1] os.makedirs(os.path.dirname(json_file_path), exist_ok=True) -with open(json_file_path, 'w') as json_file: - json.dump(parsed_data, json_file, indent=4) \ No newline at end of file +with open(json_file_path, "w") as json_file: + json.dump(parsed_data, json_file, indent=4) diff --git a/surfactant/infoextractors/native_lib_file.py b/surfactant/infoextractors/native_lib_file.py index b44b0185..8e02814a 100644 --- a/surfactant/infoextractors/native_lib_file.py +++ b/surfactant/infoextractors/native_lib_file.py @@ -1,14 +1,12 @@ import json -import pathlib import re from typing import Any, Dict, List from loguru import logger import surfactant.plugin -from surfactant.sbomtypes import SBOM, Software from surfactant.configmanager import ConfigManager -from surfactant.filetypeid import id_magic +from surfactant.sbomtypes import SBOM, Software def supports_file(filetype) -> bool: @@ -65,15 +63,11 @@ def extract_native_lib_info(filename): # Create the single entry for isLibrary if library_names: - native_lib_info["nativeLibraries"].append({ - "isLibrary": library_names - }) + native_lib_info["nativeLibraries"].append({"isLibrary": library_names}) # Create the single entry for containsLibrary if contains_library_names: - native_lib_info["nativeLibraries"].append({ - "containsLibrary": contains_library_names - }) + native_lib_info["nativeLibraries"].append({"containsLibrary": contains_library_names}) return native_lib_info @@ -87,9 +81,9 @@ def match_by_attribute(attribute: str, content: str, database: Dict) -> List[Dic matches = re.search(pattern, content) if matches: libs.append({"isLibrary": name}) - #else: + # else: elif attribute == "filecontent": - matches = re.search(pattern.encode('utf-8'), content) + matches = re.search(pattern.encode("utf-8"), content) if matches: libs.append({"containsLibrary": name}) return libs From 33f7ac8b1d86f6abee94927759c13bfaf3400c3b Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Mon, 25 Nov 2024 02:13:59 -0800 Subject: [PATCH 32/42] fixing pylint errors --- scripts/native_libraries/get_emba_db.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/native_libraries/get_emba_db.py b/scripts/native_libraries/get_emba_db.py index 8992fdd1..39710367 100644 --- a/scripts/native_libraries/get_emba_db.py +++ b/scripts/native_libraries/get_emba_db.py @@ -69,17 +69,17 @@ def parse_cfg_file(content): parsed_data = parse_cfg_file(file_content) -for key, value in parsed_data.items(): +for _, value in parsed_data.items(): filecontent_list = value["filecontent"] # Remove leading ^ from each string in the filecontent list - for i, content in enumerate(filecontent_list): # Use enumerate to get index and value - if content.startswith("^"): - filecontent_list[i] = content[1:] + for i, pattern in enumerate(filecontent_list): # Use enumerate to get index and value + if pattern.startswith("^"): + filecontent_list[i] = pattern[1:] - if not content.endswith("\\$"): - if content.endswith("$"): - filecontent_list[i] = content[:-1] + if not pattern.endswith("\\$"): + if pattern.endswith("$"): + filecontent_list[i] = pattern[:-1] os.makedirs(os.path.dirname(json_file_path), exist_ok=True) with open(json_file_path, "w") as json_file: From b95d42e9717e3611bf7a1a91d2abc935329a1bdf Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 10:28:29 +0000 Subject: [PATCH 33/42] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/native_libraries/get_emba_db.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/native_libraries/get_emba_db.py b/scripts/native_libraries/get_emba_db.py index 39710367..f7be87a0 100644 --- a/scripts/native_libraries/get_emba_db.py +++ b/scripts/native_libraries/get_emba_db.py @@ -74,12 +74,12 @@ def parse_cfg_file(content): # Remove leading ^ from each string in the filecontent list for i, pattern in enumerate(filecontent_list): # Use enumerate to get index and value - if pattern.startswith("^"): - filecontent_list[i] = pattern[1:] + if pattern.startswith("^"): + filecontent_list[i] = pattern[1:] - if not pattern.endswith("\\$"): - if pattern.endswith("$"): - filecontent_list[i] = pattern[:-1] + if not pattern.endswith("\\$"): + if pattern.endswith("$"): + filecontent_list[i] = pattern[:-1] os.makedirs(os.path.dirname(json_file_path), exist_ok=True) with open(json_file_path, "w") as json_file: From c9b9793d7d9952af5e9578e141c90026e1d552ff Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Mon, 25 Nov 2024 02:40:37 -0800 Subject: [PATCH 34/42] fixing precommit errors --- scripts/native_libraries/get_emba_db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/native_libraries/get_emba_db.py b/scripts/native_libraries/get_emba_db.py index f7be87a0..83a10eb1 100644 --- a/scripts/native_libraries/get_emba_db.py +++ b/scripts/native_libraries/get_emba_db.py @@ -61,7 +61,7 @@ def parse_cfg_file(content): return database -# Use database from specific commit +# Use database from this specific commit emba_database_url = "https://raw.githubusercontent.com/e-m-b-a/emba/11d6c281189c3a14fc56f243859b0bccccce8b9a/config/bin_version_strings.cfg" json_file_path = ConfigManager().get_data_dir_path() / "native_lib_patterns" / "emba.json" From edc0d64df88d38f2f7f551ee4507323405b7845d Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Sun, 1 Dec 2024 23:20:37 -0800 Subject: [PATCH 35/42] add short_name hookimpl and move loading databse outside of hook --- surfactant/infoextractors/native_lib_file.py | 30 ++++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/surfactant/infoextractors/native_lib_file.py b/surfactant/infoextractors/native_lib_file.py index 8e02814a..afbd43d7 100644 --- a/surfactant/infoextractors/native_lib_file.py +++ b/surfactant/infoextractors/native_lib_file.py @@ -1,6 +1,6 @@ import json import re -from typing import Any, Dict, List +from typing import Any, Dict, List, Optional from loguru import logger @@ -9,6 +9,25 @@ from surfactant.sbomtypes import SBOM, Software +@surfactant.plugin.hookimpl +def short_name() -> Optional[str]: + return "native_lib_patterns" + + +def load_pattern_db(): + # Load regex patterns into database var + try: + with open(native_lib_patterns, "r") as regex: + database = json.load(regex) + return database + except FileNotFoundError: + logger.warning(f"File not found for native library detection: {native_lib_patterns}") + return None + +# Load the pattern database once at module import +native_lib_patterns = ConfigManager().get_data_dir_path() / "native_lib_patterns" / "emba.json" +database = load_pattern_db() + def supports_file(filetype) -> bool: return filetype in ("PE", "ELF", "MACHOFAT", "MACHOFAT64", "MACHO32", "MACHO64") @@ -22,14 +41,7 @@ def extract_file_info(sbom: SBOM, software: Software, filename: str, filetype: s def extract_native_lib_info(filename): native_lib_info: Dict[str, Any] = {"nativeLibraries": []} - native_lib_patterns = ConfigManager().get_data_dir_path() / "native_lib_patterns" / "emba.json" - - # Load regex patterns into database var - try: - with open(native_lib_patterns, "r") as regex: - database = json.load(regex) - except FileNotFoundError: - logger.warning(f"File not found: {native_lib_patterns}") + if not database: return None found_libraries = set() From 3813f5ced25172fbc795764dc0e7308150e4d8ba Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Sun, 1 Dec 2024 23:52:31 -0800 Subject: [PATCH 36/42] fixing linter errors --- surfactant/infoextractors/native_lib_file.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/surfactant/infoextractors/native_lib_file.py b/surfactant/infoextractors/native_lib_file.py index afbd43d7..3e9c0998 100644 --- a/surfactant/infoextractors/native_lib_file.py +++ b/surfactant/infoextractors/native_lib_file.py @@ -18,8 +18,8 @@ def load_pattern_db(): # Load regex patterns into database var try: with open(native_lib_patterns, "r") as regex: - database = json.load(regex) - return database + emba_patterns = json.load(regex) + return emba_patterns except FileNotFoundError: logger.warning(f"File not found for native library detection: {native_lib_patterns}") return None @@ -84,9 +84,9 @@ def extract_native_lib_info(filename): return native_lib_info -def match_by_attribute(attribute: str, content: str, database: Dict) -> List[Dict]: +def match_by_attribute(attribute: str, content: str, patterns_database: Dict) -> List[Dict]: libs = [] - for name, library in database.items(): + for name, library in patterns_database.items(): if attribute in library: for pattern in library[attribute]: if attribute == "filename": From eead4ed50dc39bb48a5715cc2c1d8b49e9536938 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 08:08:27 +0000 Subject: [PATCH 37/42] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- surfactant/infoextractors/native_lib_file.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/surfactant/infoextractors/native_lib_file.py b/surfactant/infoextractors/native_lib_file.py index 3e9c0998..840a8402 100644 --- a/surfactant/infoextractors/native_lib_file.py +++ b/surfactant/infoextractors/native_lib_file.py @@ -24,10 +24,12 @@ def load_pattern_db(): logger.warning(f"File not found for native library detection: {native_lib_patterns}") return None + # Load the pattern database once at module import native_lib_patterns = ConfigManager().get_data_dir_path() / "native_lib_patterns" / "emba.json" database = load_pattern_db() + def supports_file(filetype) -> bool: return filetype in ("PE", "ELF", "MACHOFAT", "MACHOFAT64", "MACHO32", "MACHO64") From 407f1f24f65324474ae52f3522e2408bc6d16d4d Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Mon, 16 Dec 2024 02:27:19 -0800 Subject: [PATCH 38/42] switching file name matching --- scripts/native_libraries/get_emba_db.py | 20 +++++++++++++------- surfactant/infoextractors/native_lib_file.py | 9 +++++---- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/scripts/native_libraries/get_emba_db.py b/scripts/native_libraries/get_emba_db.py index 83a10eb1..450611d0 100644 --- a/scripts/native_libraries/get_emba_db.py +++ b/scripts/native_libraries/get_emba_db.py @@ -1,4 +1,5 @@ import json +import re import os import requests @@ -42,6 +43,7 @@ def parse_cfg_file(content): filecontent = fields[3].strip('"') # Create a dictionary for this entry and add it to the database + # Strict mode is deprecated so those entries will be matched just by filename if fields[1] == "" or fields[1] == "strict": if fields[1] == "strict": if lib_name not in database: @@ -50,13 +52,17 @@ def parse_cfg_file(content): "filecontent": [], } else: - if lib_name not in database: - database[lib_name] = { - "filename": name_patterns, - "filecontent": [filecontent], - } - else: - database[lib_name]["filecontent"].append(filecontent) + try: + re.search(filecontent.encode("utf-8"), b"") + if lib_name not in database: + database[lib_name] = { + "filename": name_patterns, + "filecontent": [filecontent], + } + else: + database[lib_name]["filecontent"].append(filecontent) + except re.error as e: + print(f"Error parsing file content regexp {filecontent}: {e}") return database diff --git a/surfactant/infoextractors/native_lib_file.py b/surfactant/infoextractors/native_lib_file.py index 840a8402..6077d801 100644 --- a/surfactant/infoextractors/native_lib_file.py +++ b/surfactant/infoextractors/native_lib_file.py @@ -1,5 +1,6 @@ import json import re +import os from typing import Any, Dict, List, Optional from loguru import logger @@ -51,7 +52,8 @@ def extract_native_lib_info(filename): contains_library_names = [] # Match based on filename - filenames_list = match_by_attribute("filename", filename, database) + base_filename = os.path.basename(filename) + filenames_list = match_by_attribute("filename", base_filename, database) if len(filenames_list) > 0: for match in filenames_list: library_name = match["isLibrary"] @@ -92,10 +94,9 @@ def match_by_attribute(attribute: str, content: str, patterns_database: Dict) -> if attribute in library: for pattern in library[attribute]: if attribute == "filename": - matches = re.search(pattern, content) - if matches: + if name == content: libs.append({"isLibrary": name}) - # else: + elif attribute == "filecontent": matches = re.search(pattern.encode("utf-8"), content) if matches: From 689608d553d0cb026056dd715956e83c6dcca7fc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 10:36:22 +0000 Subject: [PATCH 39/42] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/native_libraries/get_emba_db.py | 2 +- surfactant/infoextractors/native_lib_file.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/native_libraries/get_emba_db.py b/scripts/native_libraries/get_emba_db.py index 450611d0..8c37b53a 100644 --- a/scripts/native_libraries/get_emba_db.py +++ b/scripts/native_libraries/get_emba_db.py @@ -1,6 +1,6 @@ import json -import re import os +import re import requests diff --git a/surfactant/infoextractors/native_lib_file.py b/surfactant/infoextractors/native_lib_file.py index 6077d801..ae63c32a 100644 --- a/surfactant/infoextractors/native_lib_file.py +++ b/surfactant/infoextractors/native_lib_file.py @@ -1,6 +1,6 @@ import json -import re import os +import re from typing import Any, Dict, List, Optional from loguru import logger @@ -96,7 +96,7 @@ def match_by_attribute(attribute: str, content: str, patterns_database: Dict) -> if attribute == "filename": if name == content: libs.append({"isLibrary": name}) - + elif attribute == "filecontent": matches = re.search(pattern.encode("utf-8"), content) if matches: From abbe59266570297da26978881e8e83b5f51aafa1 Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Mon, 16 Dec 2024 12:08:22 -0800 Subject: [PATCH 40/42] updating filename string comparison --- surfactant/configmanager.py | 2 +- surfactant/infoextractors/native_lib_file.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/surfactant/configmanager.py b/surfactant/configmanager.py index 7ee69b3a..c8c4214c 100644 --- a/surfactant/configmanager.py +++ b/surfactant/configmanager.py @@ -153,4 +153,4 @@ def get_data_dir_path(self) -> Path: else: data_dir = Path(os.getenv("XDG_DATA_HOME", str(Path("~/.local/share")))) data_dir = data_dir / self.app_name - return data_dir + return data_dir \ No newline at end of file diff --git a/surfactant/infoextractors/native_lib_file.py b/surfactant/infoextractors/native_lib_file.py index ae63c32a..028c687d 100644 --- a/surfactant/infoextractors/native_lib_file.py +++ b/surfactant/infoextractors/native_lib_file.py @@ -94,7 +94,7 @@ def match_by_attribute(attribute: str, content: str, patterns_database: Dict) -> if attribute in library: for pattern in library[attribute]: if attribute == "filename": - if name == content: + if name.lower() == content.lower(): libs.append({"isLibrary": name}) elif attribute == "filecontent": From ef0919fdef8a731fe262c79475d605772645ef1d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 20:08:43 +0000 Subject: [PATCH 41/42] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- surfactant/configmanager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/surfactant/configmanager.py b/surfactant/configmanager.py index c8c4214c..7ee69b3a 100644 --- a/surfactant/configmanager.py +++ b/surfactant/configmanager.py @@ -153,4 +153,4 @@ def get_data_dir_path(self) -> Path: else: data_dir = Path(os.getenv("XDG_DATA_HOME", str(Path("~/.local/share")))) data_dir = data_dir / self.app_name - return data_dir \ No newline at end of file + return data_dir From 1126d3cc997e15a635f70a31330ae02850702eb8 Mon Sep 17 00:00:00 2001 From: Wangmo Tenzing Date: Tue, 17 Dec 2024 10:36:37 -0800 Subject: [PATCH 42/42] updating var names for clarity --- surfactant/infoextractors/native_lib_file.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/surfactant/infoextractors/native_lib_file.py b/surfactant/infoextractors/native_lib_file.py index 028c687d..b25b9e19 100644 --- a/surfactant/infoextractors/native_lib_file.py +++ b/surfactant/infoextractors/native_lib_file.py @@ -90,15 +90,15 @@ def extract_native_lib_info(filename): def match_by_attribute(attribute: str, content: str, patterns_database: Dict) -> List[Dict]: libs = [] - for name, library in patterns_database.items(): - if attribute in library: - for pattern in library[attribute]: + for lib_name, lib_info in patterns_database.items(): + if attribute in lib_info: + for pattern in lib_info[attribute]: if attribute == "filename": - if name.lower() == content.lower(): - libs.append({"isLibrary": name}) + if pattern.lower() == content.lower(): + libs.append({"isLibrary": lib_name}) elif attribute == "filecontent": matches = re.search(pattern.encode("utf-8"), content) if matches: - libs.append({"containsLibrary": name}) + libs.append({"containsLibrary": lib_name}) return libs