mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-17 19:25:26 +00:00
Merge pull request #6495 from projectdiscovery/fix_headless_loading
fix headless template loading logic when `-dast` option is enabled
This commit is contained in:
commit
d44f07f648
@ -580,7 +580,14 @@ func (store *Store) LoadTemplatesWithTags(templatesList, tags []string) []*templ
|
|||||||
// check if the template is a DAST template
|
// check if the template is a DAST template
|
||||||
// also allow global matchers template to be loaded
|
// also allow global matchers template to be loaded
|
||||||
if parsed.IsFuzzing() || parsed.Options.GlobalMatchers != nil && parsed.Options.GlobalMatchers.HasMatchers() {
|
if parsed.IsFuzzing() || parsed.Options.GlobalMatchers != nil && parsed.Options.GlobalMatchers.HasMatchers() {
|
||||||
loadTemplate(parsed)
|
if len(parsed.RequestsHeadless) > 0 && !store.config.ExecutorOptions.Options.Headless {
|
||||||
|
stats.Increment(templates.ExcludedHeadlessTmplStats)
|
||||||
|
if config.DefaultConfig.LogAllEvents {
|
||||||
|
store.logger.Print().Msgf("[%v] Headless flag is required for headless template '%s'.\n", aurora.Yellow("WRN").String(), templatePath)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
loadTemplate(parsed)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if len(parsed.RequestsHeadless) > 0 && !store.config.ExecutorOptions.Options.Headless {
|
} else if len(parsed.RequestsHeadless) > 0 && !store.config.ExecutorOptions.Options.Headless {
|
||||||
// donot include headless template in final list if headless flag is not set
|
// donot include headless template in final list if headless flag is not set
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user