Fixed nuclei panic for issue #760

dev
Ice3man543 2021-06-11 14:44:37 +05:30
parent 2ec27d4466
commit b2e416b0dd
1 changed files with 3 additions and 3 deletions

View File

@ -66,13 +66,13 @@ func New(options *types.Options) (*Runner, error) {
if err := runner.updateTemplates(); err != nil { if err := runner.updateTemplates(); err != nil {
gologger.Warning().Msgf("Could not update templates: %s\n", err) gologger.Warning().Msgf("Could not update templates: %s\n", err)
} }
runner.catalog = catalog.New(runner.options.TemplatesDirectory)
// Read nucleiignore file if given a templateconfig // Read nucleiignore file if given a templateconfig
if runner.templatesConfig != nil { if runner.templatesConfig != nil {
runner.readNucleiIgnoreFile() runner.readNucleiIgnoreFile()
}
runner.catalog = catalog.New(runner.options.TemplatesDirectory)
runner.catalog.AppendIgnore(runner.templatesConfig.IgnorePaths) runner.catalog.AppendIgnore(runner.templatesConfig.IgnorePaths)
}
var reportingOptions *reporting.Options var reportingOptions *reporting.Options
if options.ReportingConfig != "" { if options.ReportingConfig != "" {
file, err := os.Open(options.ReportingConfig) file, err := os.Open(options.ReportingConfig)