injection

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContentLength added in v0.16.7

func GetContentLength(pieces []BodyPiece) int

func StringToBytes added in v0.16.7

func StringToBytes(s string) (b []byte)

Types

type BodyPiece added in v0.16.7

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

type DdosifyBodyReader added in v0.16.7

type DdosifyBodyReader struct {
	Body   string // []byte
	Pieces []BodyPiece
	// contains filtered or unexported fields
}

func (*DdosifyBodyReader) Close added in v0.16.7

func (dbr *DdosifyBodyReader) Close() error

no-op close

func (*DdosifyBodyReader) Read added in v0.16.7

func (dbr *DdosifyBodyReader) Read(dst []byte) (n int, err error)

type EnvMatch added in v0.16.7

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

type EnvMatchSlice added in v0.16.7

type EnvMatchSlice []EnvMatch

func (EnvMatchSlice) Len added in v0.16.7

func (a EnvMatchSlice) Len() int

func (EnvMatchSlice) Less added in v0.16.7

func (a EnvMatchSlice) Less(i, j int) bool

func (EnvMatchSlice) Swap added in v0.16.7

func (a EnvMatchSlice) Swap(i, j int)

type EnvironmentInjector

type EnvironmentInjector struct {
	// contains filtered or unexported fields
}
Example
replacer := EnvironmentInjector{}
replacer.Init()

res, err := replacer.InjectDynamic("{{_randomInt}}")
if err == nil {
	fmt.Println(res)
}
Output:

func (*EnvironmentInjector) GenerateBodyPieces added in v0.16.7

func (ei *EnvironmentInjector) GenerateBodyPieces(body string, envs map[string]interface{}) []BodyPiece

func (*EnvironmentInjector) Init

func (ei *EnvironmentInjector) Init()

func (*EnvironmentInjector) InjectDynamic

func (ei *EnvironmentInjector) InjectDynamic(text string) (string, error)

func (*EnvironmentInjector) InjectEnv

func (ei *EnvironmentInjector) InjectEnv(text string, envs map[string]interface{}) (string, error)

Jump to

Keyboard shortcuts

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