pkg

package
v0.0.0-...-4e68e81 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT         = 0
	BACKSLASHED     = 1
	VERIFYREFLECTED = 2
	VERIFYERROR     = 3
)

Variables

View Source
var (
	QUERY  = 1
	POST   = 2
	HEADER = 3
)
View Source
var (
	URL   = 1
	JSONL = 2
)
View Source
var (
	NoColor = 0
	Red     = 1
	Yellow  = 2
	Green   = 3
	Cyan    = 4

	PrecedingMissing  = "PrecedingMissing"
	SubsequentMissing = "SubsequentMissing"
	BothMissing       = "BothMissing"
)
View Source
var CounterPolyglotsGlobal = 0

Functions

func Print

func Print(msg string, c int)

func PrintFatal

func PrintFatal(msg string)

func PrintVerbose

func PrintVerbose(msg string, c int, threshold int)

func ReadJSONL

func ReadJSONL(jsonlPath string) []structs.Crawl

ReadJSONL reads a JSONL file and returns a slice of structs.Crawl. Each line in the JSONL file is expected to contain a valid JSON object representing a crawl. The function returns the parsed crawls or an error if there was an issue reading or parsing the file.

func ReadLocalFile

func ReadLocalFile(path string, name string) []string

func ReadRaw

func ReadRaw(rawPath string, httpP bool) []structs.Crawl

func Scan

func Scan(configParam structs.Config, version string, typ int)

func SliceReplaceBetween

func SliceReplaceBetween(slice []string, offset int, replace []string) []string

Types

type Report

type Report struct {
	Name                    string   `json:"name"`
	Version                 string   `json:"version"`
	SuspectedVulnerableURLs int      `json:"suspectedVulnerableURLs"`
	SuspectedInjections     int      `json:"suspectedTemplateInjections"`
	VeryHigh                int      `json:"veryHighCertainty"`
	High                    int      `json:"highCertainty"`
	Medium                  int      `json:"mediumCertainty"`
	Low                     int      `json:"lowCertainty"`
	VeryLow                 int      `json:"veryLowCertainty"`
	ErrorMessages           []string `json:"errorMessages"`
	Date                    string   `json:"date"`
	Duration                string   `json:"duration"`
	Command                 string   `json:"command"`

	Config *structs.Config `json:"config,omitempty"`
}

Report represents the overall report structure.

type ReportWebpage

type ReportWebpage struct {
	ID            int               `json:"id"`
	URL           string            `json:"url"`
	IsVulnerable  bool              `json:"isWebpageVulnerable"`
	Certainty     string            `json:"certainty"`
	ErrorMessages []string          `json:"errorMessages"`
	ReportDefault reportDefault     `json:"default"`
	Parameters    []reportParameter `json:"parameters"`
}

ReportWebpage represents a webpage in the report.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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