type NmapRun struct {
Info ScanInfo `xml:"scaninfo"`
Hosts []Host `xml:"host"`
}
Parsing the XML requires a set of structs to match the data we'd like to have. There are going tobe numerous structs involved in this procexss as they represent all of the ways the data could come back from an NMap XML file.
type Port struct {
Protocol string `xml:"protocol,attr"`
PortID string `xml:"portid,attr"`
StateInfo State `xml:"state"`
ServiceInfo Service `xml:"service"`
}