events

package
v3.2.12 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ConfigFile = "config.json"
	EventsFile = "events.jsonl"
)

Variables

This section is empty.

Functions

func AddScanEvent

func AddScanEvent(event ScanEvent)

AddScanEvent is a no-op function

func InitWithConfig

func InitWithConfig(config *ScanConfig, statsDirectory string)

Types

type ScanConfig

type ScanConfig struct {
	Name                string `json:"name" yaml:"name"`
	TargetCount         int    `json:"target_count" yaml:"target_count"`
	TemplatesCount      int    `json:"templates_count" yaml:"templates_count"`
	TemplateConcurrency int    `json:"template_concurrency" yaml:"template_concurrency"`
	PayloadConcurrency  int    `json:"payload_concurrency" yaml:"payload_concurrency"`
	JsConcurrency       int    `json:"js_concurrency" yaml:"js_concurrency"`
	Retries             int    `json:"retries" yaml:"retries"`
}

ScanConfig is only in context of scan event analysis

type ScanEvent

type ScanEvent struct {
	Target       string     `json:"target" yaml:"target"`
	TemplateType string     `json:"template_type" yaml:"template_type"`
	TemplateID   string     `json:"template_id" yaml:"template_id"`
	TemplatePath string     `json:"template_path" yaml:"template_path"`
	MaxRequests  int        `json:"max_requests" yaml:"max_requests"`
	Time         time.Time  `json:"time" yaml:"time"`
	EventType    ScanStatus `json:"event_type" yaml:"event_type"`
}

ScanEvent represents a single scan event with its metadata

type ScanEventWorker

type ScanEventWorker interface {
	// AddScanEvent adds a scan event to the worker
	AddScanEvent(event ScanEvent)
}

type ScanStatus

type ScanStatus string

Track scan start / finish status

const (
	ScanStarted  ScanStatus = "scan_start"
	ScanFinished ScanStatus = "scan_end"
)

Jump to

Keyboard shortcuts

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