scan

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 17 Imported by: 0

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 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, 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