scan

package
v0.0.0-...-4b3b18c Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrExists    = errors.New("host already in the list")
	ErrNotExists = errors.New("host not in the list")
)

Functions

This section is empty.

Types

type HostsList

type HostsList struct {
	Filename string
	W        io.Writer
	Hosts    []string
}

func (*HostsList) Add

func (h *HostsList) Add(hosts []string) error

func (*HostsList) Load

func (h *HostsList) Load() error

func (*HostsList) Print

func (h *HostsList) Print() error

func (*HostsList) Remove

func (h *HostsList) Remove(hosts []string) error

func (*HostsList) Save

func (h *HostsList) Save() error

type Port

type Port struct {
	Num  int
	Open isopen
}

func ToPortList

func ToPortList(rawPorts, rawRange string) ([]Port, error)

func (Port) String

func (p Port) String() string

type PortScanner

type PortScanner struct {
	Hosts   []string
	Ports   []Port
	W       io.Writer
	Filter  string
	Timeout int
	// contains filtered or unexported fields
}

func (*PortScanner) PrintResults

func (ps *PortScanner) PrintResults() error

func (*PortScanner) ScanPorts

func (ps *PortScanner) ScanPorts()

func (*PortScanner) SortResults

func (ps *PortScanner) SortResults()

func (*PortScanner) ValidateHosts

func (ps *PortScanner) ValidateHosts() error

Jump to

Keyboard shortcuts

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