Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct {
Addr string `xml:"addr,attr" json:"addr"`
AddrType string `xml:"addrtype,attr" json:"addrType"`
Vendor string `xml:"vendor,attr" json:"vendor"`
}
Address holds the address subnodes of the host nodes in the XML.
type Host ¶
type Host struct {
Status State `xml:"status" json:"status"`
Addrs []Address `xml:"address" json:"addrs"`
Hostnames []Hostname `xml:"hostnames>hostname" json:"hostnames"`
Ports []Port `xml:"ports>port" json:"ports"`
ExtraPorts ExtraPort `xml:"ports>extraports" json:"extraports"`
ScannedAt string `xml:"endtime,attr" json:"scannedAt"`
}
Host holds the host node from the XML.
type NmapScan ¶
type NmapScan struct {
Args string `xml:"args,attr" json:"args"`
Hosts []Host `xml:"host" json:"hosts"`
}
NmapScan is the unmarshaled version of the Nmap's XML output.
func NewNmapScan ¶
NewNmapScan reads the content of the Nmap's XML file, in bytes, and returns a NmapScan struct, or an error.
type Port ¶
type Port struct {
Protocol string `xml:"protocol,attr" json:"protocol"`
PortId int `xml:"portid,attr" json:"portId"`
State State `xml:"state" json:"state"`
Service Service `xml:"service" json:"service"`
}
Port is a marshaled version of the hosts nodes in the XML.
type Service ¶
type Service struct {
Name string `xml:"name,attr" json:"name"`
Product string `xml:"product,attr" json:"product"`
Version string `xml:"version,attr" json:"version"`
Extrainfo string `xml:"extrainfo,attr" json:"extrainfo"`
}
Service is a marshaled version of the hosts nodes in the XML.
Click to show internal directories.
Click to hide internal directories.