mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-17 20:55:28 +00:00
* spelling: addresses Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: asynchronous Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: basic Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: brute force Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: constant Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: disables Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: engine Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: every time Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: execution Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: false positives Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: from Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: further Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: github Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: gitlab Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: highlight Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: hygiene Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: ignore Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: input Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: item Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: itself Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: latestxxx Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: navigation Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: negative Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: nonexistent Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: occurred Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: override Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: overrides Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: payload Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: performed Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: respective Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: retrieve Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: scanlist Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: separated Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: separator Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: severity Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: source Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: strategy Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: string Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: templates Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: terminal Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: timeout Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: trailing slash Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: trailing Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: websocket Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --------- Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
68 lines
2.3 KiB
Go
68 lines
2.3 KiB
Go
package interactsh
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/projectdiscovery/interactsh/pkg/client"
|
|
"github.com/projectdiscovery/nuclei/v2/pkg/output"
|
|
"github.com/projectdiscovery/nuclei/v2/pkg/progress"
|
|
"github.com/projectdiscovery/nuclei/v2/pkg/reporting"
|
|
"github.com/projectdiscovery/retryablehttp-go"
|
|
)
|
|
|
|
// Options contains configuration options for interactsh nuclei integration.
|
|
type Options struct {
|
|
// ServerURL is the URL of the interactsh server.
|
|
ServerURL string
|
|
// Authorization is the Authorization header value
|
|
Authorization string
|
|
// CacheSize is the numbers of requests to keep track of at a time.
|
|
// Older items are discarded in LRU manner in favor of new requests.
|
|
CacheSize int
|
|
// Eviction is the period of time after which to automatically discard
|
|
// interaction requests.
|
|
Eviction time.Duration
|
|
// CooldownPeriod is additional time to wait for interactions after closing
|
|
// of the poller.
|
|
CooldownPeriod time.Duration
|
|
// PollDuration is the time to wait before each poll to the server for interactions.
|
|
PollDuration time.Duration
|
|
// Output is the output writer for nuclei
|
|
Output output.Writer
|
|
// IssuesClient is a client for issue exporting
|
|
IssuesClient reporting.Client
|
|
// Progress is the nuclei progress bar implementation.
|
|
Progress progress.Progress
|
|
// Debug specifies whether debugging output should be shown for interactsh-client
|
|
Debug bool
|
|
// DebugRequest outputs interaction request
|
|
DebugRequest bool
|
|
// DebugResponse outputs interaction response
|
|
DebugResponse bool
|
|
// DisableHttpFallback controls http retry in case of https failure for server url
|
|
DisableHttpFallback bool
|
|
// NoInteractsh disables the engine
|
|
NoInteractsh bool
|
|
// NoColor disables printing colors for matches
|
|
NoColor bool
|
|
|
|
StopAtFirstMatch bool
|
|
HTTPClient *retryablehttp.Client
|
|
}
|
|
|
|
// DefaultOptions returns the default options for interactsh client
|
|
func DefaultOptions(output output.Writer, reporting reporting.Client, progress progress.Progress) *Options {
|
|
return &Options{
|
|
ServerURL: client.DefaultOptions.ServerURL,
|
|
CacheSize: 5000,
|
|
Eviction: 60 * time.Second,
|
|
CooldownPeriod: 5 * time.Second,
|
|
PollDuration: 5 * time.Second,
|
|
Output: output,
|
|
IssuesClient: reporting,
|
|
Progress: progress,
|
|
DisableHttpFallback: true,
|
|
NoColor: false,
|
|
}
|
|
}
|