Skip to content

Instantly share code, notes, and snippets.

@JonCooperWorks

JonCooperWorks/plugin.go Secret

Created Oct 1, 2020
Embed
What would you like to do?
// Listener must be implemented by a plugin to users to hook the request - response transaction.
// The Listen method will be run in its own goroutine, so plugins cannot block the rest of the program, however panics can take down the entire process.
type Listener interface {
Listen(results <-chan *Result)
}
// InitializerFunc is a go function that should be exported by a function package.
// It should be named "New".
// Your InitializerFunc should return an instance of your Listener with a reference to httpfuzz's logger for consistent logging.
type InitializerFunc func(*log.Logger) (Listener, error)
// Result is the request, response and associated metadata to be processed by plugins.
type Result struct {
Request *Request
Response *Response
Payload string
Location string
FieldName string
TimeElapsed time.Duration
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment