detectors

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Detectors is the list of all available WAF detectors. The checks are performed in the given order.

Functions

This section is empty.

Types

type Check

type Check func(resp *http.Response) bool

Check performs some check on the response with a fixed condition.

func CheckContent

func CheckContent(regex string) Check

CheckContent match body value with regex.

func CheckCookie

func CheckCookie(regex string) Check

CheckCookie match Set-Cookie header values with regex.

func CheckHeader

func CheckHeader(header, regex string) Check

CheckHeader match header value with regex.

func CheckStatusCode

func CheckStatusCode(status int) Check

CheckStatusCode compare response status code with given value.

type Detector

type Detector struct {
	WAFName string
	Vendor  string

	Checks []Check
}

Detector contains names of WAF solution and vendor, and checks to detect that solution by response.

func Incapsula

func Incapsula() *Detector

func KonaSiteDefender

func KonaSiteDefender() *Detector

func SecureSphere

func SecureSphere() *Detector

func (*Detector) GetVendor

func (d *Detector) GetVendor() string

func (*Detector) GetWAFName

func (d *Detector) GetWAFName() string

func (*Detector) IsWAF

func (d *Detector) IsWAF(resp *http.Response) bool

Jump to

Keyboard shortcuts

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