fuzztag

package
v1.3.5-alpha0828 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenType_TAG_OPEN    = "TAG_OPEN"
	TokenType_TAG_CLOSE   = "TAG_CLOSE"
	TokenType_DATA        = "DATA"
	TokenType_METHOND     = "Method"
	TokenType_LEFT_PAREN  = "LEFT_PAREN"
	TokenType_RIGHT_PAREN = "RIGHT_PAREN"
)
View Source
const (
	TAG_OPEN            = "{{"
	TAG_OPEN_VERBOSE    = "TAG_OPEN"
	TAG_CLOSE           = "}}"
	TAG_CLOSE_VERBOSE   = "TAG_CLOSE"
	LEFT_PAREN          = '('
	LEFT_PAREN_VERBOSE  = "LEFT_PAREN"
	RIGHT_PAREN         = ')'
	RIGHT_PAREN_VERBOSE = "RIGHT_PAREN"
)
View Source
const YakHotPatchErr = "__YakHotPatchErr@"

Variables

This section is empty.

Functions

func ExecuteWithHandler

func ExecuteWithHandler(i interface{}, m map[string]func([]byte) [][]byte) ([]string, error)

func ExecuteWithHandlerWithCallback

func ExecuteWithHandlerWithCallback(i interface{}, m map[string]func([]byte) [][]byte, cb func([]byte, [][]byte) bool) (res []string, err error)

func ExecuteWithStringHandler

func ExecuteWithStringHandler(i interface{},
	mStr map[string]func(string) []string,
) ([]string, error)

func ExecuteWithStringHandlerWithCallback

func ExecuteWithStringHandlerWithCallback(
	i interface{},
	mStr map[string]func(string) []string,
	cb func(string, []string) bool,
) ([]string, error)

func ExecuteWithStringHandlerWithCallbackEx

func ExecuteWithStringHandlerWithCallbackEx(
	i interface{},
	mStr map[string]func(string) []string,
	mStrEx map[string]func(string) []*FuzzExecResult,
	cb func(string, []string) bool,
) ([]string, error)

func GetMethodAlias

func GetMethodAlias(name string) string

func SetMethodAlias

func SetMethodAlias(origin string, names ...string)

Types

type DataGenerator

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

func NewDataGenerator

func NewDataGenerator() *DataGenerator

type DataNode

type DataNode struct {
	InParentTagNode bool
	// contains filtered or unexported fields
}

func NewDataNode

func NewDataNode(t ...*token) *DataNode

func (*DataNode) Execute

func (d *DataNode) Execute(m map[string]func([]byte) [][]byte) [][]byte

func (*DataNode) IsExecutable

func (d *DataNode) IsExecutable() bool

func (*DataNode) ToBytes

func (d *DataNode) ToBytes() []byte

type DataPart

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

type ExecutableNode

type ExecutableNode interface {
	ToBytes() []byte
	Execute(map[string]func([]byte) [][]byte) [][]byte
}

type FuzzExecResult

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

func NewFuzzExecResult

func NewFuzzExecResult(data []byte, showInfo []string) *FuzzExecResult

func (*FuzzExecResult) Data added in v1.2.8

func (f *FuzzExecResult) Data() []byte

func (*FuzzExecResult) ShowInfo added in v1.2.8

func (f *FuzzExecResult) ShowInfo() []string

type FuzzTagAST

type FuzzTagAST struct {
	Lexer *FuzzTagLexer
	// contains filtered or unexported fields
}

func ParseToFuzzTagAST

func ParseToFuzzTagAST(l *FuzzTagLexer) (*FuzzTagAST, error)

func (*FuzzTagAST) Execute

func (f *FuzzTagAST) Execute(m map[string]func([]byte) [][]byte) (res [][]byte, err error)

func (*FuzzTagAST) ExecuteWithCallBack

func (f *FuzzTagAST) ExecuteWithCallBack(m map[string]func([]byte) [][]byte, cb func([]byte, [][]byte) bool) (res [][]byte, err error)

func (*FuzzTagAST) NewMethodNode

func (a *FuzzTagAST) NewMethodNode(method string, paramNode ExecutableNode) *TagNode

type FuzzTagLexer

type FuzzTagLexer struct {
	Origin []byte
	// contains filtered or unexported fields
}

func NewFuzzTagLexer

func NewFuzzTagLexer(i interface{}) *FuzzTagLexer

func (*FuzzTagLexer) ShowTokens

func (f *FuzzTagLexer) ShowTokens()

func (*FuzzTagLexer) Tokens

func (f *FuzzTagLexer) Tokens() []*token

type Nodes

type Nodes struct {
	IsRoot bool
	Nodes  []ExecutableNode
	AST    *FuzzTagAST
	InTag  bool
	// contains filtered or unexported fields
}

Nodes 一般是根结点

func (*Nodes) Execute

func (d *Nodes) Execute(m map[string]func([]byte) [][]byte) [][]byte

func (*Nodes) Execute_

func (d *Nodes) Execute_(m map[string]func([]byte) [][]byte) [][]byte

func (*Nodes) SetPayloadCallback

func (n *Nodes) SetPayloadCallback(cb func([]byte, [][]byte) bool)

func (*Nodes) SetRoot

func (d *Nodes) SetRoot()

func (*Nodes) ToBytes

func (d *Nodes) ToBytes() []byte

type SymbolContext

type SymbolContext struct {
	MaxLength     int
	CurrentOffset int
}

type TagNode

type TagNode struct {
	Method string
	Params ExecutableNode
	Symbol int
	Label  string
	AST    *FuzzTagAST

	RawBytes []byte
	// contains filtered or unexported fields
}

func (*TagNode) Execute

func (t *TagNode) Execute(m map[string]func([]byte) [][]byte) [][]byte

func (*TagNode) IsExecutable

func (t *TagNode) IsExecutable() bool

func (*TagNode) ToBytes

func (t *TagNode) ToBytes() []byte

type TokenType

type TokenType string

Jump to

Keyboard shortcuts

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