runner

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExtractionPoints = map[string][]string{
	"script": {"src", "data-src"},
}

ExtractionPoints defines the default HTML tags and their attributes from which JavaScript sources are extracted.

Functions

func New

func New(options *Options) *runner

New creates a new runner with the provided options.

func Read

func Read(input io.Reader) func() (*url.URL, error)

Read is a wrapper around the bufio.Scanner Text() method. Upon reading from the input, the line is automatically parsed to a *url.URL. An io.EOF error is returned when there are no more lines.

Types

type Input

type Input struct {
	Type InputType
	Data io.Reader
}

Input represents an input source for getJS. The input format is determined by the `Type` property.

type InputType

type InputType int

InputType defines the type of input source for getJS.

const (
	// InputURL defines the input format to line separated, plain text, URLs.
	InputURL InputType = iota
	// InputResponse defines the input format to a HTTP response body.
	InputResponse
)

type Options

type Options struct {
	Request struct {
		Method             string
		Headers            http.Header
		InsecureSkipVerify bool
		Timeout            time.Duration
	}

	Inputs  []Input
	Outputs []io.Writer

	Complete bool
	Resolve  bool

	Threads int

	Verbose bool
	Colors  bool
}

Options represents the configuration options for the runner.

Jump to

Keyboard shortcuts

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