Documentation ¶
Overview ¶
Package portchecks provides types and functions used by this application to check access to one or more remote ports.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UniquePorts ¶
UniquePorts accepts one or more ports of potentially duplicated ports and returns a slice of unique ports
Types ¶
type Result ¶
Result is the outcome of a port check.
func CheckPort ¶
CheckPort accepts a net.Addr interface type and a timeout. A connection check is performed to determine whether the port is reachable. The result of this check is returned as a Result value for later processing. Any errors which occur as part of this check are recorded as a partial check Result.
type Results ¶
type Results []Result
Results is a collection of port check results. Intended for aggregation before bulk processing of some kind.
func (Results) HostsReachable ¶
HostsReachable returns the number of hosts with at least one open port.
func (Results) PortsReachable ¶
PortsReachable returns the number of open ports found.
func (Results) PortsScanned ¶
PortsScanned returns the total port scan attempts in the results set.
func (Results) PrintSummary ¶
func (rs Results) PrintSummary()
PrintSummary generates a table of all collected port check results