ctx

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoDomain no domain specified.
	ErrNoDomain error = errors.New("no domain specified")

	// ErrNoWordlist no wordlist specified.
	ErrNoWordlist error = errors.New("no wordlist specified")
)

Functions

This section is empty.

Types

type Ctx

type Ctx struct {
	ProgramName    string
	ProgramVersion string
	ProgramTagline string
	GitBranch      string
	GitRevision    string

	Options *GlobalOptions
	Stdin   *os.File
}

Ctx is the program context. It contains the necessary parameters for a command to run.

func NewCtx

func NewCtx() *Ctx

NewCtx creates a new context.

type GlobalOptions

type GlobalOptions struct {
	TrustedResolvers []string

	Quiet bool
	Debug bool
}

GlobalOptions contains the program's global options.

func DefaultGlobalOptions added in v2.1.0

func DefaultGlobalOptions() *GlobalOptions

DefaultGlobalOptions creates a new GlobalOptions struct with default values.

type ResolveMode added in v2.1.0

type ResolveMode int

ResolveMode is the resolve mode.

const (
	// Resolve resolves domains.
	Resolve ResolveMode = iota

	// Bruteforce bruteforces subdomains.
	Bruteforce
)

type ResolveOptions

type ResolveOptions struct {
	BinPath string

	ResolverFile        string
	ResolverTrustedFile string
	TrustedOnly         bool

	RateLimit        int
	RateLimitTrusted int

	WildcardThreads   int
	WildcardTests     int
	WildcardBatchSize int

	SkipSanitize   bool
	SkipWildcard   bool
	SkipValidation bool

	WriteDomainsFile   string
	WriteMassdnsFile   string
	WriteWildcardsFile string

	Mode       ResolveMode
	Domain     string
	Wordlist   string
	DomainFile string
}

ResolveOptions contains a resolve command's options.

func DefaultResolveOptions added in v2.1.0

func DefaultResolveOptions() *ResolveOptions

DefaultResolveOptions creates a new ResolveOptions struct with default values.

func (*ResolveOptions) Validate added in v2.1.0

func (o *ResolveOptions) Validate() error

Validate validates the options.

Jump to

Keyboard shortcuts

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