This change is an attempt to handle gosimple linter finfings in order to
make the code easier to follow. It includes the following changes:
- use strings.Contains instead of strings.Index != -1
- use time.Since which is the standard library helper. See https://github.com/golang/go/blob/go1.15.2/src/time/time.go#L866-L867
- remove unneeded return statements at the end of methods
- preallocate maps when their capacity is known
- avoid underscoring values when they can be omitted
- avoid fmt.Sprintf() calls when the only argument is already a string
Signed-off-by: Miguel Ángel Jimeno <miguelangel4b@gmail.com>
Use the ReplaceAll helper from the standard library in order to make the
code easier to read. Requires Go 1.12 or higher.
Fixes#301
Signed-off-by: Miguel Ángel Jimeno <miguelangel4b@gmail.com>
* job: remove duplicate if statement
Signed-off-by: Miguel Ángel Jimeno <miguelangel4b@gmail.com>
* contributors: add Miguel Jimeno to CONTRIBUTORS.md
Signed-off-by: Miguel Ángel Jimeno <miguelangel4b@gmail.com>
* Update util.go
* Update job.go
rand.Seed updated just before usage
* Update util.go
revert
* Updated CHANGELOG.MD with a description of the bug fix.
Co-authored-by: Joona Hoikkala <joohoi@users.noreply.github.com>
* Support outputting all file formats concurrently
Previously ffuf would allow outputting to a single
file-format, ie Markdown (md), json or HTML. It was not
possible to output in multiple formats in the same
execution.
This change allows specifying an output (-of) of "all",
which means that the output filename (-o) is used, but the
appropriate suffix is added.
As an example,
... -of all -o output/report
Will output:
- output/report.json
- output/report.html
- output/report.csv
- ... etc
Fixesffuf/ffuf#215
Signed-off-by: Dave Walker (Daviey) <email@daviey.com>
* Updated Changelog and added myself to CONTRIBUTORS
Signed-off-by: Dave Walker (Daviey) <email@daviey.com>
* Fix file extension for 'ecsv' when 'all' is used
.. And fix CONTRIBUTORS.md to be alphabetical
Signed-off-by: Dave Walker (Daviey) <email@daviey.com>
* Increase default rows per page on html report
Previously 10 results were displayed per-page, as the
default of DataTables. This change increases the default to
250 results per page and also adds the option for 250, 500,
1000, 2500 and ALL results.
In addition, materialize css default was blocking the
viewing of the option to display alternative results
per-page. This is resolved by calling .formSelect as per
https://stackoverflow.com/questions/28258106/materialize-css-select-doesnt-seem-to-renderFixesffuf/ffuf#216
Signed-off-by: Dave Walker (Daviey) <email@daviey.com>
* Updated Changelog and added myself to CONTRIBUTORS
Signed-off-by: Dave Walker (Daviey) <email@daviey.com>
* Updated CONTRIBUTORS.md to be alphabetical
Signed-off-by: Dave Walker (Daviey) <email@daviey.com>
* Fix for issue #179
* additional changes after review | #179
* Further info -> README.md regarding #179 & CONTRIBUTORS.md
* Further info -> README.md regarding #179 & CONTRIBUTORS.md
* Further info -> README.md regarding #179
* Fix for removed "Changes"
* Fix for removed "Changes"
* Takes the User-Agent header from a list.
* typo
* base
* Make defining User-agent header case insensitive #171
* -whitespaces
* Make canonical http headers and set default User-Agent only once.
* clean-up
* formatting, canonical customer headers, docs updated
* cleanup
* fmt
* Checking userdefined headers for excluding in canonicalization.
* resolving one conflict
* moved logic back and less resolve conflicts
Co-authored-by: Joona Hoikkala <joohoi@users.noreply.github.com>
* regexp filter had a copy-paste error talking about size filter, fixed
* implement -mr/-fr FUZZ, detecting if fuzzed input is present in response. resolves#76
* quote regexp control characters to obtain exact matches (according to joohoi's comment)
* allow keywords as part of regexp matching/filtering
* updated changelog
Co-authored-by: Joona Hoikkala <joohoi@users.noreply.github.com>