From 3136529ea33e4253be013b99f21b822c34b24501 Mon Sep 17 00:00:00 2001 From: Hazegard Date: Wed, 22 Feb 2023 22:04:07 +0100 Subject: [PATCH] allow unused wordlist in config file --- pkg/ffuf/optionsparser.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/ffuf/optionsparser.go b/pkg/ffuf/optionsparser.go index 38100f77..200c214f 100644 --- a/pkg/ffuf/optionsparser.go +++ b/pkg/ffuf/optionsparser.go @@ -526,19 +526,25 @@ func ConfigFromOptions(parseOpts *ConfigOptions, ctx context.Context, cancel con conf.CommandLine = strings.Join(os.Args, " ") + newInputProviders := []InputProviderConfig{} for _, provider := range conf.InputProviders { if provider.Template != "" { if !templatePresent(provider.Template, &conf) { errmsg := fmt.Sprintf("Template %s defined, but not found in pairs in headers, method, URL or POST data.", provider.Template) errs.Add(fmt.Errorf(errmsg)) + } else { + newInputProviders = append(newInputProviders, provider) } } else { if !keywordPresent(provider.Keyword, &conf) { errmsg := fmt.Sprintf("Keyword %s defined, but not found in headers, method, URL or POST data.", provider.Keyword) - errs.Add(fmt.Errorf(errmsg)) + _, _ = fmt.Fprintf(os.Stderr, "%s\n", fmt.Errorf(errmsg)) + } else { + newInputProviders = append(newInputProviders, provider) } } } + conf.InputProviders = newInputProviders // Do checks for recursion mode if parseOpts.HTTP.Recursion {