Documentation
¶
Overview ¶
Package netports extracts open ports on the system and maps them to running processes when possible.
Index ¶
Constants ¶
View Source
const (
// Name is the unique name of this extractor.
Name = "os/netports"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Extractor ¶
type Extractor struct{}
Extractor extracts open ports on the system.
func (Extractor) Extract ¶
func (e Extractor) Extract(ctx context.Context, input *standalone.ScanInput) (inventory.Inventory, error)
Extract extracts open ports on the system.
func (Extractor) Requirements ¶
func (e Extractor) Requirements() *plugin.Capabilities
Requirements of the extractor.
type Metadata ¶
type Metadata struct {
// The port number.
Port uint32
// The protocol (tcp, udp).
Protocol string
// The command line of the process listening on the port, if available.
Cmdline string
}
Metadata contains metadata about a given open port.
func ToStruct ¶ added in v0.3.2
func ToStruct(m *pb.NetportsMetadata) *Metadata
ToStruct converts the NetportsMetadata proto to a Metadata struct.
Click to show internal directories.
Click to hide internal directories.