scriptout

package
v0.0.0-...-f0fca86 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CipherInfo

type CipherInfo struct {
	KexInfo  string
	Name     string
	Strength string
}

type ExtraPorts

type ExtraPorts struct {
	XMLName      xml.Name       `xml:"extraports"`
	State        string         `xml:"state,attr"`
	Count        int            `xml:"count,attr"`
	ExtraReasons []ExtraReasons `xml:"extrareasons"`
}

type ExtraReasons

type ExtraReasons struct {
	XMLName xml.Name `xml:"extrareasons"`
	Reason  string   `xml:"reason,attr"`
	Count   int      `xml:"count,attr"`
}

type FlattenedCipherInfo

type FlattenedCipherInfo struct {
	HostAddr   string
	PortID     string
	TLSVersion string
	CipherInfo
}

type Host

type Host struct {
	XMLName   xml.Name    `xml:"host"`
	Status    HostStatus  `xmk:"status"`
	Address   HostAddress `xml:"address"`
	Hostnames Hostnames   `xml:"hostnames"`
	Ports     HostPorts   `xml:"ports"`
}

type HostAddress

type HostAddress struct {
	XMLName  xml.Name `xml:"address"`
	Addr     string   `xml:"addr,attr"`
	AddrType string   `xml:"addrtype,attr"`
}

type HostPorts

type HostPorts struct {
	XMLName    xml.Name     `xml:"ports"`
	ExtraPorts ExtraPorts   `xml:"extraports"`
	Ports      []PortDetail `xml:"port"`
}

type HostStatus

type HostStatus struct {
	XMLName xml.Name `xml:"status"`
	State   string   `xml:"state,attr"`
}

type Hostname

type Hostname struct {
	XMLName xml.Name `xml:"hostname"`
	Name    string   `xml:"name,attr"`
}

type Hostnames

type Hostnames struct {
	XMLName xml.Name   `xml:"hostnames"`
	Names   []Hostname `xml:"hostname"`
}

type NMapRun

type NMapRun struct {
	XMLName  xml.Name `xml:"nmaprun"`
	Args     string   `xml:"args,attr"`
	Start    string   `xml:"start,attr"` // unix timestamp
	Version  string   `xml:"version,attr"`
	ScanInfo ScanInfo `xml:"scaninfo"`
	Hosts    []Host   `xml:"host"`
	RunStats RunStats `xml:"runstats"`
}

func (NMapRun) GetActivePorts

func (run NMapRun) GetActivePorts(host string) map[string]PortDetail

func (NMapRun) GetCiphers

func (run NMapRun) GetCiphers(host, portID, tlsVersion string) []CipherInfo

func (NMapRun) GetFlatCiphers

func (run NMapRun) GetFlatCiphers() []FlattenedCipherInfo

func (NMapRun) GetHostsUp

func (run NMapRun) GetHostsUp() map[string]Host

func (NMapRun) GetTLSTables

func (run NMapRun) GetTLSTables(host, portID string) map[string]ScriptTable

func (NMapRun) LeastStrength

func (run NMapRun) LeastStrength(host, portID string) string

func (NMapRun) LeastStrengthAll

func (run NMapRun) LeastStrengthAll() (rune, error)

func (NMapRun) ScannedServices

func (run NMapRun) ScannedServices() (map[int]bool, error)

type PortDetail

type PortDetail struct {
	XMLName  xml.Name     `xml:"port"`
	Protocol string       `xml:"protocol,attr"`
	PortID   string       `xml:"portid,attr"`
	Script   ScriptOutput `xml:"script"`
}

type RunFinished

type RunFinished struct {
	XMLName xml.Name `xml:"finished"`
	Time    string   `xml:"time,attr"`
	Elapsed string   `xml:"elapsed,attr"`
	Summary string   `xml:"summary,attr"`
	Exit    string   `xml:"exit,attr"`
}

type RunStats

type RunStats struct {
	XMLName  xml.Name    `xml:"runstats"`
	Finished RunFinished `xml:"finished"`
}

type ScanInfo

type ScanInfo struct {
	XMLName     xml.Name `xml:"scaninfo"`
	Protocol    string   `xml:"protocol,attr"`
	NumServices int      `xml:"numservices,attr"`
	Services    string   `xml:"services,attr"`
}

type ScriptOutput

type ScriptOutput struct {
	XMLName xml.Name      `xml:"script"`
	ID      string        `xml:"id,attr"`
	Elems   []TableElem   `xml:"elem"`
	Tables  []ScriptTable `xml:"table"`
}

type ScriptTable

type ScriptTable struct {
	XMLName xml.Name      `xml:"table"`
	Key     string        `xml:"key,attr"`
	Elems   []TableElem   `xml:"elem"`
	Tables  []ScriptTable `xml:"table"`
}

func (ScriptTable) CipherInfo

func (t ScriptTable) CipherInfo() CipherInfo

func (ScriptTable) Elements

func (t ScriptTable) Elements() map[string]string

type TableElem

type TableElem struct {
	XMLName xml.Name `xml:"elem"`
	Key     string   `xml:"key,attr"`
	Value   string   `xml:",chardata"`
}

Jump to

Keyboard shortcuts

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