engine

package
v0.0.0-...-0f5f40a Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildHTMLReport

func BuildHTMLReport(result []*Result) (string, error)

func InitYamlPoC

func InitYamlPoC(s string) (map[string]interface{}, error)

func InitYamlPoCFromBytes

func InitYamlPoCFromBytes(
	ctx context.Context,
	c *client.HttpClient,
	data []byte,
) (*base.POC, error)

func InitYamlPoCFromInterface

func InitYamlPoCFromInterface(
	ctx context.Context,
	c *client.HttpClient,
	object map[string]interface{},
) (*base.POC, error)

func NewResultHTML

func NewResultHTML(pocList *base.List[*base.POC]) (string, error)

func NewResultJson

func NewResultJson(pocList *base.List[*base.POC]) (string, error)

func NewResultTxt

func NewResultTxt(pocList *base.List[*base.POC]) (string, error)

func RunPOC

func RunPOC(poc *base.POC, t string) (bool, error)

func Start

func Start(ctx context.Context, cancel context.CancelFunc)

Types

type RespHeaderValue

type RespHeaderValue struct {
	Headers map[string][]string
}

func (*RespHeaderValue) Get

func (r *RespHeaderValue) Get(name string) (expression.EValue, error)

func (*RespHeaderValue) Keys

func (r *RespHeaderValue) Keys() []string

func (*RespHeaderValue) ToString

func (r *RespHeaderValue) ToString() expression.EString

type RespValue

type RespValue struct {
	Status  expression.EInt
	Body    expression.EValue
	Headers *RespHeaderValue
}

func (*RespValue) Get

func (r *RespValue) Get(name string) (expression.EValue, error)

func (*RespValue) Keys

func (r *RespValue) Keys() []string

func (*RespValue) ToString

func (r *RespValue) ToString() expression.EString

type Result

type Result struct {
	PocName string                   `json:"poc_name"`
	Target  string                   `json:"target"`
	Details map[string]*ResultDetail `json:"details"`
}

Result 扫描结果

type ResultDetail

type ResultDetail struct {
	Req    string `json:"req"`
	Resp   string `json:"resp"`
	Result bool   `json:"result"`
}

type Rule

type Rule map[string]expression.EFunction

func (Rule) GetValue

func (r Rule) GetValue(_ *expression.Environment, key string) (expression.EValue, error)

type RuleFunction

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

func (*RuleFunction) Call

func (*RuleFunction) ToString

func (f *RuleFunction) ToString() expression.EString

Jump to

Keyboard shortcuts

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