Documentation ¶
Overview ¶
Package data provides data types used throughout the application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControlMessage ¶
type ControlMessage int
ControlMessage is a symbolic constant signifying a message send to the Nexus.
const ( CtlMsgStop ControlMessage = iota CtlMsgShutdown CtlMsgStatus CtlMsgSpawn CtlMsgBye )
CtlMsgStop tells the Nexus to shut down. CtlMsgStatus asks the Nexus for information on its current status.
type Host ¶
type Host struct { ID krylib.ID Source HostSource Address net.IP Name string Added time.Time OS string Location string }
Host is a host somewhere on the Internet.
type HostSource ¶
type HostSource int
HostSource indicates how a Host ended up in the database.
const ( HostSourceUser HostSource = iota HostSourceGen HostSourceA HostSourceMx HostSourceNs )
HostSourceUser indicates a host was manually added by the user. HostSourceGen indicates it was added by the HostGenerator. HostSourceA indicates it was gathered from an address record in a zone transfer. HostSourceMx and HostSourceNs indicate a Host was gathered from the respective records in a zone transfer.
type HostWithPorts ¶
HostWithPorts is a Host along with all the Ports that have been scanned on that Host.
type Port ¶
Port is a TCP/UDP port that was scanned on a given host.
func (*Port) ReplyString ¶
ReplyString returns the Reply gathered from the Port or an empty string.
type ScanRequest ¶
ScanRequest is a request to scan a specific port on a given host
type ScanResult ¶
ScanResult represents the result of scanning a single port.
func (*ScanResult) Address ¶
func (res *ScanResult) Address() string
Address returns the IP address of the scanned host as a string.
func (*ScanResult) HostName ¶
func (res *ScanResult) HostName() string
HostName returns the hostname of the scanned Host.
func (*ScanResult) ReplyString ¶
func (res *ScanResult) ReplyString() string
ReplyString returns the reply gathered from the scanned port.