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: 8 Imported by: 0

Documentation

Overview

Package stats provides a stats tracker for tracking Status Codes, Errors & WAF detection events.

It is wrapped and called by output.Writer interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StatsOutput

type StatsOutput struct {
	StatusCodeStats map[string]int `json:"status_code_stats"`
	ErrorStats      map[string]int `json:"error_stats"`
	WAFStats        map[string]int `json:"waf_stats"`
}

type Tracker

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

Tracker is a stats tracker instance for nuclei scans

func NewTracker

func NewTracker() *Tracker

NewTracker creates a new Tracker instance.

func (*Tracker) DisplayTopStats

func (t *Tracker) DisplayTopStats(noColor bool)

DisplayTopStats prints the most relevant statistics for CLI

func (*Tracker) GetStats

func (t *Tracker) GetStats() *StatsOutput

func (*Tracker) TrackErrorKind

func (t *Tracker) TrackErrorKind(errKind string)

TrackErrorKind tracks the error kind of a request

func (*Tracker) TrackStatusCode

func (t *Tracker) TrackStatusCode(statusCode string)

TrackStatusCode tracks the status code of a request

func (*Tracker) TrackWAFDetected

func (t *Tracker) TrackWAFDetected(httpResponse string)

TrackWAFDetected tracks the waf detected of a request

First it detects if a waf is running and if so, it increments the counter for the waf.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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