From b8705ef9c1503baeb9c97d8256603fa6da0008b0 Mon Sep 17 00:00:00 2001 From: DoI <5291556+denandz@users.noreply.github.com> Date: Sat, 22 Apr 2023 02:46:38 +1200 Subject: [PATCH] Add additional check for keywords when using sniper mode (#661) --- pkg/ffuf/optionsparser.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/ffuf/optionsparser.go b/pkg/ffuf/optionsparser.go index 38100f7..6b5cd59 100644 --- a/pkg/ffuf/optionsparser.go +++ b/pkg/ffuf/optionsparser.go @@ -540,6 +540,13 @@ func ConfigFromOptions(parseOpts *ConfigOptions, ctx context.Context, cancel con } } + // If sniper mode, ensure there is no FUZZ keyword + if conf.InputMode == "sniper" { + if keywordPresent("FUZZ", &conf) { + errs.Add(fmt.Errorf("FUZZ keyword defined, but we are using sniper mode.")) + } + } + // Do checks for recursion mode if parseOpts.HTTP.Recursion { if !strings.HasSuffix(conf.Url, "FUZZ") {