stats

package
v3.3.11 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package stats implements a statistics recording module for nuclei fuzzing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSimpleStats

func NewSimpleStats() (*simpleStats, error)

Types

type ComponentEvent

type ComponentEvent struct {
	URL           string
	ComponentType string
	ComponentName string
	// contains filtered or unexported fields
}

type ErrorEvent

type ErrorEvent struct {
	TemplateID string
	URL        string
	Error      string
}

type FuzzingEvent

type FuzzingEvent struct {
	URL           string
	ComponentType string
	ComponentName string
	TemplateID    string
	PayloadSent   string
	StatusCode    int
	Matched       bool
	RawRequest    string
	RawResponse   string
	Severity      string
	// contains filtered or unexported fields
}

FuzzingEvent is a fuzzing event

type SimpleStatsResponse

type SimpleStatsResponse struct {
	TotalMatchedResults   int64
	TotalComponentsTested int64
	TotalEndpointsTested  int64
	TotalFuzzedRequests   int64
	TotalTemplatesTested  int64
	TotalErroredRequests  int64
	StatusCodes           map[string]int64
	SeverityCounts        map[string]int64
	ErrorGroupedStats     map[string]int64
}

type StatsDatabase

type StatsDatabase interface {
	Close()

	InsertComponent(event ComponentEvent) error
	InsertMatchedRecord(event FuzzingEvent) error
	InsertError(event ErrorEvent) error
}

type Tracker

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

Tracker is a stats tracker module for fuzzing server

func NewTracker

func NewTracker() (*Tracker, error)

NewTracker creates a new tracker instance

func (*Tracker) Close

func (t *Tracker) Close()

Close closes the tracker

func (*Tracker) GetStats

func (t *Tracker) GetStats() SimpleStatsResponse

func (*Tracker) RecordComponentEvent

func (t *Tracker) RecordComponentEvent(event ComponentEvent)

func (*Tracker) RecordErrorEvent

func (t *Tracker) RecordErrorEvent(event ErrorEvent)

func (*Tracker) RecordResultEvent

func (t *Tracker) RecordResultEvent(event FuzzingEvent)

Jump to

Keyboard shortcuts

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