Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IndexAllSubstrings ¶
IndexAllSubstrings 只遍历一次查找所有子串位置 返回值是一个二维数组,每个元素是一个[2]int类型匹配结果,其中第一个元素是规则index,第二个元素是索引位置
Types ¶
type BaseTag ¶
type Escaper ¶
type Escaper struct {
// contains filtered or unexported fields
}
func NewDefaultEscaper ¶
type FuzzResult ¶
type FuzzResult struct { Source []any // []*FuzzResult | [][]byte Data any // []byte | string ByTag bool Verbose string Contact bool Error error }
func NewFuzzResult ¶
func NewFuzzResult() *FuzzResult
func NewFuzzResultWithData ¶
func NewFuzzResultWithData(d any) *FuzzResult
func NewFuzzResultWithDataVerbose ¶
func NewFuzzResultWithDataVerbose(d any, v string) *FuzzResult
func (*FuzzResult) GetData ¶
func (f *FuzzResult) GetData() []byte
func (*FuzzResult) GetVerbose ¶
func (f *FuzzResult) GetVerbose() []string
type GenerateConfig ¶
type GenerateConfig struct {
AssertError bool
}
type Generator ¶
type Generator struct { *GenerateConfig AssertError bool Error error // contains filtered or unexported fields }
func (*Generator) RawResult ¶ added in v1.3.3
func (g *Generator) RawResult() []*FuzzResult
func (*Generator) Result ¶
func (g *Generator) Result() *FuzzResult
func (*Generator) SetTagsSync ¶ added in v1.2.9
type MethodContext ¶
type MethodContext struct {
// contains filtered or unexported fields
}
func (*MethodContext) UpdateLabels ¶
func (m *MethodContext) UpdateLabels(tag *TagExecNode)
UpdateLabels 更新全局labelTable,先删除当前tag的所有label映射,再增加
type StringExecNode ¶
type StringExecNode struct {
// contains filtered or unexported fields
}
String
func (*StringExecNode) Exec ¶
func (s *StringExecNode) Exec() (bool, error)
func (*StringExecNode) FirstExec ¶
func (s *StringExecNode) FirstExec() error
func (*StringExecNode) IsRep ¶
func (s *StringExecNode) IsRep() bool
func (*StringExecNode) Reset ¶
func (s *StringExecNode) Reset()
type TagDefine ¶
type TagDefine struct {
// contains filtered or unexported fields
}
TagDefine 自定义tag类型
func NewTagDefine ¶
NewTagDefine hooks参数用于判断数据是否需要解析tag
type TagExecNode ¶
type TagExecNode struct {
// contains filtered or unexported fields
}
func NewTagGenerator ¶
func NewTagGenerator(tag TagNode, ctx *MethodContext) *TagExecNode
func (*TagExecNode) Exec ¶
func (f *TagExecNode) Exec() (bool, error)
func (*TagExecNode) FirstExec ¶
func (f *TagExecNode) FirstExec(bp, exec, all bool) error
FirstExec 重置并执行
func (*TagExecNode) FirstExecWithBackpropagation ¶ added in v1.2.9
func (f *TagExecNode) FirstExecWithBackpropagation(bp, exec, all bool) error
func (*TagExecNode) IsRep ¶
func (s *TagExecNode) IsRep() bool
func (*TagExecNode) Reset ¶
func (s *TagExecNode) Reset()
Click to show internal directories.
Click to hide internal directories.