runner

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: BSD-2-Clause Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsCloudProduct

func ContainsCloudProduct(s string) (bool, string, string)

Types

type DnsOverHttps

type DnsOverHttps struct {

	// Don't write HTML response content
	SkipSSLCheck bool

	// Proxy server to use
	Proxy string

	ProxyUser     string
	ProxyPassword string

	// UserAgent is the user-agent string to set for Chrome
	UserAgent string
	// Headers to add to every request
	Headers []string
}

DNS Over HTTPs related options

type Logging

type Logging struct {
	// Debug display debug level logging
	Debug bool
	// LogScanErrors log errors related to scanning
	LogScanErrors bool
	// Silence all logging
	Silence bool
}

Logging is log related options

type Options

type Options struct {
	// Logging is logging options
	Logging Logging
	// DNS Over HTTPs related options
	DnsOverHttps DnsOverHttps
	// Writer is output options
	Writer Writer
	// Scan is typically Scan options
	Scan Scan
	//
	DnsSufix string

	//
	DnsServer   string
	DnsPort     int
	DnsProtocol string
}

Options are global github.com/helviojunior/enumdnsenumdns options

func NewDefaultOptions

func NewDefaultOptions() *Options

NewDefaultOptions returns Options with some default values

type Runner

type Runner struct {

	// DNS FQDN to scan.
	Targets chan string
	// contains filtered or unexported fields
}

Runner is a runner that probes web targets using a driver

func NewRunner

func NewRunner(logger *slog.Logger, opts Options, writers []writers.Writer) (*Runner, error)

New gets a new Runner ready for probing. It's up to the caller to call Close() on the runner

func (*Runner) AddSkiped

func (run *Runner) AddSkiped()

func (*Runner) Close

func (run *Runner) Close()

func (*Runner) Probe

func (run *Runner) Probe(host string) []*models.Result

func (*Runner) Run

func (run *Runner) Run(total int) Status

type Scan

type Scan struct {
	// Threads (not really) are the number of goroutines to use.
	// More soecifically, its the go-rod page pool well use.
	Threads int
	// Timeout is the maximum time to wait for a page load before timing out.
	Timeout int
	// Number of seconds of delay between navigation and screenshotting
	Delay int
}

Scan is scanning related options

type Status

type Status struct {
	Total    int
	Complete int
	Error    int
	Label    string
	Running  bool
}

func (*Status) AddResult

func (st *Status) AddResult(result *models.Result)

func (*Status) Print

func (st *Status) Print()

type Writer

type Writer struct {
	UserPath   string
	Db         bool
	DbURI      string
	DbDebug    bool // enables verbose database logs
	Csv        bool
	CsvFile    string
	Jsonl      bool
	JsonlFile  string
	ELastic    bool
	ELasticURI string
	Text       bool
	TextFile   string
	Stdout     bool
	None       bool
}

Writer options

Jump to

Keyboard shortcuts

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