target

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package target turns user input (positional args + --file) into a flat, de-duplicated, order-preserving list of probe targets.

Accepted forms:

  • bare host or IP: "8.8.8.8", "example.com", "2606:4700:4700::1111"
  • comma list: "8.8.8.8,1.1.1.1,example.com"
  • IPv4 CIDR: "10.0.0.0/30" (expanded to host addresses)
  • --file <path>: CSV with the target in the first column; lines beginning with "#" and empty lines are ignored. The first column may itself be a comma list or a CIDR.

Index

Constants

View Source
const MaxCIDRHosts = 256

MaxCIDRHosts caps CIDR expansion to keep rendering manageable.

Variables

This section is empty.

Functions

This section is empty.

Types

type Target

type Target struct {
	Value         string
	Source        string // "argument" | "file" | "cidr"
	OriginalInput string
}

Target is a single resolvable endpoint plus provenance.

func Parse

func Parse(args []string, filePath string) ([]Target, error)

Parse consolidates positional args and an optional file path into a deduplicated slice of Target.

Jump to

Keyboard shortcuts

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