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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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