Path: blob/dev/pkg/protocols/common/interactsh/options.go
2072 views
package interactsh12import (3"time"45"github.com/projectdiscovery/gologger"6"github.com/projectdiscovery/interactsh/pkg/client"7"github.com/projectdiscovery/nuclei/v3/pkg/fuzz/frequency"8"github.com/projectdiscovery/nuclei/v3/pkg/output"9"github.com/projectdiscovery/nuclei/v3/pkg/progress"10"github.com/projectdiscovery/nuclei/v3/pkg/reporting"11"github.com/projectdiscovery/retryablehttp-go"12)1314// Options contains configuration options for interactsh nuclei integration.15type Options struct {16// ServerURL is the URL of the interactsh server.17ServerURL string18// Authorization is the Authorization header value19Authorization string20// CacheSize is the numbers of requests to keep track of at a time.21// Older items are discarded in LRU manner in favor of new requests.22CacheSize int23// Eviction is the period of time after which to automatically discard24// interaction requests.25Eviction time.Duration26// CooldownPeriod is additional time to wait for interactions after closing27// of the poller.28CooldownPeriod time.Duration29// PollDuration is the time to wait before each poll to the server for interactions.30PollDuration time.Duration31// Output is the output writer for nuclei32Output output.Writer33// IssuesClient is a client for issue exporting34IssuesClient reporting.Client35// Progress is the nuclei progress bar implementation.36Progress progress.Progress37// Debug specifies whether debugging output should be shown for interactsh-client38Debug bool39// DebugRequest outputs interaction request40DebugRequest bool41// DebugResponse outputs interaction response42DebugResponse bool43// DisableHttpFallback controls http retry in case of https failure for server url44DisableHttpFallback bool45// NoInteractsh disables the engine46NoInteractsh bool47// NoColor disables printing colors for matches48NoColor bool49// Logger is the shared logging instance50Logger *gologger.Logger5152FuzzParamsFrequency *frequency.Tracker53StopAtFirstMatch bool54HTTPClient *retryablehttp.Client55}5657// DefaultOptions returns the default options for interactsh client58func DefaultOptions(output output.Writer, reporting reporting.Client, progress progress.Progress) *Options {59return &Options{60ServerURL: client.DefaultOptions.ServerURL,61CacheSize: 5000,62Eviction: 60 * time.Second,63CooldownPeriod: 5 * time.Second,64PollDuration: 5 * time.Second,65Output: output,66IssuesClient: reporting,67Progress: progress,68DisableHttpFallback: true,69NoColor: false,70}71}727374