From 7bff9e70da432cc15386455fd4fbeb16fdb34f1b Mon Sep 17 00:00:00 2001 From: DoI <5291556+denandz@users.noreply.github.com> Date: Fri, 3 Feb 2023 03:08:57 +1300 Subject: [PATCH] Fix time-based matcher (#575) * Fix time-based matcher * add time filter/matcher double quotes in readme --------- Co-authored-by: Joona Hoikkala --- README.md | 4 ++-- main.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 262ce0d..2719216 100644 --- a/README.md +++ b/README.md @@ -193,7 +193,7 @@ MATCHER OPTIONS: -ml Match amount of lines in response -mr Match regexp -ms Match HTTP response size - -mt Match how many milliseconds to the first response byte, either greater or less than. EG: >100 or <100 + -mt Match how many milliseconds to the first response byte, either greater or less than. EG: ">100" or "<100" -mw Match amount of words in response FILTER OPTIONS: @@ -201,7 +201,7 @@ FILTER OPTIONS: -fl Filter by amount of lines in response. Comma separated list of line counts and ranges -fr Filter regexp -fs Filter HTTP response size. Comma separated list of sizes and ranges - -ft Filter by number of milliseconds to the first response byte, either greater or less than. EG: >100 or <100 + -ft Filter by number of milliseconds to the first response byte, either greater or less than. EG: ">100" or "<100" -fw Filter by amount of words in response. Comma separated list of word counts and ranges INPUT OPTIONS: diff --git a/main.go b/main.go index 4ed928f..4fc7720 100644 --- a/main.go +++ b/main.go @@ -350,7 +350,7 @@ func SetupFilters(parseOpts *ffuf.ConfigOptions, conf *ffuf.Config) error { } } if parseOpts.Matcher.Time != "" { - if err := conf.MatcherManager.AddFilter("time", parseOpts.Matcher.Time, false); err != nil { + if err := conf.MatcherManager.AddMatcher("time", parseOpts.Matcher.Time); err != nil { errs.Add(err) } }