result

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: AGPL-3.0 Imports: 10 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

type Host struct {
	IP       net.IP        `json:"ip"`
	Name     string        `json:"hostname,omitempty"`
	TCPPorts map[int]*Port `json:"tcp_ports,omitempty"`
	UDPPorts map[int]*Port `json:"udp_ports,omitempty"`
}

func (*Host) GetName added in v0.3.0

func (h *Host) GetName() string

func (*Host) IsExcluded added in v0.10.0

func (h *Host) IsExcluded(el []string) bool

func (*Host) NotInCIDR added in v0.11.0

func (h *Host) NotInCIDR(c *net.IPNet) bool

type Port

type Port struct {
	Name      string `json:"name,omitempty"`
	Product   string `json:"product,omitempty"`
	Version   string `json:"version,omitempty"`
	ExtraInfo string `json:"extra_info,omitempty"`
}

func (*Port) Update added in v0.5.0

func (p *Port) Update(portData *Port)

type Result

type Result struct {
	Logger  *cli.Logger
	Hosts   []*Host
	Exclude []string
	CIDR    *net.IPNet
}

func New

func New(logger *cli.Logger, exclude []string, cidr string) *Result

func (*Result) AddHost

func (r *Result) AddHost(newHost *Host)

func (*Result) Print

func (r *Result) Print()

Print prints all hosts and the details of their open ports

func (*Result) PrintAlive

func (r *Result) PrintAlive()

PrintAlive prints all hosts with at least one open port (-hosts)

func (*Result) PrintByPort

func (r *Result) PrintByPort(port []int)

PrintByPort prints all hosts with a specific port open (-port)

func (*Result) PrintByService

func (r *Result) PrintByService(service string)

PrintByService prints a specific service (-service)

func (*Result) PrintHost

func (r *Result) PrintHost(h *Host)

PrintHost prints the full host details for the requested host (-host)

func (*Result) PrintJSON

func (r *Result) PrintJSON()

func (*Result) PrintPortSummary

func (r *Result) PrintPortSummary()

PrintPortSummary prints a comma-delimited list of ports (-ports)

func (*Result) PrintServices

func (r *Result) PrintServices()

PrintService prints all services in host:port service format (-services)

func (*Result) PrintableIPList

func (r *Result) PrintableIPList(ips []net.IP) string

func (*Result) SortByIP added in v0.9.0

func (r *Result) SortByIP()

Jump to

Keyboard shortcuts

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