masscan

package
v0.0.0-...-d66a22c Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 5 Imported by: 0

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"`
	AddrType string `xml:"addrtype,attr"`
}

type Host

type Host struct {
	XMLName xml.Name `xml:"host"`
	Endtime string   `xml:"endtime,attr"`
	Address Address  `xml:"address"`
	Ports   Ports    `xml:"ports>port"`
}

type Masscan

type Masscan struct {
	SystemPath string
	Args       []string
	Ports      string
	FileName   string
	Rate       string
	Exclude    string
	Result     []byte
}

func New

func New(SystemPath string) *Masscan

func (*Masscan) Parse

func (m *Masscan) Parse() ([]Host, error)

Parse scans result.

func (*Masscan) Run

func (m *Masscan) Run() error

Start scanning

func (*Masscan) SetArgs

func (m *Masscan) SetArgs(arg ...string)

func (*Masscan) SetExclude

func (m *Masscan) SetExclude(exclude string)

func (*Masscan) SetFileName

func (m *Masscan) SetFileName(name string)

func (*Masscan) SetPorts

func (m *Masscan) SetPorts(ports string)

func (*Masscan) SetRate

func (m *Masscan) SetRate(rate string)

func (*Masscan) SetSystemPath

func (m *Masscan) SetSystemPath(systemPath string)

type Ports

type Ports []struct {
	Protocol string  `xml:"protocol,attr"`
	Portid   string  `xml:"portid,attr"`
	State    State   `xml:"state"`
	Service  Service `xml:"service"`
}

type Service

type Service struct {
	Name   string `xml:"name,attr"`
	Banner string `xml:"banner,attr"`
}

type State

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

Jump to

Keyboard shortcuts

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