detectors

package
v0.4.19 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 5 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(resps *Responses) bool

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

func And added in v0.4.19

func And(checks ...Check) Check

And combines the checks with AND logic, so each test must be true to return true.

func CheckContent

func CheckContent(regex string, attack bool) Check

CheckContent match body value with regex. Default value for attack parameter is true.

func CheckCookie

func CheckCookie(regex string, attack bool) Check

CheckCookie match Set-Cookie header values with regex. Default value for attack parameter is false.

func CheckHeader

func CheckHeader(header, regex string, attack bool) Check

CheckHeader match header value with regex. Default value for attack parameter is false.

func CheckReason added in v0.4.19

func CheckReason(regex string, attack bool) Check

CheckReason match status reason value with regex. Default value for attack parameter is true.

func CheckStatusCode

func CheckStatusCode(status int, attack bool) Check

CheckStatusCode compare response status code with given value. Default value for attack parameter is true.

func Or added in v0.4.19

func Or(checks ...Check) Check

Or combines the checks with OR logic, so at least one test must be true to return true.

type Detector

type Detector struct {
	WAFName string
	Vendor  string

	Check Check
}

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

func BigIPApManager added in v0.4.19

func BigIPApManager() *Detector

func BigIPAppSecManager added in v0.4.19

func BigIPAppSecManager() *Detector

func BigIPLocalTrafficManager added in v0.4.19

func BigIPLocalTrafficManager() *Detector

func FirePass added in v0.4.19

func FirePass() *Detector

func Incapsula

func Incapsula() *Detector

func KonaSiteDefender

func KonaSiteDefender() *Detector

func ModSecurity added in v0.4.19

func ModSecurity() *Detector

func SecureSphere

func SecureSphere() *Detector

func Trafficshield added in v0.4.19

func Trafficshield() *Detector

func (*Detector) GetVendor

func (d *Detector) GetVendor() string

func (*Detector) GetWAFName

func (d *Detector) GetWAFName() string

func (*Detector) IsWAF

func (d *Detector) IsWAF(resps *Responses) bool

type Responses added in v0.4.19

type Responses struct {
	Resp         *http.Response
	RespToAttack *http.Response
}

Jump to

Keyboard shortcuts

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