result

package
v2.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 12 Imported by: ? 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMacAddress

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

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) 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) 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

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