mirror of https://github.com/daffainfo/nuclei.git
Allow authorization header value to be specified for self-hosted interact.sh servers
parent
3fb9972114
commit
f9afd27605
|
@ -110,7 +110,7 @@ on extensive configurability, massive extensibility and ease of use.`)
|
||||||
createGroup(flagSet, "interactsh", "interactsh",
|
createGroup(flagSet, "interactsh", "interactsh",
|
||||||
flagSet.BoolVar(&options.NoInteractsh, "no-interactsh", false, "do not use interactsh server for blind interaction polling"),
|
flagSet.BoolVar(&options.NoInteractsh, "no-interactsh", false, "do not use interactsh server for blind interaction polling"),
|
||||||
flagSet.StringVar(&options.InteractshURL, "interactsh-url", "https://interact.sh", "self-hosted Interactsh Server URL"),
|
flagSet.StringVar(&options.InteractshURL, "interactsh-url", "https://interact.sh", "self-hosted Interactsh Server URL"),
|
||||||
|
flagSet.StringVar(&options.InteractshAuth, "interactsh-auth", "", "authorization header for self-hosted interactsh server"),
|
||||||
flagSet.IntVar(&options.InteractionsCacheSize, "interactions-cache-size", 5000, "number of requests to keep in the interactions cache"),
|
flagSet.IntVar(&options.InteractionsCacheSize, "interactions-cache-size", 5000, "number of requests to keep in the interactions cache"),
|
||||||
flagSet.IntVar(&options.InteractionsEviction, "interactions-eviction", 60, "number of seconds to wait before evicting requests from cache"),
|
flagSet.IntVar(&options.InteractionsEviction, "interactions-eviction", 60, "number of seconds to wait before evicting requests from cache"),
|
||||||
flagSet.IntVar(&options.InteractionsPollDuration, "interactions-poll-duration", 5, "number of seconds to wait before each interaction poll request"),
|
flagSet.IntVar(&options.InteractionsPollDuration, "interactions-poll-duration", 5, "number of seconds to wait before each interaction poll request"),
|
||||||
|
|
|
@ -245,6 +245,7 @@ func New(options *types.Options) (*Runner, error) {
|
||||||
if !options.NoInteractsh {
|
if !options.NoInteractsh {
|
||||||
interactshClient, err := interactsh.New(&interactsh.Options{
|
interactshClient, err := interactsh.New(&interactsh.Options{
|
||||||
ServerURL: options.InteractshURL,
|
ServerURL: options.InteractshURL,
|
||||||
|
Authorization: options.InteractshAuth,
|
||||||
CacheSize: int64(options.InteractionsCacheSize),
|
CacheSize: int64(options.InteractionsCacheSize),
|
||||||
Eviction: time.Duration(options.InteractionsEviction) * time.Second,
|
Eviction: time.Duration(options.InteractionsEviction) * time.Second,
|
||||||
ColldownPeriod: time.Duration(options.InteractionsColldownPeriod) * time.Second,
|
ColldownPeriod: time.Duration(options.InteractionsColldownPeriod) * time.Second,
|
||||||
|
|
|
@ -48,6 +48,8 @@ var (
|
||||||
type Options struct {
|
type Options struct {
|
||||||
// ServerURL is the URL of the interactsh server.
|
// ServerURL is the URL of the interactsh server.
|
||||||
ServerURL string
|
ServerURL string
|
||||||
|
// Authorization is the Authorization header value
|
||||||
|
Authorization string
|
||||||
// CacheSize is the numbers of requests to keep track of at a time.
|
// 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.
|
// Older items are discarded in LRU manner in favor of new requests.
|
||||||
CacheSize int64
|
CacheSize int64
|
||||||
|
@ -80,6 +82,7 @@ func New(options *Options) (*Client, error) {
|
||||||
|
|
||||||
interactsh, err := client.New(&client.Options{
|
interactsh, err := client.New(&client.Options{
|
||||||
ServerURL: options.ServerURL,
|
ServerURL: options.ServerURL,
|
||||||
|
Token: options.Authorization,
|
||||||
PersistentSession: false,
|
PersistentSession: false,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -37,6 +37,8 @@ type Options struct {
|
||||||
ProjectPath string
|
ProjectPath string
|
||||||
// InteractshURL is the URL for the interactsh server.
|
// InteractshURL is the URL for the interactsh server.
|
||||||
InteractshURL string
|
InteractshURL string
|
||||||
|
// Interactsh Authorization header value for self-hosted servers
|
||||||
|
InteractshAuth string
|
||||||
// Target URLs/Domains to scan using a template
|
// Target URLs/Domains to scan using a template
|
||||||
Targets goflags.StringSlice
|
Targets goflags.StringSlice
|
||||||
// TargetsFilePath specifies the targets from a file to scan using templates.
|
// TargetsFilePath specifies the targets from a file to scan using templates.
|
||||||
|
|
Loading…
Reference in New Issue