Documentation
¶
Overview ¶
Package scanner discovers devices on the local LAN. It does concurrent TCP-dial probes across a CIDR for a list of ports, plus optional ARP-table reads + HTTP banner grabs. No raw sockets — uses only stdlib net.Dial and `arp -a` / /proc/net/arp.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultPorts = []int{502, 1502, 8899, 6607, 80, 443, 1883, 8080}
DefaultPorts are common Modbus TCP and MQTT ports to scan.
Functions ¶
Types ¶
type ArpEntry ¶
type ArpEntry struct {
IP string `json:"ip"`
MAC string `json:"mac"`
OUI string `json:"oui,omitempty"`
}
ArpEntry represents a device found via ARP.
type HTTPBanner ¶
type HTTPBanner struct {
IP string `json:"ip"`
Port int `json:"port"`
StatusCode int `json:"status_code"`
ServerHeader string `json:"server_header,omitempty"`
Title string `json:"title,omitempty"`
BodySnippet string `json:"body_snippet,omitempty"`
}
HTTPBanner contains information gathered from an HTTP probe.
func HTTPProbe ¶
func HTTPProbe(ip string, port int) (*HTTPBanner, error)
HTTPProbe probes a single host:port for HTTP banners.
func HTTPProbeBatch ¶
func HTTPProbeBatch(hosts []Host) []HTTPBanner
HTTPProbeBatch probes multiple hosts for HTTP banners concurrently.
type Interface ¶
Interface represents a network interface with its subnets.
func GetInterfaces ¶
GetInterfaces returns all non-loopback network interfaces with IPv4 subnets.
Click to show internal directories.
Click to hide internal directories.