mirror of https://github.com/daffainfo/nuclei.git
Merge pull request #5035 from projectdiscovery/bugfix-4947-internal-resolvers
Fixing internal resolver overridedev
commit
d576db3893
|
@ -124,7 +124,7 @@ func Init(options *types.Options) error {
|
||||||
opts.ResolversFile = true
|
opts.ResolversFile = true
|
||||||
opts.EnableFallback = true
|
opts.EnableFallback = true
|
||||||
}
|
}
|
||||||
if options.ResolversFile != "" {
|
if len(options.InternalResolversList) > 0 {
|
||||||
opts.BaseResolvers = options.InternalResolversList
|
opts.BaseResolvers = options.InternalResolversList
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ func Init(options *types.Options) error {
|
||||||
clientPool = make(map[string]*retryabledns.Client)
|
clientPool = make(map[string]*retryabledns.Client)
|
||||||
|
|
||||||
resolvers := defaultResolvers
|
resolvers := defaultResolvers
|
||||||
if options.ResolversFile != "" {
|
if len(options.InternalResolversList) > 0 {
|
||||||
resolvers = options.InternalResolversList
|
resolvers = options.InternalResolversList
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
@ -78,7 +78,7 @@ func Get(options *types.Options, configuration *Configuration) (*retryabledns.Cl
|
||||||
poolMutex.RUnlock()
|
poolMutex.RUnlock()
|
||||||
|
|
||||||
resolvers := defaultResolvers
|
resolvers := defaultResolvers
|
||||||
if options.ResolversFile != "" {
|
if len(options.InternalResolversList) > 0 {
|
||||||
resolvers = options.InternalResolversList
|
resolvers = options.InternalResolversList
|
||||||
} else if len(configuration.Resolvers) > 0 {
|
} else if len(configuration.Resolvers) > 0 {
|
||||||
resolvers = configuration.Resolvers
|
resolvers = configuration.Resolvers
|
||||||
|
|
|
@ -66,8 +66,8 @@ type Options struct {
|
||||||
IncludeIds goflags.StringSlice
|
IncludeIds goflags.StringSlice
|
||||||
// ExcludeIds contains templates ids to not be executed
|
// ExcludeIds contains templates ids to not be executed
|
||||||
ExcludeIds goflags.StringSlice
|
ExcludeIds goflags.StringSlice
|
||||||
|
// InternalResolversList is the list of internal resolvers to use
|
||||||
InternalResolversList []string // normalized from resolvers flag as well as file provided.
|
InternalResolversList []string
|
||||||
// ProjectPath allows nuclei to use a user defined project folder
|
// ProjectPath allows nuclei to use a user defined project folder
|
||||||
ProjectPath string
|
ProjectPath string
|
||||||
// InteractshURL is the URL for the interactsh server.
|
// InteractshURL is the URL for the interactsh server.
|
||||||
|
|
Loading…
Reference in New Issue