Add additional check for keywords when using sniper mode (#661)

This commit is contained in:
DoI 2023-04-22 02:46:38 +12:00 committed by GitHub
parent a3bd865aef
commit b8705ef9c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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") {