entrypoint

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BodyParam

type BodyParam struct {
	Prefix string
	Suffix string
	// contains filtered or unexported fields
}

BodyParam represents a body parameter entrypoint. It is used to inject payloads into the request's body's params. Both, keys and values can be injected.

func (BodyParam) InjectPayload

func (e BodyParam) InjectPayload(req request.Request, pos profile.PayloadPosition, payload string) request.Request

func (BodyParam) InsertionPointType

func (b BodyParam) InsertionPointType() profile.InsertionPointType

func (BodyParam) Param

func (e BodyParam) Param(payload string) string

func (BodyParam) Value

func (b BodyParam) Value() string

type BodyParamFinder

type BodyParamFinder struct{}

BodyParamFinder is used to find entrypoints in the request's body.

func NewBodyParamFinder

func NewBodyParamFinder() BodyParamFinder

NewBodyParamFinder instantiates a new BodyParamFinder.

func (BodyParamFinder) Find

func (f BodyParamFinder) Find(req request.Request) []Entrypoint
type Cookie struct {
	Base string
	// contains filtered or unexported fields
}

Cookie represents a cookie entrypoint. It is used to inject payloads into the cookie of a request. Both, keys and values can be injected.

func (Cookie) InjectPayload

func (e Cookie) InjectPayload(req request.Request, pos profile.PayloadPosition, payload string) request.Request

func (Cookie) InsertionPointType

func (b Cookie) InsertionPointType() profile.InsertionPointType

func (Cookie) Param

func (e Cookie) Param(payload string) string

func (Cookie) Value

func (b Cookie) Value() string

type CookieFinder

type CookieFinder struct{}

CookieFinder is used to find entrypoints in the request's cookies.

func NewCookieFinder

func NewCookieFinder() CookieFinder

NewCookieFinder instantiates a new CookieFinder.

func (CookieFinder) Find

func (f CookieFinder) Find(req request.Request) []Entrypoint

type CustomHeader

type CustomHeader struct {
	HeaderKey string
	// contains filtered or unexported fields
}

CustomHeader represents a custom header entrypoint. It is used to inject new headers into the request.

func (CustomHeader) InjectPayload

func (e CustomHeader) InjectPayload(req request.Request, _ profile.PayloadPosition, payload string) request.Request

func (CustomHeader) InsertionPointType

func (b CustomHeader) InsertionPointType() profile.InsertionPointType

func (CustomHeader) Param

func (e CustomHeader) Param(_ string) string

func (CustomHeader) Value

func (b CustomHeader) Value() string

type EntireBody

type EntireBody struct {
	// contains filtered or unexported fields
}

EntireBody represents an entire body entrypoint. It is used to inject payloads for the entire request's body.

func (EntireBody) InjectPayload

func (e EntireBody) InjectPayload(req request.Request, pos profile.PayloadPosition, payload string) request.Request

func (EntireBody) InsertionPointType

func (b EntireBody) InsertionPointType() profile.InsertionPointType

func (EntireBody) Param

func (b EntireBody) Param(_ string) string

func (EntireBody) Value

func (b EntireBody) Value() string

type EntireBodyFinder

type EntireBodyFinder struct{}

EntireBodyFinder is used to find entrypoints in the request's entire body.

func NewEntireBodyFinder

func NewEntireBodyFinder() EntireBodyFinder

NewEntireBodyFinder instantiates a new EntireBodyFinder.

func (EntireBodyFinder) Find

type Entrypoint

type Entrypoint interface {
	Param(param string) string
	Value() string
	InsertionPointType() profile.InsertionPointType
	InjectPayload(req request.Request, pos profile.PayloadPosition, payload string) request.Request
}

Entrypoint defines the behavior of a request's entrypoint, which is a point in the request where a payload can be injected. For instance, a URL entrypoint would be the path of the request.

Specific implementations of this interface are responsible for injecting payloads into the request.

func From

func From(s profile.Step) []Entrypoint

From compiles a list of entrypoints from a profile.Step. It is used (only) to generate a list of profile.HeaderNew entrypoints, so to add new headers to the request.

type Finder

type Finder interface {
	Find(req request.Request) []Entrypoint
}

Finder defines the behavior of an entrypoints finder, which is a component capable of finding entrypoints in a request.

func Finders

func Finders() []Finder

Finders returns a list of all available entrypoints finders within the `entrypoint` package.

type Header struct {
	HeaderKey string
	// contains filtered or unexported fields
}

Header represents a header entrypoint. It is used to inject payloads into the request's headers.

func (Header) InjectPayload

func (e Header) InjectPayload(req request.Request, pos profile.PayloadPosition, payload string) request.Request

func (Header) InsertionPointType

func (b Header) InsertionPointType() profile.InsertionPointType

func (Header) Param

func (e Header) Param(_ string) string

func (Header) Value

func (b Header) Value() string

type HeaderFinder

type HeaderFinder struct{}

HeaderFinder is used to find entrypoints in the request's headers.

func NewHeaderFinder

func NewHeaderFinder() HeaderFinder

NewHeaderFinder instantiates a new HeaderFinder.

func (HeaderFinder) Find

func (HeaderFinder) Find(req request.Request) []Entrypoint

type JSONParam

type JSONParam struct {
	Base string
	// contains filtered or unexported fields
}

JSONParam represents a JSON parameter entrypoint. It is used to inject payloads into the request's JSON parameters. Both, keys and values can be injected.

func (JSONParam) InjectPayload

func (e JSONParam) InjectPayload(req request.Request, pos profile.PayloadPosition, payload string) request.Request

func (JSONParam) InsertionPointType

func (b JSONParam) InsertionPointType() profile.InsertionPointType

func (JSONParam) Param

func (e JSONParam) Param(payload string) string

func (JSONParam) Value

func (b JSONParam) Value() string

type JSONParamFinder

type JSONParamFinder struct{}

JSONParamFinder is used to find entrypoints in the request's JSON body.

func NewJSONParamFinder

func NewJSONParamFinder() JSONParamFinder

NewJSONParamFinder instantiates a new JSONParamFinder.

func (JSONParamFinder) Find

func (f JSONParamFinder) Find(req request.Request) []Entrypoint

type Multipart

type Multipart struct {
	Key string
	// contains filtered or unexported fields
}

Multipart represents a multipart entrypoint. It is used to inject payloads into the request's multipart attachments. Both, keys and values can be injected.

func NewMultipartName

func NewMultipartName(key string) Multipart

func NewMultipartValue

func NewMultipartValue(key string) Multipart

func (Multipart) InjectPayload

func (e Multipart) InjectPayload(req request.Request, pos profile.PayloadPosition, payload string) request.Request

func (Multipart) InsertionPointType

func (b Multipart) InsertionPointType() profile.InsertionPointType

func (Multipart) Param

func (e Multipart) Param(_ string) string

func (Multipart) Value

func (b Multipart) Value() string

type MultipartFinder

type MultipartFinder struct{}

MultipartFinder is used to find entrypoints in the request's multipart form.

func NewMultipartFinder

func NewMultipartFinder() MultipartFinder

NewMultipartFinder instantiates a new MultipartFinder.

func (MultipartFinder) Find

func (f MultipartFinder) Find(req request.Request) []Entrypoint

type Path

type Path struct {
	Prefix string
	// contains filtered or unexported fields
}

Path represents a path entrypoint. It is used to inject payloads into the request's path.

func (Path) InjectPayload

func (e Path) InjectPayload(req request.Request, pos profile.PayloadPosition, payload string) request.Request

func (Path) InsertionPointType

func (b Path) InsertionPointType() profile.InsertionPointType

func (Path) Param

func (b Path) Param(_ string) string

func (Path) Value

func (b Path) Value() string

type PathFinder

type PathFinder struct{}

PathFinder is used to find entrypoints in the request's path.

func NewPathFinder

func NewPathFinder() PathFinder

NewPathFinder instantiates a new PathFinder.

func (PathFinder) Find

func (PathFinder) Find(req request.Request) []Entrypoint

type Query

type Query struct {
	Prefix string
	Suffix string
	// contains filtered or unexported fields
}

Query represents a query entrypoint. It is used to inject payloads into the request's query parameters. Both, keys and values can be injected.

func (Query) InjectPayload

func (e Query) InjectPayload(req request.Request, pos profile.PayloadPosition, payload string) request.Request

func (Query) InsertionPointType

func (b Query) InsertionPointType() profile.InsertionPointType

func (Query) Param

func (e Query) Param(payload string) string

func (Query) Value

func (b Query) Value() string

type QueryFinder

type QueryFinder struct{}

QueryFinder is used to find entrypoints in the request's query.

func NewQueryFinder

func NewQueryFinder() QueryFinder

NewQueryFinder instantiates a new QueryFinder.

func (QueryFinder) Find

func (f QueryFinder) Find(req request.Request) []Entrypoint

type URL

type URL struct {
	Prefix string
	Suffix string
	// contains filtered or unexported fields
}

URL represents a URL entrypoint. It is used to inject payloads into the request's URL.

func (URL) InjectPayload

func (e URL) InjectPayload(req request.Request, pos profile.PayloadPosition, payload string) request.Request

func (URL) InsertionPointType

func (b URL) InsertionPointType() profile.InsertionPointType

func (URL) Param

func (b URL) Param(_ string) string

func (URL) Value

func (b URL) Value() string

type URLFinder

type URLFinder struct{}

URLFinder is used to find entrypoints in the request's URL.

func NewURLFinder

func NewURLFinder() URLFinder

NewURLFinder instantiates a new URLFinder.

func (URLFinder) Find

func (f URLFinder) Find(req request.Request) []Entrypoint

type XMLParam

type XMLParam struct {
	Base string
	// contains filtered or unexported fields
}

XMLParam represents an XML entrypoint. It is used to inject payloads into the request's XML parameters and attributes. Both, keys and values can be injected.

func (XMLParam) InjectPayload

func (e XMLParam) InjectPayload(req request.Request, pos profile.PayloadPosition, payload string) request.Request

func (XMLParam) InsertionPointType

func (b XMLParam) InsertionPointType() profile.InsertionPointType

func (XMLParam) Param

func (e XMLParam) Param(payload string) string

func (XMLParam) Value

func (b XMLParam) Value() string

type XMLParamFinder

type XMLParamFinder struct {
	// contains filtered or unexported fields
}

XMLParamFinder is used to find entrypoints in the request's XML body.

func NewXMLParamFinder

func NewXMLParamFinder() *XMLParamFinder

NewXMLParamFinder instantiates a new XMLParamFinder.

func (*XMLParamFinder) Find

func (f *XMLParamFinder) Find(req request.Request) []Entrypoint

Jump to

Keyboard shortcuts

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