target

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadExcludeFile

func ReadExcludeFile(path string) ([]string, error)

ReadExcludeFile reads and parses an exclude list from a file.

Types

type Input

type Input interface {
	// Target pops a target from the queue.
	// If it's the last target or the queue is empty, false is returned.
	Target() (addr.Addr, bool)
	// Size returns the count of remaining targets.
	Size() int
}

Input is the target source for the SYN sender.

type RangeInput

type RangeInput struct {
	// contains filtered or unexported fields
}

RangeInput combines an IP range with a port.

func NewRangeInput

func NewRangeInput(rawRange string, rawExcludes []string, port uint16) (*RangeInput, error)

NewRangeInput crates a new IP range input source.

func (*RangeInput) Size

func (ri *RangeInput) Size() int

Size calculates the total size of all target ranges.

func (*RangeInput) String

func (ri *RangeInput) String() string

String formats all ranges as a string.

func (*RangeInput) Target

func (ri *RangeInput) Target() (addr.Addr, bool)

Target calculates the next target in the range list.

type TXTInput

type TXTInput struct {
	// contains filtered or unexported fields
}

TXTInput wraps a target list file as an input source.

func NewTXTInput

func NewTXTInput(path string) (*TXTInput, error)

NewTXTInput creates a new TXTInput from the given file path. TODO: implement excludes

func (*TXTInput) Size

func (i *TXTInput) Size() int

func (*TXTInput) Target

func (i *TXTInput) Target() (addr.Addr, bool)

Target reads and parses a line from the source file.

Jump to

Keyboard shortcuts

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