Documentation ¶
Index ¶
- func Header(headers http.Header) string
- func ValidateProxyURL(proxy string) (string, error)
- type Client
- func (c *Client) Basic(target string, method string, body string, header map[string]string, ...) (*Response, error)
- func (c *Client) Request(target string, method string, body string, header map[string]string) (*Response, error)
- func (c *Client) Upload(target string, params map[string]string, name, fileName string) (*Response, error)
- type Options
- type Param
- type Response
- type Variations
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateProxyURL ¶
Types ¶
type Client ¶ added in v1.0.0
type Client struct { Client *req.Client Options *Options RateLimiter ratelimit.Limiter // 每秒请求速率限制 }
type Options ¶ added in v1.0.0
type Options struct { Timeout int RetryTimes int // 重定向次数 0 为不重试 VerifySSL bool // default false AllowRedirect int // default false Proxy string // proxy settings, support http/https proxy only, e.g. http://127.0.0.1:8080 QPS int // 每秒最大请求数 MaxConnsPerHost int // 每个 host 最大连接数 Headers map[string]string }
type Param ¶
type Param struct { // Name of the posted parameter. Name string `json:"name"` // Value of the posted parameter. Value string `json:"value,omitempty"` // Filename of a posted file. Filename string `json:"fileName,omitempty"` // ContentType is the content type of posted file. ContentType string `json:"contentType,omitempty"` FileHeader textproto.MIMEHeader FileSize int64 FileContent []byte IsFile bool Boundary string FilenotFound bool IsBase64 bool Index int // }
Param describes an individual posted parameter.
type Response ¶
type Response struct { Status string StatusCode int Body string RequestDump string ResponseDump string Header http.Header ContentLength int RequestUrl string Location string ServerDurationMs float64 // 服务器响应时间 }
type Variations ¶
type Variations struct { // MimeType is the MIME type of the posted data. MimeType string `json:"mimeType"` // Params is a list of posted parameters (in case of URL encoded parameters). Params []Param `json:"params"` // OriginalParams 存储原始的值 OriginalParams []Param `json:"original_params"` // Text contains the posted data. Although its type is string, it may contain // binary data. Text string `json:"text"` }
func ParseUri ¶
func ParseUri(uri string, body []byte, method string, contentType string, headers map[string]string) (*Variations, error)
ParseUri 对请求进行格式化
func (Variations) Len ¶
func (p Variations) Len() int
func (*Variations) Release ¶
func (p *Variations) Release() string
func (*Variations) SetPayloadByIndex ¶
SetPayloadByIndex 根据索引设置payload
GET 返回 http://testphp.vulnweb.com/listproducts.php?artist=((,”"(,"","((
POST 返回 artist=')”,)'(())')(
func (Variations) Swap ¶
func (p Variations) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.