result

package
v2.6.1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 12 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMacAddress added in v2.3.6

func GetMacAddress(target string) (string, error)

GetMacAddress retrieves the MAC address for a given target (IP address or hostname). It resolves hostnames to IP addresses first, then queries the ARP table. Returns an empty string if the MAC address cannot be found.

Types

type HostResult

type HostResult struct {
	Host       string
	IP         string
	Ports      []*port.Port
	Confidence confidence.ConfidenceLevel
	OS         *OSFingerprint
	MacAddress string
}

type OSFingerprint added in v2.3.6

type OSFingerprint struct {
	Target     string
	DeviceType string
	Running    string
	OSCPE      string
	OSDetails  string
}

type Result

type Result struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Result of the scan

func NewResult

func NewResult() *Result

NewResult structure

func (*Result) AddIp

func (r *Result) AddIp(ip string)

AddIp adds an ip to the results

func (*Result) AddPort

func (r *Result) AddPort(ip string, p *port.Port)

AddPort to a specific ip

func (*Result) AddSkipped

func (r *Result) AddSkipped(ip string)

AddSkipped adds an ip to the skipped list

func (*Result) GetHostCountForPort added in v2.6.0

func (r *Result) GetHostCountForPort(portNum int) int

GetHostCountForPort returns the number of unique hosts that have a specific port open. Uses a single RLock, safe during concurrent writes.

func (*Result) GetIPs

func (r *Result) GetIPs() chan string

AddPort to a specific ip

func (*Result) GetIPsPorts

func (r *Result) GetIPsPorts() chan *HostResult

GetIpsPorts returns the ips and ports

func (*Result) GetOpenPortNumbers added in v2.6.0

func (r *Result) GetOpenPortNumbers() []int

GetOpenPortNumbers returns the deduplicated set of port numbers that have been found open across all hosts. It acquires a single RLock and releases it before returning. Safe to call while writers (ex. AddPort from TCPResultWorker) are active.

func (*Result) GetPortCount

func (r *Result) GetPortCount(host string) int

GetPortCount returns the number of ports discovered for an ip

func (*Result) HasIP

func (r *Result) HasIP(ip string) bool

HasIP checks if an ip has been seen

func (*Result) HasIPS

func (r *Result) HasIPS() bool

func (*Result) HasIPsPorts

func (r *Result) HasIPsPorts() bool

func (*Result) HasSkipped

func (r *Result) HasSkipped(ip string) bool

HasSkipped checks if an ip has been skipped

func (*Result) IPHasPort

func (r *Result) IPHasPort(ip string, p *port.Port) bool

IPHasPort checks if an ip has a specific port

func (*Result) IsEmpty

func (r *Result) IsEmpty() bool

func (*Result) Len

func (r *Result) Len() int

func (*Result) SetPorts

func (r *Result) SetPorts(ip string, ports []*port.Port)

SetPorts for a specific ip

func (*Result) UpdateHostOS added in v2.3.6

func (r *Result) UpdateHostOS(ip string, osfp *OSFingerprint)

UpdateHostOS updates the OS info for a given IP in the results

type ResultFn

type ResultFn func(*HostResult)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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