Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Fields = map[string]func(h *host.Host) string{ "ID": func(h *host.Host) string { if h.Status.State == "up" { return color.HiGreenString(display.FormatSmallID(h.Id)) } return display.FormatSmallID(h.Id) }, "Hostnames": func(h *host.Host) string { var hostnames []string for _, hn := range h.Hostnames { hostnames = append(hostnames, hn.Name) } return strings.Join(hostnames, "\n") }, "OS Name": func(h *host.Host) string { osName, _ := osMatched(h) return osName }, "OS Family": func(h *host.Host) string { _, fam := osMatched(h) return fam }, "Addresses": func(h *host.Host) string { var addresses []string for _, hn := range h.Addresses { addresses = append(addresses, hn.Addr) } return strings.Join(addresses, "\n") }, "Status": func(h *host.Host) string { return "" }, "Hops": func(h *host.Host) string { if h.Trace == nil { return "" } return fmt.Sprint(len(h.Trace.Hops)) }, "Arch": getProbableCPU, "MAC": func(h *host.Host) string { return h.MAC }, "Purpose": func(h *host.Host) string { return "" }, "Route": func(h *host.Host) string { if h.Trace == nil { return "" } var hops []string for _, hop := range h.Trace.Hops { hopDisplay := color.HiBlackString("| ") + color.YellowString(hop.Host) + " - " + hop.IPAddr hops = append(hops, hopDisplay) } return strings.Join(hops, "\n") }, }
Fields maps field names to their value generators
Functions ¶
func Completions ¶
Completions returns some columns to be combined into completion candidates and/or their descriptions.
Types ¶
type Group ¶
Group - A computer group of users. This type will be closely related to the various aims/credential types.
type Host ¶
Host - A physical or virtual computer host. The type has several categories of fields: general information, and Nmap-compliant fields (ports, status, route, scripts etc).
type Port ¶
Port - A port on a Host. The type has several categories of fields: general information, and Nmap-compliant fields (status, owner, service, scripts etc).
Click to show internal directories.
Click to hide internal directories.