Fix time-based matcher (#575)

* Fix time-based matcher

* add time filter/matcher double quotes in readme

---------

Co-authored-by: Joona Hoikkala <joohoi@users.noreply.github.com>
This commit is contained in:
DoI 2023-02-03 03:08:57 +13:00 committed by GitHub
parent ebb4c44072
commit 7bff9e70da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -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:

View file

@ -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)
}
}