Skip to content

Commit

Permalink
Fix time-based matcher (#575)
Browse files Browse the repository at this point in the history
* Fix time-based matcher

* add time filter/matcher double quotes in readme

---------

Co-authored-by: Joona Hoikkala <joohoi@users.noreply.github.com>
  • Loading branch information
denandz and joohoi committed Feb 2, 2023
1 parent ebb4c44 commit 7bff9e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -193,15 +193,15 @@ 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:
-fc Filter HTTP status codes from response. Comma separated list of codes and ranges
-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:
Expand Down
2 changes: 1 addition & 1 deletion main.go
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 7bff9e7

Please sign in to comment.