这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion pkg/ffuf/optionsparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down