Documentation ¶
Index ¶
Constants ¶
View Source
const UNKNOWN = "Unknown"
UNKNOWN default for unknown port
Variables ¶
View Source
var KNOWNPORTS = map[int]string{
27017: "mongodb [ http://www.mongodb.org/ ]",
28017: "mongodb web admin [ http://www.mongodb.org/ ]",
21: "ftp",
22: "SSH",
23: "telnet",
25: "SMTP",
66: "Oracle SQL*NET?",
69: "tftp",
80: "http",
88: "kerberos",
109: "pop2",
110: "pop3",
123: "ntp",
137: "netbios",
139: "netbios",
443: "https",
445: "Samba",
631: "cups",
5800: "VNC remote desktop",
194: "IRC",
118: "SQL service?",
150: "SQL-net?",
1433: "Microsoft SQL server",
1434: "Microsoft SQL monitor",
3306: "MySQL",
3396: "Novell NDPS Printer Agent",
3535: "SMTP (alternate)",
554: "RTSP",
9160: "Cassandra [ http://cassandra.apache.org/ ]",
8000: "Nodejs",
9200: "Elasticsearch",
5601: "Kibana",
}
KNOWNPORTS are sample known ports
Functions ¶
Types ¶
type Host ¶
type Host struct { Addr string `json:"addr"` IP string `json:"ip"` IsUp bool `json:"isup"` Ports []*Port `json:"ports"` Vendor string `json:"vendor"` OSInfo string `json:"osinfo"` Mac string `json:"mac"` TimeComplete float64 `json:"timecomplete"` }
Host contains the scan results and information about a host.
func (*Host) UpdateInfo ¶
UpdateInfo update info about result
func (*Host) UpdatePort ¶
UpdatePort add a port open to result
func (*Host) UpdateStatus ¶
UpdateStatus update host up or down
func (*Host) UpdateTimeComplete ¶
UpdateTimeComplete update time scan complete
type Port ¶
type Port struct { IsOpen bool `json:"isopen"` Number int `json:"number"` Service string `json:"service"` Description string `json:"description"` }
Port contains info about a port
type Scanner ¶
type Scanner struct { Host string Timeout time.Duration Concurrent *semaphore.Weighted Protocol string Result *Host }
Scanner is struct of scanner object
func NewScanner ¶
NewScanner constructor
func (*Scanner) SetConcurrent ¶
SetConcurrent set max goroutine for scanner
func (*Scanner) SetProtocol ¶
SetProtocol set protocol for scanner
func (*Scanner) SetTimeout ¶
SetTimeout set timeout for net.DialTimeout
Click to show internal directories.
Click to hide internal directories.