Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PortServices = map[int]string{
21: "FTP",
22: "SSH",
23: "Telnet",
25: "SMTP",
53: "DNS",
80: "HTTP",
110: "POP3",
135: "MSRPC",
139: "NetBIOS",
143: "IMAP",
443: "HTTPS",
445: "SMB",
993: "IMAPS",
995: "POP3S",
1433: "MSSQL",
1521: "Oracle",
3306: "MySQL",
3389: "RDP",
5000: "UPnP",
5001: "Synology",
5432: "PostgreSQL",
5900: "VNC",
6379: "Redis",
8080: "HTTP-Alt",
8443: "HTTPS-Alt",
8888: "HTTP-Alt2",
9090: "Prometheus",
9100: "Print",
27017: "MongoDB",
631: "IPP",
}
Common port to service name mapping
View Source
var TopPorts = []int{
21, 22, 23, 25, 53, 80, 110, 135, 139, 143,
443, 445, 993, 995, 1433, 1521, 3306, 3389,
5000, 5001, 5432, 5900, 6379, 8080, 8443,
8888, 9090, 9100, 27017, 631,
}
Top N common ports
Functions ¶
This section is empty.
Types ¶
type Host ¶
type Host struct {
IP string `json:"ip"`
MAC string `json:"mac"`
Vendor string `json:"vendor"`
Hostname string `json:"hostname"`
DeviceType string `json:"device_type"`
LatencyMs float64 `json:"latency_ms"`
Status HostStatus `json:"status"`
Ports []Port `json:"ports"`
FirstSeen time.Time `json:"first_seen"`
LastSeen time.Time `json:"last_seen"`
// Internal tracking
LatencyHistory []float64 `json:"-"`
MissedScans int `json:"-"`
IsGateway bool `json:"-"`
IsLocal bool `json:"-"`
}
type HostStatus ¶
type HostStatus string
const ( StatusOnline HostStatus = "online" StatusOffline HostStatus = "offline" )
type ScanResult ¶
type ScanState ¶
type ScanState struct {
Hosts map[string]*Host
Phase string
Progress float64
IsScanning bool
Interface string
Subnet string
LocalIP string
Gateway string
TotalHosts int
IsRoot bool
// contains filtered or unexported fields
}
func NewScanState ¶
func NewScanState() *ScanState
func (*ScanState) GetHostList ¶
func (*ScanState) UpdateHost ¶
Click to show internal directories.
Click to hide internal directories.