From 36124a1afe8edefa4b395cf25f3ca8733b90d602 Mon Sep 17 00:00:00 2001 From: Joona Hoikkala <5235109+joohoi@users.noreply.github.com> Date: Fri, 15 Sep 2023 19:11:48 +0300 Subject: [PATCH] Default to match 2XX (#723) * Change the status matcher defaults to accept any 2XX response code * Add changelog entry --- CHANGELOG.md | 1 + pkg/ffuf/optionsparser.go | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6789103..6ade12b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - Fixed divide by 0 error when setting rate limit to 0 manually. - Automatic brotli and deflate decompression - Report if request times out when a time based matcher or filter is active + - All 2XX status codes are now matched - v2.0.0 - New diff --git a/pkg/ffuf/optionsparser.go b/pkg/ffuf/optionsparser.go index 7793ae0..e4a34e2 100644 --- a/pkg/ffuf/optionsparser.go +++ b/pkg/ffuf/optionsparser.go @@ -170,7 +170,7 @@ func NewConfigOptions() *ConfigOptions { c.Matcher.Lines = "" c.Matcher.Regexp = "" c.Matcher.Size = "" - c.Matcher.Status = "200,204,301,302,307,401,403,405,500" + c.Matcher.Status = "200-299,301,302,307,401,403,405,500" c.Matcher.Time = "" c.Matcher.Words = "" c.Output.DebugLog = "" @@ -373,7 +373,6 @@ func ConfigFromOptions(parseOpts *ConfigOptions, ctx context.Context, cancel con conf.ClientKey = parseOpts.HTTP.ClientKey } - //Prepare headers and make canonical for _, v := range parseOpts.HTTP.Headers { hs := strings.SplitN(v, ":", 2)