Documentation ¶
Index ¶
- Variables
- type Configuration
- type Request
- func (r *Request) Compile(options *protocols.ExecuterOptions) error
- func (request *Request) ExecuteRequestWithResults(reqURL string, dynamicValues map[string]interface{}, ...) error
- func (r *Request) ExecuteWithResults(input string, dynamicValues map[string]interface{}, ...) error
- func (request *Request) Extract(data map[string]interface{}, extractor *protocols.Extractor) map[string]struct{}
- func (r *Request) GetID() string
- func (r *Request) MakeResultEvent(wrapped *protocols.InternalWrappedEvent) []*protocols.ResultEvent
- func (r *Request) Match(data map[string]interface{}, matcher *protocols.Matcher) bool
- func (r *Request) Requests() int
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOption = Configuration{ 3, true, 3, false, }
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Request ¶
type Request struct { // operators for the current request go here. protocols.Operators `json:",inline"` // Path contains the path/s for the request Path []string `json:"path"` // Raw contains raw requests Raw []string `json:"raw"` ID string `json:"id"` // Name is the name of the request Name string `json:"Name"` // AttackType is the attack type // Sniper, PitchFork and ClusterBomb. Default is Sniper AttackType string `json:"attack"` // Method is the request method, whether GET, POST, PUT, etc Method string `json:"method"` // Body is an optional parameter which contains the request body for POST methods, etc Body string `json:"body"` // Path contains the path/s for the request variables Payloads map[string]interface{} `json:"payloads"` // Headers contains headers to send with the request Headers map[string]string `json:"headers"` // MaxRedirects is the maximum number of redirects that should be followed. MaxRedirects int `json:"max-redirects"` // PipelineConcurrentConnections is number of connections in pipelining Threads int `json:"threads"` // MaxSize is the maximum size of http response body to read in bytes. MaxSize int `json:"max-size"` // CookieReuse is an optional setting that makes cookies shared within requests CookieReuse bool `json:"cookie-reuse"` // Redirects specifies whether redirects should be followed. Redirects bool `json:"redirects"` // Pipeline defines if the attack should be performed with HTTP 1.1 Pipelining (race conditions/billions requests) // All requests must be indempotent (GET/POST) Unsafe bool `json:"unsafe"` // ReqCondition automatically assigns numbers to requests and preserves // their history for being matched at the end. // Currently only works with sequential http requests. ReqCondition bool `json:"req-condition"` // StopAtFirstMatch stops the execution of the requests and template as soon as a match is found. StopAtFirstMatch bool `json:"stop-at-first-match"` CompiledOperators *protocols.Operators // contains filtered or unexported fields }
func (*Request) ExecuteRequestWithResults ¶
func (*Request) ExecuteWithResults ¶
func (*Request) Extract ¶
func (request *Request) Extract(data map[string]interface{}, extractor *protocols.Extractor) map[string]struct{}
Extract performs extracting operation for an extractor on model and returns true or false.
func (*Request) MakeResultEvent ¶
func (r *Request) MakeResultEvent(wrapped *protocols.InternalWrappedEvent) []*protocols.ResultEvent
var (
urlWithPortRegex = regexp.MustCompile(`{{BaseURL}}:(\d+)`)
) MakeResultEvent creates a result event from internal wrapped event
Click to show internal directories.
Click to hide internal directories.