Documentation
¶
Overview ¶
ARP table helpers. Resolves IP addresses to MAC addresses by shelling out to the system arp command (works on macOS and Linux).
OS fingerprinting based on ICMP TTL values and open port patterns. Accepts a pre-captured TTL so the device only gets pinged once.
Vendor lookup backed by the macvendors.com API. Results are cached in memory and outgoing requests are serialised with a short delay to stay within the free-tier rate limit.
Network scanner. Probes every host in a CIDR range concurrently using TCP connect and ICMP ping, then resolves hostname, MAC, vendor, latency, open ports, and OS for each live device.
Wake-on-LAN. Sends a magic packet (6x 0xFF + 16x MAC) via UDP broadcast to port 9 to wake a sleeping device on the network.
Index ¶
- func DetectNetwork() (localIP string, cidr string, ifaceName string, err error)
- func FingerprintOS(openPorts []string, ttl int) string
- func LookupMAC(ip string) string
- func SendWOL(macAddr string) error
- type Device
- type DeviceFoundMsg
- type ErrMsg
- type ScanCompleteMsg
- type ScanProgressMsg
- type ScanStartMsg
- type Scanner
- type TickMsg
- type VendorLookup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetectNetwork ¶
func FingerprintOS ¶
Types ¶
type DeviceFoundMsg ¶
type DeviceFoundMsg struct{ Device Device }
type ScanCompleteMsg ¶
type ScanCompleteMsg struct{}
type ScanProgressMsg ¶
type ScanStartMsg ¶
type ScanStartMsg struct{}
type Scanner ¶
type Scanner struct {
Timeout time.Duration
Concurrency int
VendorLookup *VendorLookup
}
type VendorLookup ¶
type VendorLookup struct {
// contains filtered or unexported fields
}
func NewVendorLookup ¶
func NewVendorLookup() *VendorLookup
func (*VendorLookup) Lookup ¶
func (vl *VendorLookup) Lookup(mac string) string