worker

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const AkamiIdReplacementMarker = "[AKAMAI_ID" + ReplacementMarkerSuffix
View Source
const DomainReplacmentMarker = "[DOMAIN" + ReplacementMarkerSuffix
View Source
const ReplacementMarkerSuffix = "-FUZZER-6B6LwyGe4cHLccMAfNYVbQ]"

Markers for replacing occurences of the request domain, timestamps, and ids in responses when generating templates. The motivation for replacing predictable variable response elements with a marker instead of deleting them is to allow the frequency of occurances to be counted.

Because the marker contains a random string it is unlikely actual response content will be confused with it.

View Source
const TimestampReplacmentMarker = "[TIMESTAMP" + ReplacementMarkerSuffix

Variables

This section is empty.

Functions

func Break

func Break(err interface{}) bool

func HTTPFuzzerMapping

func HTTPFuzzerMapping(fuzzer int) string

func HTTPSFuzzerMapping

func HTTPSFuzzerMapping(fuzzer int) string

func NonWwwDomainVersion

func NonWwwDomainVersion(domain string) string

Returns version of domain with the starting label "www"

func WwwDomainVersion

func WwwDomainVersion(domain string) string

Returns version of domain starting with label "www"

Types

type FuzzerSpec

type FuzzerSpec int64

func (FuzzerSpec) Fuzzer

func (f FuzzerSpec) Fuzzer() int

func (FuzzerSpec) HTTPFuzzerInterface

func (f FuzzerSpec) HTTPFuzzerInterface() http_fuzzer.Fuzzer

func (FuzzerSpec) HTTPSFuzzerInterface

func (f FuzzerSpec) HTTPSFuzzerInterface() https_fuzzer.Fuzzer

type HTTPFuzzerObject

type HTTPFuzzerObject struct {
	TestName     string
	Spec         FuzzerSpec
	RequestWords []*http_fuzzer.RequestWord
}

type HTTPSFuzzerObject

type HTTPSFuzzerObject struct {
	TestName     string
	Spec         FuzzerSpec
	RequestWords []*https_fuzzer.RequestWord
}

type HTTPSWork

type HTTPSWork struct {
	IP      string
	Domain  string
	Fuzzers []*HTTPSFuzzerObject
}

type HTTPSWorker

type HTTPSWorker struct{}

func (*HTTPSWorker) FuzzerObjects

func (h *HTTPSWorker) FuzzerObjects(fuzzerList []*util.FuzzerInput) interface{}

func (*HTTPSWorker) GenerateTemplate

func (h *HTTPSWorker) GenerateTemplate(response interface{}, keyword string) interface{}

func (*HTTPSWorker) MatchesControl

func (h *HTTPSWorker) MatchesControl(results []*util.Result) []*util.Result

TODO: there are more efficient ways of doing this than going through the list twice, but this will do for now

func (*HTTPSWorker) SendResults

func (h *HTTPSWorker) SendResults(results []*util.Result, ResultsQueue chan<- *util.Result)

func (*HTTPSWorker) Work

func (h *HTTPSWorker) Work(ip string, domain string, fuzzers interface{}) interface{}

func (*HTTPSWorker) Worker

func (h *HTTPSWorker) Worker(workQueue <-chan interface{}, resultQueue chan<- *util.Result, uncensoredDomain string, wg *sync.WaitGroup, done chan<- bool)

type HTTPWork

type HTTPWork struct {
	IP      string
	Domain  string
	Fuzzers []*HTTPFuzzerObject
}

Using a separate struct to assign work instead of just the input, since in the future we may want to assign different work for each vantage point

type HTTPWorker

type HTTPWorker struct{}

func (*HTTPWorker) FuzzerObjects

func (h *HTTPWorker) FuzzerObjects(fuzzerList []*util.FuzzerInput) interface{}

func (*HTTPWorker) GenerateTemplate

func (h *HTTPWorker) GenerateTemplate(response interface{}, keyword string) interface{}

func (*HTTPWorker) MatchesControl

func (h *HTTPWorker) MatchesControl(results []*util.Result) []*util.Result

TODO: there are more efficient ways of doing this than going through the list twice, but this will do for now

func (*HTTPWorker) SendResults

func (h *HTTPWorker) SendResults(results []*util.Result, ResultsQueue chan<- *util.Result)

func (*HTTPWorker) Work

func (h *HTTPWorker) Work(ip string, domain string, fuzzers interface{}) interface{}

func (*HTTPWorker) Worker

func (h *HTTPWorker) Worker(workQueue <-chan interface{}, resultQueue chan<- *util.Result, uncensoredDomain string, wg *sync.WaitGroup, done chan<- bool)

type Worker

type Worker interface {
	FuzzerObjects(fuzzerList []*util.FuzzerInput) interface{}
	Work(ip string, domain string, requestWord interface{}) interface{}
	GenerateTemplate(response interface{}, keyword string) interface{}
	MatchesControl(results []*util.Result) []*util.Result
	SendResults(results []*util.Result, ResultsQueue chan<- *util.Result)
	Worker(workQueue <-chan interface{}, resultQueue chan<- *util.Result, uncensoredDomain string, wg *sync.WaitGroup, done chan<- bool)
}

Jump to

Keyboard shortcuts

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