db

package
v0.16.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2026 License: BSD-3-Clause, GPL-3.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package db holds the vulnerability and exploit database handles used by the stream decoders.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(index Index)

Close closes index if it is set.

func Path

func Path(dbsFolder string) string

Path returns the netcap.sqlite path inside the given dbs folder.

func SetLogger

func SetLogger(l *zap.Logger)

SetLogger will set the logger for this package.

Types

type Index

type Index interface {
	Vulnerabilities(vendor, product, version string) ([]vulndb.Vulnerability, error)
	Exploits(vendor, product, version string) ([]vulndb.Exploit, error)
	Close() error
}

Index answers vulnerability and exploit lookups. *vulndb.DB implements it; tests substitute their own.

var (
	// VulnerabilitiesIndex serves the Vulnerability decoder.
	VulnerabilitiesIndex Index

	// ExploitsIndex serves the Exploit decoder.
	ExploitsIndex Index
)

func Open

func Open(path string) (Index, error)

Open opens the shared vulnerability database read-only.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL