events

package
v3.3.7 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 1 Imported by: 0

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