frequency

package
v3.3.5 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2024 License: MIT Imports: 8 Imported by: 4

Documentation

Index

Constants

View Source
const (
	DefaultMaxTrackCount           = 10000
	DefaultParamOccurenceThreshold = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Tracker

type Tracker struct {
	// contains filtered or unexported fields
}

Tracker implements a frequency tracker for a given input which is used to determine uninteresting input parameters which are not that interesting from fuzzing perspective for a template and target combination.

This is used to reduce the number of requests made during fuzzing for parameters that are less likely to give results for a rule.

func New

func New(maxTrackCount, paramOccurenceThreshold int) *Tracker

New creates a new frequency tracker with a given maximum number of params to track in LRU fashion with a max error threshold

func (*Tracker) Close

func (t *Tracker) Close()

func (*Tracker) IsParameterFrequent

func (t *Tracker) IsParameterFrequent(parameter, target, template string) bool

IsParameterFrequent checks if a parameter is frequently occuring in the input with no much results.

func (*Tracker) MarkParameter

func (t *Tracker) MarkParameter(parameter, target, template string)

MarkParameter marks a parameter as frequently occuring once.

The logic requires a parameter to be marked as frequently occuring multiple times before it's considered as frequently occuring.

func (*Tracker) UnmarkParameter

func (t *Tracker) UnmarkParameter(parameter, target, template string)

UnmarkParameter unmarks a parameter as frequently occuring. This carries more weight and resets the frequency counter for the parameter causing it to be checked again. This is done when results are found.

Jump to

Keyboard shortcuts

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