readers

package
v0.1.26 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileReader

type FileReader struct {
	Options *FileReaderOptions
}

FileReader is a reader that expects a file with targets that is newline delimited.

func NewFileReader

func NewFileReader(opts *FileReaderOptions) *FileReader

NewFileReader prepares a new file reader

func (*FileReader) ReadAddrList

func (fr *FileReader) ReadAddrList(outList *[]netip.AddrPort) error

Read from a file.

func (*FileReader) ReadHostList

func (fr *FileReader) ReadHostList(outList *[]string) error

type FileReaderOptions

type FileReaderOptions struct {
	AddrFile string
	HostFile string
}

FileReaderOptions are options for the file reader

type NmapReader added in v0.1.1

type NmapReader struct {
	Options *NmapReaderOptions
}

NmapReader is an Nmap results reader

func NewNmapReader added in v0.1.1

func NewNmapReader(opts *NmapReaderOptions) *NmapReader

NewNmapReader prepares a new Nmap reader

func (*NmapReader) Read added in v0.1.1

func (nr *NmapReader) Read(outList *[]netip.AddrPort) error

Read an nmap file

type NmapReaderOptions added in v0.1.1

type NmapReaderOptions struct {
	// Path to an Nmap XML file
	Source string

	// Ports to limit scans to
	Ports []int

	// Protocols maps "ip:port" to the detected application protocol
	// ("http" or "https") based on the Nmap service information. Only
	// HTTP/HTTPS services are recorded here.
	Protocols map[string]string
}

NmapReaderOptions are options for the nmap reader

type Reader

type Reader interface {
	Read(chan<- string) error
}

Reader defines a reader. NOTE: The Reader needs to close the channel when done to stop the runner. You would typically do this with a "defer close(ch)" at the start of your Read() implementation.

Jump to

Keyboard shortcuts

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