nmap

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2022 License: AGPL-3.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Text     string `xml:",chardata"`
	Addr     string `xml:"addr,attr"`
	Addrtype string `xml:"addrtype,attr"`
}

type Debugging

type Debugging struct {
	Text  string `xml:",chardata"`
	Level string `xml:"level,attr"`
}

type Finished

type Finished struct {
	Text    string `xml:",chardata"`
	Time    string `xml:"time,attr"`
	Timestr string `xml:"timestr,attr"`
	Elapsed string `xml:"elapsed,attr"`
	Summary string `xml:"summary,attr"`
	Exit    string `xml:"exit,attr"`
}

type Host

type Host struct {
	Text      string     `xml:",chardata"`
	StartTime string     `xml:"starttime,attr"`
	EndTime   string     `xml:"endtime,attr"`
	Status    Status     `xml:"status"`
	Address   Address    `xml:"address"`
	Hostnames []Hostname `xml:"hostnames>hostname"`
	Ports     []Port     `xml:"ports>port"`
	Times     Times      `xml:"times"`
}

type Hostname

type Hostname struct {
	Text string `xml:",chardata"`
	Name string `xml:"name,attr"`
	Type string `xml:"type,attr"`
}

type Hosts

type Hosts struct {
	Text  string `xml:",chardata"`
	Up    string `xml:"up,attr"`
	Down  string `xml:"down,attr"`
	Total string `xml:"total,attr"`
}

type NmapScan

type NmapScan struct {
	XMLName          xml.Name  `xml:"nmaprun"`
	Text             string    `xml:",chardata"`
	Scanner          string    `xml:"scanner,attr"`
	Args             string    `xml:"args,attr"`
	Start            string    `xml:"start,attr"`
	Startstr         string    `xml:"startstr,attr"`
	Version          string    `xml:"version,attr"`
	XMLOutputVersion string    `xml:"xmloutputversion,attr"`
	ScanInfo         ScanInfo  `xml:"scaninfo"`
	Verbose          Verbose   `xml:"verbose"`
	Debugging        Debugging `xml:"debugging"`
	Hosts            []Host    `xml:"host"`
	RunStats         RunStats  `xml:"runstats"`
}

Thanks to lair-framework/go-nmap for making this simpler

func Parse

func Parse(scan []byte) (*NmapScan, error)

type Port

type Port struct {
	Text     string  `xml:",chardata"`
	Protocol string  `xml:"protocol,attr"`
	PortID   string  `xml:"portid,attr"`
	State    State   `xml:"state"`
	Service  Service `xml:"service"`
}

type RunStats

type RunStats struct {
	Text     string   `xml:",chardata"`
	Finished Finished `xml:"finished"`
	Hosts    Hosts    `xml:"hosts"`
}

type ScanInfo

type ScanInfo struct {
	Text        string `xml:",chardata"`
	Type        string `xml:"type,attr"`
	Protocol    string `xml:"protocol,attr"`
	NumServices string `xml:"numservices,attr"`
	Services    string `xml:"services,attr"`
}

type Service

type Service struct {
	Conf      string `xml:"conf,attr"`
	Method    string `xml:"method,attr"`
	Name      string `xml:"name,attr"`
	Product   string `xml:"product,attr"`
	Version   string `xml:"version,attr"`
	ExtraInfo string `xml:"extrainfo,attr"`
	Text      string `xml:",chardata"`
}

type State

type State struct {
	Text      string `xml:",chardata"`
	State     string `xml:"state,attr"`
	Reason    string `xml:"reason,attr"`
	ReasonTTL string `xml:"reason_ttl,attr"`
}

type Status

type Status struct {
	Text      string `xml:",chardata"`
	State     string `xml:"state,attr"`
	Reason    string `xml:"reason,attr"`
	ReasonTTL string `xml:"reason_ttl,attr"`
}

type Times

type Times struct {
	Text   string `xml:",chardata"`
	SRTT   string `xml:"srtt,attr"`
	RTTVar string `xml:"rttvar,attr"`
	To     string `xml:"to,attr"`
}

type Verbose

type Verbose struct {
	Text  string `xml:",chardata"`
	Level string `xml:"level,attr"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL