scan

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2025 License: MIT Imports: 18 Imported by: 1 module, 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 (
	ErrWrongHeaderFormat = errors.New("header with wrong format")
)

Functions

func GenCustomQueryPayload

func GenCustomQueryPayload(testPayload string) string

GenCustomPayload returns a ready to use HTTP GET query with the payload supplied as input.

func GenQueryPayload

func GenQueryPayload() (string, string)

GenQueryPayload returns a ready to use HTTP GET query with a random generated payload and the payload used in the query.

func GetChromeBrowser

func GetChromeBrowser(copts []func(*chromedp.ExecAllocator)) (context.CancelFunc,
	context.Context, context.CancelFunc)

GetChromeBrowser takes as input the chrome options and returns the contexts with the associated cancel functions to use the headless chrome browser it creates.

func GetChromeOptions

func GetChromeOptions(r *Runner) []func(*chromedp.ExecAllocator)

GetChromeOptions takes as input the runner settings and returns the chrome options.

func GetHeaders added in v0.0.5

func GetHeaders(r *Runner) (map[string]interface{}, error)

GetHeaders returns the headers map.

func GetJavascript

func GetJavascript(r *Runner, testPayload string) string

GetJavascript returns the Javascript code must be run on the target to verify the vulnerability.

func GetTestPayload

func GetTestPayload(r *Runner, length int) string

GetTestPayload returns the payload specified as input or a random payload with a specified length.

func PrepareURL

func PrepareURL(inputURL, testPayload string) (string, error)

PrepareURL takes as input a URL and a payload and returns the final URL to scan.

func Scan

func Scan(ctx context.Context, headers map[string]interface{}, js, targetURL string) (string, error)

Types

type Runner

type Runner struct {
	InputChan chan string
	Result    output.Result
	UserAgent string
	Options   input.Options
	OutMutex  *sync.Mutex
}

func New

func New(options *input.Options) (Runner, error)

func (*Runner) Run

func (r *Runner) Run()

Jump to

Keyboard shortcuts

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