frequency

package
v3.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: MIT Imports: 8 Imported by: 6

Documentation

Index

Constants

View Source
const (
	DefaultMaxTrackCount            = 10000
	DefaultParamOccurrenceThreshold = 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, paramOccurrenceThreshold 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 occurring in the input with no much results.

func (*Tracker) MarkParameter

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

MarkParameter marks a parameter as frequently occurring once.

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

func (*Tracker) UnmarkParameter

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

UnmarkParameter unmarks a parameter as frequently occurring. 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