runner

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2025 License: BSD-2-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSelfSigned added in v0.1.18

func IsSelfSigned(cert *x509.Certificate) bool

IsSelfSigned checks if a certificate is self-signed

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

	// Writer is output options
	Writer Writer
	// Scan is typically Scan options
	Scan Scan

	Proxy *url.URL

	HostName string

	AddrressList []netip.AddrPort
	HostnameList []string

	ForceCheck           bool
	StoreTempAsWorkspace bool
}

Options are global github.com/helviojunior/certcrawlercertcrawler options

func NewDefaultOptions

func NewDefaultOptions() *Options

NewDefaultOptions returns Options with some default values

type Runner

type Runner struct {

	// DNS FQDN to scan.
	Targets chan netip.AddrPort

	Timeout time.Duration
	// 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, dbUri string) (*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) GetLog

func (run *Runner) GetLog() *slog.Logger

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
	Skiped          int
	ConnectionError int
	TLSError        int
	Spin            string
	Running         bool
	IsTerminal      bool
	// contains filtered or unexported fields
}

func (*Status) AddResult

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

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
	NoControlDb bool
}

Writer options

Jump to

Keyboard shortcuts

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