Fixed SIGSEGV if no templates config exists

dev
Víctor Zamanillo 2020-08-23 21:49:27 +02:00
parent 2c00054f93
commit a02cb66403
1 changed files with 3 additions and 0 deletions

View File

@ -102,6 +102,9 @@ func (r *Runner) readNucleiIgnoreFile() {
// checkIfInNucleiIgnore checks if a path falls under nuclei-ignore rules.
func (r *Runner) checkIfInNucleiIgnore(item string) bool {
if r.templatesConfig == nil {
return false
}
for _, paths := range r.templatesConfig.ignorePaths {
// If we have a path to ignore, check if it's in the item.
if paths[len(paths)-1] == '/' {