Documentation
¶
Index ¶
- Variables
- func Decodebig5(s []byte) ([]byte, error)
- func Decodegbk(s []byte) ([]byte, error)
- func Encodebig5(s []byte) ([]byte, error)
- func ExtractTitle(r *Response) (title string)
- type CustomCallback
- type Filter
- type FilterCustom
- type FilterRegex
- type FilterString
- type HTTPX
- func (h *HTTPX) AddFilter(f Filter)
- func (h *HTTPX) Do(req *retryablehttp.Request) (*Response, error)
- func (h *HTTPX) IsVirtualHost(req *retryablehttp.Request) (bool, error)
- func (h *HTTPX) NewRequest(method, URL string) (req *retryablehttp.Request, err error)
- func (h *HTTPX) SetCustomHeaders(r *retryablehttp.Request, headers map[string]string)
- func (h *HTTPX) TlsGrab(r *http.Response) *TlsData
- func (h *HTTPX) Verify(req *retryablehttp.Request) (bool, error)
- type Options
- type Response
- type TlsData
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOptions = Options{ Threads: 25, Timeout: 30 * time.Second, RetryMax: 5, VHostIgnoreStatusCode: false, VHostIgnoreContentLength: true, VHostIgnoreNumberOfWords: false, VHostIgnoreNumberOfLines: false, VHostStripHTML: false, VHostSimilarityRatio: 85, DefaultUserAgent: "httpx - Open-source project (github.com/projectdiscovery/httpx)", }
DefaultOptions contains the default options
Functions ¶
Types ¶
type CustomCallback ¶
CustomCallback used in custom filters
type FilterCustom ¶
type FilterCustom struct {
CallBacks []CustomCallback
}
FilterCustom defines a filter with callback functions applied
type FilterRegex ¶
type FilterRegex struct {
Regexs []string
}
FilterRegex defines a filter of type regex
type FilterString ¶
type FilterString struct {
Keywords []string
}
FilterString defines a filter of type string
type HTTPX ¶
type HTTPX struct {
Filters []Filter
Options *Options
CustomHeaders map[string]string
// contains filtered or unexported fields
}
HTTPX represent an instance of the library client
func (*HTTPX) Do ¶
func (h *HTTPX) Do(req *retryablehttp.Request) (*Response, error)
Do http request
func (*HTTPX) IsVirtualHost ¶
func (h *HTTPX) IsVirtualHost(req *retryablehttp.Request) (bool, error)
IsVirtualHost checks if the target endpoint is a virtual host
func (*HTTPX) NewRequest ¶
func (h *HTTPX) NewRequest(method, URL string) (req *retryablehttp.Request, err error)
NewRequest from url
func (*HTTPX) SetCustomHeaders ¶
func (h *HTTPX) SetCustomHeaders(r *retryablehttp.Request, headers map[string]string)
SetCustomHeaders on the provided request
type Options ¶
type Options struct {
Threads int
// Timeout is the maximum time to wait for the request
Timeout time.Duration
// RetryMax is the maximum number of retries
RetryMax int
CustomHeaders map[string]string
FollowRedirects bool
FollowHostRedirects bool
DefaultUserAgent string
HttpProxy string
SocksProxy string
// VHOSTs options
VHostIgnoreStatusCode bool
VHostIgnoreContentLength bool
VHostIgnoreNumberOfWords bool
VHostIgnoreNumberOfLines bool
VHostStripHTML bool
// VHostimilarityRatio 1 - 100
VHostSimilarityRatio int
}
Options contains configuration options for the client
type Response ¶
type Response struct {
StatusCode int
Headers map[string][]string
Data []byte
ContentLength int
Raw string
Words int
Lines int
TlsData *TlsData
}
Response contains the response to a server
type TlsData ¶ added in v0.0.7
type TlsData struct {
DNSNames []string `json:"dns_names,omitempty"`
Emails []string `json:"emails,omitempty"`
CommonName []string `json:"common_name,omitempty"`
Organization []string `json:"organization,omitempty"`
IssuerCommonName []string `json:"issuer_common_name,omitempty"`
IssuerOrg []string `json:"issuer_organization,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.