Documentation
¶
Index ¶
- func AutoScheme(target string) string
- func NormalizeURI(parts ...string) string
- func WithPool(ctx context.Context, threads int, proxyURL string) context.Context
- type Option
- type Request
- type Response
- func (r *Response) BodyBytes() ([]byte, error)
- func (r *Response) BodyString() (string, error)
- func (r *Response) Contains(substr string) bool
- func (r *Response) ContainsAll(substrs ...string) bool
- func (r *Response) ContainsAny(substrs ...string) bool
- func (r *Response) HTML() (*goquery.Document, error)
- func (r *Response) JSON(target any) error
- type Run
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoScheme ¶
AutoScheme probes HTTPS then falls back to HTTP if the target has no scheme.
func NormalizeURI ¶
NormalizeURI joins path segments cleanly.
Types ¶
type Option ¶
type Option func(*Session)
Option configures a Session.
func WithTransport ¶
WithTransport sets a shared transport for connection pooling.
type Request ¶
type Request struct {
Method string
Path string
Query url.Values
Form url.Values
Body io.Reader
ContentType string
Headers map[string]string
Ctx context.Context
Timeout time.Duration
NoRedirect bool
NoCookies bool
BasicAuth [2]string
MaxBody int64
}
Request describes a single HTTP request.
type Response ¶
Response wraps a standard http.Response with convenience methods for body parsing (HTML, JSON, raw text).
func WrapResponse ¶
WrapResponse wraps a standard *http.Response into a *Response.
func (*Response) BodyString ¶
BodyString returns the response body as a string.
func (*Response) ContainsAll ¶
ContainsAll checks whether the response body contains all given substrings.
func (*Response) ContainsAny ¶
ContainsAny checks whether the response body contains at least one of the given substrings.
type Run ¶
Run binds a Session to a target for the duration of an exploit.
func FromModule ¶
FromModule creates a Run from module params.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session is a persistent HTTP client shared across requests.
func NewSession ¶
NewSession creates a new HTTP session. TLS verification is disabled by default.