diff options
author | Emile <hanemile@protonmail.com> | 2019-11-02 22:48:31 +0100 |
---|---|---|
committer | Emile <hanemile@protonmail.com> | 2019-11-02 22:48:31 +0100 |
commit | d5446ae044a0f240d2aca8c29af26ac20eb738b1 (patch) | |
tree | cdd004088940f6a29416b1021de05d519bab282c /src | |
parent | 963543b000b16e7d95958ea97bbdc4a9abadb407 (diff) |
filtering
Diffstat (limited to 'src')
-rw-r--r-- | src/printer.go | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/printer.go b/src/printer.go index d33360a..f02957b 100644 --- a/src/printer.go +++ b/src/printer.go @@ -37,6 +37,30 @@ func printResponses(channels channels) { } } + for _, linesToHide := range hide.HideLine { + if response.ResponseLines == linesToHide { + prefix = "" + postfix = "\033[K\r" + color = "red" + } + } + + for _, wordsToHide := range hide.HideWord { + if response.ResponseWords == wordsToHide { + prefix = "" + postfix = "\033[K\r" + color = "red" + } + } + + for _, charsToHide := range hide.HideChar { + if response.ResponseChars == charsToHide { + prefix = "" + postfix = "\033[K\r" + color = "red" + } + } + // color if color == "red" { statusCode = red(fmt.Sprintf("%d", response.StatusCode)) @@ -45,7 +69,7 @@ func printResponses(channels channels) { } // print the requests - fmt.Printf("%s%.7d: %s %s%s", prefix, i, statusCode, response.FuzzWord, postfix) + fmt.Printf("%s%.7d: %s | %7d L | %7d W | %7d Ch | %s%s", prefix, i, statusCode, response.ResponseLines, response.ResponseWords, response.ResponseChars, response.FuzzWord, postfix) i++ } |