Documentation
¶
Index ¶
- Constants
- Variables
- func CheckingDNSLogOOB(token string, runtimeID string, templateName string, timeout ...float64) (string, []byte)
- func ExecNucleiDSL(raw string, vars map[string]any) (result any, err error)
- func ExtractKValFromBody(body string) map[string]interface{}
- func ExtractKValFromResponse(rsp []byte) map[string]interface{}
- func ExtractResultToString(i interface{}) string
- func FuzzCalcExpr() map[string]any
- func FuzzCalcExpr2() map[string]any
- func FuzzCalcExpr3() map[string]any
- func FuzzNucleiTag(raw string, vars map[string]any, payload map[string][]string, mode string) (result [][]byte, err error)
- func GetNucleiDSLFunctions() map[string]interface{}
- func GetPublicIP() string
- func IsExprReady(expr string, m map[string]interface{}) (bool, []string)
- func LoadPayloads(data map[string]any) map[string][]string
- func LoadVarFromRawResponse(rsp []byte, duration float64, sufs ...string) map[string]interface{}
- func MockEchoPlugin(onTokens ...func(string)) (string, func(), error)
- func QuickFuzzNucleiTag(raw string, vars map[string]any) (result string, err error)
- func RequireOOBAddr(timeout ...float64) (string, string, error)
- func ScanAuto(items any, opt ...interface{})
- func ScanLegacy(target any, opt ...interface{}) (chan *tools.PocVul, error)
- func ScanLegacyWithFilter(target any, filterVul filter.Filterable, opt ...interface{}) (chan *tools.PocVul, error)
- func ScanPacket(req []byte, opts ...interface{}) (count uint64)
- func ScanUrl(u string, opt ...interface{}) (count uint64)
- func WhatsMyIP() (string, error)
- type Config
- func (c *Config) AppendHTTPResultCallback(handler HTTPResultCallback)
- func (c *Config) AppendResultCallback(handler ResultCallback)
- func (c *Config) AppendTCPResultCallback(handler TCPResultCallback)
- func (c *Config) ExecuteResultCallback(y *YakTemplate, bulk *YakRequestBulkConfig, rsp []*lowhttp.LowhttpResponse, ...)
- func (c *Config) ExecuteTCPResultCallback(y *YakTemplate, bulk *YakNetworkBulkConfig, rsp []*NucleiTcpResponse, ...)
- func (c *Config) GenerateYakTemplate() (chan *YakTemplate, error)
- func (c *Config) IsNuclei() bool
- type ConfigOption
- func WithAllTemplate(b bool) ConfigOption
- func WithBeforeSendPackage(f func(data []byte, isHttps bool) []byte) ConfigOption
- func WithConcurrentInTemplates(i int) ConfigOption
- func WithConcurrentTarget(i int) ConfigOption
- func WithConcurrentTemplates(i int) ConfigOption
- func WithContext(c context.Context) ConfigOption
- func WithCustomVulnFilter(f filter.Filterable) ConfigOption
- func WithDebug(b bool) ConfigOption
- func WithDebugRequest(b bool) ConfigOption
- func WithDebugResponse(b bool) ConfigOption
- func WithEnableReverseConnectionFeature(b bool) ConfigOption
- func WithExactTemplateInstance(script *schema.YakScript) ConfigOption
- func WithExcludeTemplates(s ...string) ConfigOption
- func WithFuzzQueryTemplate(s ...string) ConfigOption
- func WithHttpTplRuntimeId(id string) ConfigOption
- func WithMode(s string) ConfigOption
- func WithOOBRequireCallback(f func(...float64) (string, string, error)) ConfigOption
- func WithOOBRequireCheckingTrigger(f func(string, string, ...float64) (string, []byte)) ConfigOption
- func WithOOBTimeout(f float64) ConfigOption
- func WithOnRisk(target string, onRisk func(i *schema.Risk)) ConfigOption
- func WithOnTemplateLoaded(f func(template *YakTemplate) bool) ConfigOption
- func WithResultCallback(f HTTPResultCallback) ConfigOption
- func WithTCPResultCallback(f TCPResultCallback) ConfigOption
- func WithTags(f ...string) ConfigOption
- func WithTemplateName(s ...string) ConfigOption
- func WithTemplateRaw(b string) ConfigOption
- func WithVerbose(b bool) ConfigOption
- type HTTPResultCallback
- type NucleiDSL
- func (d *NucleiDSL) Execute(expr string, items ...map[string]interface{}) (interface{}, error)
- func (d *NucleiDSL) ExecuteAsBool(expr string, items ...map[string]interface{}) (bool, error)
- func (d *NucleiDSL) ExecuteWithOnGetVar(expr string, getter func(name string) (any, bool), ...) (interface{}, error)
- func (d *NucleiDSL) GetUndefinedVarNames(expr string, extra map[string]interface{}) []string
- func (d *NucleiDSL) MergeExternalGetter(getters ...func(string) (any, bool)) func(string) (any, bool)
- type NucleiTag
- type NucleiTagData
- type NucleiTcpResponse
- type RequestBulk
- type RequestConfig
- type RespForMatch
- type ResultCallback
- type TCPRequestBulk
- type TCPResultCallback
- type TemplateVarType
- type TemplateVarTypePrefix
- type Var
- type YakExtractor
- type YakHTTPRequestPacket
- type YakMatcher
- func (y *YakMatcher) Execute(rsp *RespForMatch, vars map[string]interface{}, suf ...string) (bool, error)
- func (y *YakMatcher) ExecuteRaw(rsp []byte, vars map[string]interface{}, suf ...string) (bool, error)
- func (y *YakMatcher) ExecuteRawResponse(rsp []byte, vars map[string]interface{}, suf ...string) (bool, error)
- func (y *YakMatcher) ExecuteRawWithConfig(config *Config, rsp []byte, vars map[string]interface{}, suf ...string) (bool, error)
- func (y *YakMatcher) ExecuteWithConfig(config *Config, rsp *RespForMatch, vars map[string]interface{}, suf ...string) (bool, error)
- type YakNetworkBulkConfig
- type YakPayload
- type YakPayloads
- type YakRequestBulkConfig
- type YakTcpHosts
- type YakTcpInput
- type YakTemplate
- func (y *YakTemplate) CheckTemplateRisks() error
- func (y *YakTemplate) Exec(config *Config, isHttps bool, reqOrigin []byte, opts ...lowhttp.LowhttpOpt) (int, error)
- func (y *YakTemplate) ExecWithUrl(u string, config *Config, opts ...lowhttp.LowhttpOpt) (int, error)
- func (y *YakTemplate) GenerateRequestSequences(u string, renderPayload bool) []*RequestBulk
- func (y *YakTemplate) InjectInteractshVar(token string, runtimeID string, vars map[string]any)
- func (y *YakTemplate) NoMatcherAndExtractor() bool
- func (y *YakTemplate) SignMainParams() string
- type YakVariables
- func (v *YakVariables) AutoSet(key string, value any)
- func (v *YakVariables) Foreach(f func(key string, value *Var))
- func (v *YakVariables) Get(key string) (*Var, bool)
- func (v *YakVariables) Keys() []string
- func (v *YakVariables) Len() int
- func (v *YakVariables) Set(key string, value any)
- func (v *YakVariables) SetAsNucleiTags(key string, value any)
- func (v *YakVariables) SetNucleiDSL(key string, value any)
- func (v *YakVariables) SetWithType(key string, value any, typeName string) error
- func (v *YakVariables) ToMap() map[string]any
Constants ¶
View Source
const ( MATCHER_TYPE_STATUS_CODE = "status_code" MATCHER_TYPE_CL = "content_length" MATCHER_TYPE_BIN = "binary" MATCHER_TYPE_WORD = "word" MATCHER_TYPE_REGEXP = "regexp" MATCHER_TYPE_SUFFIX = "suffix" MATCHER_TYPE_EXPR = "expr" MATCHER_TYPE_GLOB = "glob" MATCHER_TYPE_MIME = "mime" )
View Source
const ( SCOPE_STATUS_CODE = "status_code" SCOPE_HEADER = "header" SCOPE_BODY = "body" SCOPE_RAW = "raw" SCOPE_INTERACTSH_PROTOCOL = "interactsh_protocol" SCOPE_INTERACTSH_REQUEST = "interactsh_request" )
View Source
const ( GROUP_ENCODING_HEX = "hex" GROUP_ENCODING_BASE64 = "base64" )
View Source
const (
EXPR_TYPE_NUCLEI_DSL = "nuclei-dsl"
)
Variables ¶
View Source
var Exports = map[string]interface{}{ "Scan": ScanLegacy, "ScanAuto": ScanAuto, "customVulnFilter": WithCustomVulnFilter, "tags": WithTags, "excludeTags": nucleiOptionDummy("excludeTags"), "workflows": nucleiOptionDummy("workflows"), "templates": WithTemplateName, "excludeTemplates": WithExcludeTemplates, "templatesDir": nucleiOptionDummy("templatesDir"), "headers": nucleiOptionDummy("headers"), "severity": nucleiOptionDummy("severity"), "output": nucleiOptionDummy("output"), "proxy": lowhttp.WithProxy, "logFile": nucleiOptionDummy("logFile"), "reportingDB": nucleiOptionDummy("reportingDB"), "reportingConfig": nucleiOptionDummy("reportingConfig"), "bulkSize": WithConcurrentTemplates, "templatesThreads": WithConcurrentInTemplates, "timeout": _timeout, "pageTimeout": _timeout, "retry": lowhttp.WithRetryTimes, "rateLimit": rateLimit, "headless": nucleiOptionDummy("headless"), "showBrowser": nucleiOptionDummy("showBrowser"), "dnsResolver": lowhttp.WithDNSServers, "systemDnsResolver": nucleiOptionDummy("systemDnsResolver"), "metrics": nucleiOptionDummy("metrics"), "debug": WithDebug, "interactshTimeout": WithOOBTimeout, "debugRequest": WithDebugRequest, "debugResponse": WithDebugResponse, "silent": nucleiOptionDummy("silent"), "version": nucleiOptionDummy("version"), "verbose": WithVerbose, "noColor": nucleiOptionDummy("noColor"), "updateTemplates": nucleiOptionDummy("updateTemplates"), "templatesVersion": nucleiOptionDummy("templatesVersion"), "templateList": nucleiOptionDummy("templateList"), "stopAtFirstMatch": nucleiOptionDummy("stopAtFirstMatch"), "noMeta": nucleiOptionDummy("noMeta"), "newTemplates": nucleiOptionDummy("newTemplates"), "noInteractsh": noInteractsh, "reverseUrl": nucleiOptionDummy("reverseUrl"), "enableReverseConnection": WithEnableReverseConnectionFeature, "targetConcurrent": WithConcurrentTarget, "rawTemplate": WithTemplateRaw, "fuzzQueryTemplate": WithFuzzQueryTemplate, "exactTemplateIns": WithExactTemplateInstance, "all": WithAllTemplate, "runtimeId": WithHttpTplRuntimeId, "mode": WithMode, "resultCallback": _callback, "tcpResultCallback": _tcpCallback, "https": lowhttp.WithHttps, "http2": lowhttp.WithHttp2, "http3": lowhttp.WithHttp3, "fromPlugin": lowhttp.WithFromPlugin, "context": WithContext, }
View Source
var (
PublicIPGetOnce sync.Once
)
Functions ¶
func CheckingDNSLogOOB ¶
func ExecNucleiDSL ¶
ExecNucleiDSL 执行包含tag的字符串
func ExtractKValFromBody ¶
func ExtractKValFromResponse ¶
func ExtractResultToString ¶
func ExtractResultToString(i interface{}) string
func FuzzCalcExpr ¶
func FuzzCalcExpr2 ¶
func FuzzCalcExpr3 ¶
func FuzzNucleiTag ¶
func FuzzNucleiTag(raw string, vars map[string]any, payload map[string][]string, mode string) (result [][]byte, err error)
FuzzNucleiTag 使用payload对包含tag的字符串进行fuzz
func GetNucleiDSLFunctions ¶
func GetNucleiDSLFunctions() map[string]interface{}
func GetPublicIP ¶
func GetPublicIP() string
func LoadVarFromRawResponse ¶
func MockEchoPlugin ¶
func QuickFuzzNucleiTag ¶
QuickFuzzNucleiTag 渲染变量 (只渲染变量不执行)
func ScanLegacyWithFilter ¶
func ScanPacket ¶
Types ¶
type Config ¶
type Config struct {
// Templates 内部 HTTP 网络并发
ConcurrentInTemplates int
// Templates 外部 HTTP 网络并发
ConcurrentTemplates int
// ConcurrentTarget 批量扫描的并发
ConcurrentTarget int
Callback ResultCallback
// runtime id for match task
RuntimeId string
Ctx context.Context
// nuclei / xray
Mode string
EnableReverseConnectionFeature bool
// 搜索 yakit.YakScript
SingleTemplateRaw string
ExactTemplateInstances []*schema.YakScript
TemplateName []string
FuzzQueryTemplate []string
ExcludeTemplates []string
Tags []string
QueryAll bool
// DebugMode
Debug bool
DebugRequest bool
DebugResponse bool
Verbose bool
OOBTimeout float64
OOBRequireCallback func(...float64) (string, string, error)
OOBRequireCheckingTrigger func(string, string, ...float64) (string, []byte)
// onTempalteLoaded
OnTemplateLoaded func(*YakTemplate) bool
BeforeSendPackage func(data []byte, isHttps bool) []byte
// contains filtered or unexported fields
}
func NewConfig ¶
func NewConfig(opts ...ConfigOption) *Config
func (*Config) AppendHTTPResultCallback ¶
func (c *Config) AppendHTTPResultCallback(handler HTTPResultCallback)
func (*Config) AppendResultCallback ¶
func (c *Config) AppendResultCallback(handler ResultCallback)
func (*Config) AppendTCPResultCallback ¶
func (c *Config) AppendTCPResultCallback(handler TCPResultCallback)
func (*Config) ExecuteResultCallback ¶
func (c *Config) ExecuteResultCallback(y *YakTemplate, bulk *YakRequestBulkConfig, rsp []*lowhttp.LowhttpResponse, result bool, extractor map[string]interface{})
func (*Config) ExecuteTCPResultCallback ¶
func (c *Config) ExecuteTCPResultCallback(y *YakTemplate, bulk *YakNetworkBulkConfig, rsp []*NucleiTcpResponse, result bool, extractor map[string]interface{})
func (*Config) GenerateYakTemplate ¶
func (c *Config) GenerateYakTemplate() (chan *YakTemplate, error)
type ConfigOption ¶
type ConfigOption func(*Config)
func WithAllTemplate ¶
func WithAllTemplate(b bool) ConfigOption
func WithBeforeSendPackage ¶
func WithBeforeSendPackage(f func(data []byte, isHttps bool) []byte) ConfigOption
func WithConcurrentInTemplates ¶
func WithConcurrentInTemplates(i int) ConfigOption
func WithConcurrentTarget ¶
func WithConcurrentTarget(i int) ConfigOption
func WithConcurrentTemplates ¶
func WithConcurrentTemplates(i int) ConfigOption
func WithContext ¶
func WithContext(c context.Context) ConfigOption
func WithCustomVulnFilter ¶
func WithCustomVulnFilter(f filter.Filterable) ConfigOption
func WithDebug ¶
func WithDebug(b bool) ConfigOption
func WithDebugRequest ¶
func WithDebugRequest(b bool) ConfigOption
func WithDebugResponse ¶
func WithDebugResponse(b bool) ConfigOption
func WithEnableReverseConnectionFeature ¶
func WithEnableReverseConnectionFeature(b bool) ConfigOption
func WithExactTemplateInstance ¶
func WithExactTemplateInstance(script *schema.YakScript) ConfigOption
func WithExcludeTemplates ¶
func WithExcludeTemplates(s ...string) ConfigOption
func WithFuzzQueryTemplate ¶
func WithFuzzQueryTemplate(s ...string) ConfigOption
func WithHttpTplRuntimeId ¶
func WithHttpTplRuntimeId(id string) ConfigOption
func WithMode ¶
func WithMode(s string) ConfigOption
func WithOOBRequireCallback ¶
func WithOOBRequireCallback(f func(...float64) (string, string, error)) ConfigOption
func WithOOBTimeout ¶
func WithOOBTimeout(f float64) ConfigOption
func WithOnRisk ¶
func WithOnRisk(target string, onRisk func(i *schema.Risk)) ConfigOption
func WithOnTemplateLoaded ¶
func WithOnTemplateLoaded(f func(template *YakTemplate) bool) ConfigOption
func WithResultCallback ¶
func WithResultCallback(f HTTPResultCallback) ConfigOption
func WithTCPResultCallback ¶
func WithTCPResultCallback(f TCPResultCallback) ConfigOption
func WithTags ¶
func WithTags(f ...string) ConfigOption
func WithTemplateName ¶
func WithTemplateName(s ...string) ConfigOption
func WithTemplateRaw ¶
func WithTemplateRaw(b string) ConfigOption
func WithVerbose ¶
func WithVerbose(b bool) ConfigOption
type HTTPResultCallback ¶
type HTTPResultCallback func(y *YakTemplate, reqBulk *YakRequestBulkConfig, rsp []*lowhttp.LowhttpResponse, result bool, extractor map[string]interface{})
type NucleiDSL ¶
type NucleiDSL struct {
Functions map[string]interface{}
ExternalVarGetter func(string) (any, bool)
}
func NewNucleiDSLYakSandbox ¶
func NewNucleiDSLYakSandbox() *NucleiDSL
func (*NucleiDSL) ExecuteAsBool ¶
func (*NucleiDSL) ExecuteWithOnGetVar ¶
func (*NucleiDSL) GetUndefinedVarNames ¶
type NucleiTag ¶
type NucleiTagData ¶
type NucleiTcpResponse ¶
type RequestBulk ¶
type RequestBulk struct {
Requests []*requestRaw
RequestConfig *YakRequestBulkConfig
}
type RequestConfig ¶
type RequestConfig struct {
JsEnableRedirect bool
JsMaxRedirects int
EnableRedirect bool
MaxRedirects int
EtcHosts map[string]string
DNSServers []string
Variables *YakVariables
RepeatTimes int64
RetryInStatusCode string
RetryNotInStatusCode string
Concurrent int64
MaxRetryTimes int64
DelayMinSeconds float64
DelayMaxSeconds float64
ForceFuzz bool
RequestTimeout float64
NoSystemProxy bool
Proxy string
Host string
IsGmTLS bool
IsHTTPS bool
}
type RespForMatch ¶
type ResultCallback ¶
type ResultCallback func(y *YakTemplate, reqBulk any, rsp any, result bool, extractor map[string]interface{})
func HTTPResultCallbackWrapper ¶
func HTTPResultCallbackWrapper(callback HTTPResultCallback) ResultCallback
func TCPResultCallbackWrapper ¶
func TCPResultCallbackWrapper(callback TCPResultCallback) ResultCallback
type TCPRequestBulk ¶
type TCPRequestBulk struct {
NetworkBulkConfig *YakNetworkBulkConfig
}
type TCPResultCallback ¶
type TCPResultCallback func(y *YakTemplate, reqBulk *YakNetworkBulkConfig, rsp []*NucleiTcpResponse, result bool, extractor map[string]interface{})
type TemplateVarType ¶
type TemplateVarType string
const ( FuzztagType TemplateVarType = "fuzztag" RawType TemplateVarType = "raw" NucleiDslType TemplateVarType = "nuclei-dsl" NucleiDynDataType TemplateVarType = "nuclei-dyn-data" )
type TemplateVarTypePrefix ¶
type TemplateVarTypePrefix string
const ( FuzztagPrefix TemplateVarTypePrefix = "@fuzztag" RawPrefix TemplateVarTypePrefix = "@raw" )
type Var ¶
type Var struct {
Type TemplateVarType // 需要在保证nuclei中可以正确解析的情况下,携带类型信息,所以对于除nuclei-dsl类型的变量,在值前增加@raw、@fuzztag标记类型
Data any
}
type YakExtractor ¶
type YakExtractor struct {
Id int
Name string // name or index
// regexp
// json
// kval
// xpath
// nuclei-dsl
Type string
// body
// header
// all
Scope string // header body all
Groups []string
RegexpMatchGroup []int
RegexpMatchGroupName []string
XPathAttribute string
}
func NewExtractorFromGRPCModel ¶
func NewExtractorFromGRPCModel(m *ypb.HTTPResponseExtractor) *YakExtractor
type YakHTTPRequestPacket ¶
type YakHTTPRequestPacket struct {
Request string
// @SNI
SNI string
// @Timeout
Timeout time.Duration
// @Host
OverrideHost string
}
func (*YakHTTPRequestPacket) GenerateRaw ¶
func (s *YakHTTPRequestPacket) GenerateRaw() []*requestRaw
type YakMatcher ¶
type YakMatcher struct {
// status
// content_length
// binary
// word
// regexp
// expr
Id int // first request means 1 second request means 2
MatcherType string
/*
nuclei-dsl
all_headers
status_code
content_length
body
raw
*/
ExprType string
// status
// header
// body
// raw
// interactsh_protocol
Scope string
// or
// and
Condition string
Group []string
GroupEncoding string
Negative bool
// or / and
SubMatcherCondition string
SubMatchers []*YakMatcher
// record poc name / script name or some verbose
TemplateName string
}
func NewMatcherFromGRPCModel ¶
func NewMatcherFromGRPCModel(m *ypb.HTTPResponseMatcher) *YakMatcher
func NewMatcherSliceFromGRPCModel ¶
func NewMatcherSliceFromGRPCModel(m []*ypb.HTTPResponseMatcher) []*YakMatcher
func (*YakMatcher) Execute ¶
func (y *YakMatcher) Execute(rsp *RespForMatch, vars map[string]interface{}, suf ...string) (bool, error)
func (*YakMatcher) ExecuteRaw ¶
func (*YakMatcher) ExecuteRawResponse ¶
func (*YakMatcher) ExecuteRawWithConfig ¶
func (*YakMatcher) ExecuteWithConfig ¶
func (y *YakMatcher) ExecuteWithConfig(config *Config, rsp *RespForMatch, vars map[string]interface{}, suf ...string) (bool, error)
type YakNetworkBulkConfig ¶
type YakNetworkBulkConfig struct {
Inputs []*YakTcpInput
Hosts []string
ReadSize int
Matcher *YakMatcher
Extractor []*YakExtractor
ReverseConnectionNeed bool
}
func (*YakNetworkBulkConfig) Execute ¶
func (y *YakNetworkBulkConfig) Execute( config *Config, vars map[string]interface{}, params map[string]string, lowhttpConfig *lowhttp.LowhttpExecConfig, template *YakTemplate, callback func(rsp []*NucleiTcpResponse, matched bool, extractorResults map[string]any), ) error
type YakPayload ¶
type YakPayloads ¶
type YakPayloads struct {
// contains filtered or unexported fields
}
func NewYakPayloads ¶
func NewYakPayloads(data map[string]any) (*YakPayloads, error)
func (*YakPayloads) AddPayloads ¶
func (y *YakPayloads) AddPayloads(data map[string]any) error
func (*YakPayloads) GetData ¶
func (y *YakPayloads) GetData() map[string][]string
func (*YakPayloads) GetRawMap ¶
func (y *YakPayloads) GetRawMap() map[string]any
func (*YakPayloads) GetRawPayloads ¶
func (y *YakPayloads) GetRawPayloads() map[string]*YakPayload
type YakRequestBulkConfig ¶
type YakRequestBulkConfig struct {
Matcher *YakMatcher
Extractor []*YakExtractor
HTTPRequests []*YakHTTPRequestPacket
StopAtFirstMatch bool
CookieInherit bool
MaxSize int
NoFixContentLength bool
Payloads *YakPayloads
// req-condition - 为 true 的时候,要等所有的请求发送完在执行 Matcher
AfterRequested bool
RenderFuzzTag bool
Method string
Paths []string
Headers map[string]string
Body string
MaxRedirects int
EnableRedirect bool
// batteringram is not valid!
// pitchfork means sync
// cluster bomb means cartesian product
AttackMode string // sync // cartesian
InheritVariables bool
}
func (*YakRequestBulkConfig) GenerateRaw ¶
func (c *YakRequestBulkConfig) GenerateRaw() []*RequestBulk
type YakTcpHosts ¶
type YakTcpHosts struct{}
type YakTcpInput ¶
func (*YakTcpInput) BuildPayload ¶
func (y *YakTcpInput) BuildPayload(vars map[string]any)
type YakTemplate ¶
type YakTemplate struct {
// RequestConfig
Id string `json:"id"`
Name string `json:"name"`
NameZh string `json:"nameZh,omitempty"`
Author string `json:"author"`
Severity string `json:"severity,omitempty"`
Description string `json:"description"`
DescriptionZh string `json:"descriptionZh"`
Reference []string `json:"reference"`
Tags []string `json:"tags"`
CVE string
ShodanQuery string
Verified string
Sign string
// SelfContained
SelfContained bool
// interactsh
ReverseConnectionNeed bool `json:"reverseConnectionNeed"`
TCPRequestSequences []*YakNetworkBulkConfig
HTTPRequestSequences []*YakRequestBulkConfig
// placeHolderMap
PlaceHolderMap map[string]string
Variables *YakVariables
UUID string
ScriptName string
}
func CreateYakTemplateFromNucleiTemplateRaw ¶
func CreateYakTemplateFromNucleiTemplateRaw(tplRaw string) (*YakTemplate, error)
func CreateYakTemplateFromYakScript ¶
func CreateYakTemplateFromYakScript(s *schema.YakScript) (*YakTemplate, error)
func (*YakTemplate) CheckTemplateRisks ¶
func (y *YakTemplate) CheckTemplateRisks() error
func (*YakTemplate) Exec ¶
func (y *YakTemplate) Exec(config *Config, isHttps bool, reqOrigin []byte, opts ...lowhttp.LowhttpOpt) (int, error)
func (*YakTemplate) ExecWithUrl ¶
func (y *YakTemplate) ExecWithUrl(u string, config *Config, opts ...lowhttp.LowhttpOpt) (int, error)
func (*YakTemplate) GenerateRequestSequences ¶
func (y *YakTemplate) GenerateRequestSequences(u string, renderPayload bool) []*RequestBulk
func (*YakTemplate) InjectInteractshVar ¶
func (y *YakTemplate) InjectInteractshVar(token string, runtimeID string, vars map[string]any)
func (*YakTemplate) NoMatcherAndExtractor ¶
func (y *YakTemplate) NoMatcherAndExtractor() bool
func (*YakTemplate) SignMainParams ¶
func (y *YakTemplate) SignMainParams() string
SignMainParams 对 method, paths, headers, body、raw、matcher、extractor、payloads 签名
type YakVariables ¶
type YakVariables struct {
// contains filtered or unexported fields
}
func NewVars ¶
func NewVars() *YakVariables
func (*YakVariables) AutoSet ¶
func (v *YakVariables) AutoSet(key string, value any)
func (*YakVariables) Foreach ¶
func (v *YakVariables) Foreach(f func(key string, value *Var))
func (*YakVariables) Keys ¶
func (v *YakVariables) Keys() []string
func (*YakVariables) Len ¶
func (v *YakVariables) Len() int
func (*YakVariables) Set ¶
func (v *YakVariables) Set(key string, value any)
func (*YakVariables) SetAsNucleiTags ¶
func (v *YakVariables) SetAsNucleiTags(key string, value any)
func (*YakVariables) SetNucleiDSL ¶
func (v *YakVariables) SetNucleiDSL(key string, value any)
func (*YakVariables) SetWithType ¶
func (v *YakVariables) SetWithType(key string, value any, typeName string) error
func (*YakVariables) ToMap ¶
func (v *YakVariables) ToMap() map[string]any
Source Files
¶
Click to show internal directories.
Click to hide internal directories.