Documentation
¶
Index ¶
- func IndexAllSubstrings(s string, patterns ...string) (result [][2]int)
- type BaseTag
- type Escaper
- type ExecNode
- type FuzzResult
- type GenerateConfig
- type Generator
- type MethodContext
- type Node
- type StringExecNode
- type StringNode
- type TagDefine
- type TagExecNode
- func (f *TagExecNode) Exec() (bool, error)
- func (f *TagExecNode) FirstExec(bp, exec, all bool) error
- func (f *TagExecNode) FirstExecWithBackpropagation(bp, exec, all bool) error
- func (f *TagExecNode) GetCache(index int) (*FuzzResult, bool, error)
- func (s *TagExecNode) IsRep() bool
- func (s *TagExecNode) Reset()
- type TagMethod
- type TagNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IndexAllSubstrings ¶
IndexAllSubstrings 只遍历一次查找所有子串位置 返回值是一个二维数组,每个元素是一个[2]int类型匹配结果,其中第一个元素是规则index,第二个元素是索引位置
Types ¶
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 // contains filtered or unexported fields }
func (*GenerateConfig) Debug ¶
func (g *GenerateConfig) Debug()
type Generator ¶
type Generator struct { *GenerateConfig AssertError bool Error error // contains filtered or unexported fields }
func NewGenerator ¶
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 StringNode ¶
type StringNode string
func (StringNode) IsNode ¶
func (s StringNode) IsNode()
func (StringNode) String ¶
func (s StringNode) String() string
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) GetCache ¶
func (f *TagExecNode) GetCache(index int) (*FuzzResult, bool, error)
func (*TagExecNode) IsRep ¶
func (s *TagExecNode) IsRep() bool
func (*TagExecNode) Reset ¶
func (s *TagExecNode) Reset()
type TagNode ¶
type TagNode interface { IsNode() Exec(ctx context.Context, raw *FuzzResult, yield func(*FuzzResult), methodTable map[string]*TagMethod) error //Exec(*FuzzResult, func(*FuzzResult), ...map[string]*TagMethod) error AddData(node ...Node) AddLabel(label string) String() string GetData() []Node GetLabels() []string }
Click to show internal directories.
Click to hide internal directories.