Change banner logging to stderr (#282)

* Change banner logging to stderr

* Edit CHANGELOG and CONTRIBUTORS

* fix: add to contributors according to sort order
This commit is contained in:
Kiblyn11 2020-09-24 11:09:03 +02:00 committed by GitHub
parent dc24ad2639
commit 79fe3c0c91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View file

@ -2,6 +2,7 @@
- master
- New
- New CLI flag `-rate` to set maximum rate of requests per second. The adjustment is dynamic.
- Change banner logging to stderr instead of stdout.
- Changed
- Pre-flight errors are now displayed also after the usage text to prevent the need to scroll through backlog.

View file

@ -16,6 +16,7 @@
* [jimen0](https://github.com/jimen0)
* [joohoi](https://github.com/joohoi)
* [jvesiluoma](https://github.com/jvesiluoma)
* [Kiblyn11](https://github.com/Kiblyn11)
* [lc](https://github.com/lc)
* [nnwakelam](https://twitter.com/nnwakelam)
* [oh6hay](https://github.com/oh6hay)

View file

@ -51,7 +51,7 @@ func NewStdoutput(conf *ffuf.Config) *Stdoutput {
}
func (s *Stdoutput) Banner() error {
fmt.Printf("%s\n v%s\n%s\n\n", BANNER_HEADER, ffuf.VERSION, BANNER_SEP)
fmt.Fprintf(os.Stderr ,"%s\n v%s\n%s\n\n", BANNER_HEADER, ffuf.VERSION, BANNER_SEP)
printOption([]byte("Method"), []byte(s.config.Method))
printOption([]byte("URL"), []byte(s.config.Url))
@ -142,7 +142,7 @@ func (s *Stdoutput) Banner() error {
for _, f := range s.config.Filters {
printOption([]byte("Filter"), []byte(f.Repr()))
}
fmt.Printf("%s\n\n", BANNER_SEP)
fmt.Fprintf(os.Stderr, "%s\n\n", BANNER_SEP)
return nil
}
@ -430,7 +430,7 @@ func (s *Stdoutput) colorize(input string, status int64) string {
}
func printOption(name []byte, value []byte) {
fmt.Printf(" :: %-16s : %s\n", name, value)
fmt.Fprintf(os.Stderr, " :: %-16s : %s\n", name, value)
}
func inSlice(key string, slice []string) bool {