这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- New
- Added response time logging and filtering
- Added a CLI flag to specify TLS SNI value

- Added full line colors
- Changed
- Fixed an issue where output file was created regardless of `-or`
- Fixed an issue where output (often a lot of it) would be printed after entering interactive mode
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@
* [Shaked](https://github.com/Shaked)
* [SolomonSklash](https://github.com/SolomonSklash)
* [l4yton](https://github.com/l4yton)
* [xfgusta](https://github.com/xfgusta)
11 changes: 5 additions & 6 deletions pkg/output/stdout.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,7 @@ func (s *Stdoutput) resultQuiet(res ffuf.Result) {
func (s *Stdoutput) resultMultiline(res ffuf.Result) {
var res_hdr, res_str string
res_str = "%s%s * %s: %s\n"
res_hdr = fmt.Sprintf("%s[Status: %d, Size: %d, Words: %d, Lines: %d, Duration: %dms]", TERMINAL_CLEAR_LINE, res.StatusCode, res.ContentLength, res.ContentWords, res.ContentLines, res.Duration.Milliseconds())
res_hdr = s.colorize(res_hdr, res.StatusCode)
res_hdr = fmt.Sprintf("%s%s[Status: %d, Size: %d, Words: %d, Lines: %d, Duration: %dms]%s", TERMINAL_CLEAR_LINE, s.colorize(res.StatusCode), res.StatusCode, res.ContentLength, res.ContentWords, res.ContentLines, res.Duration.Milliseconds(), ANSI_CLEAR)
reslines := ""
if s.config.Verbose {
reslines = fmt.Sprintf("%s%s| URL | %s\n", reslines, TERMINAL_CLEAR_LINE, res.Url)
Expand All @@ -428,13 +427,13 @@ func (s *Stdoutput) resultMultiline(res ffuf.Result) {
}

func (s *Stdoutput) resultNormal(res ffuf.Result) {
resnormal := fmt.Sprintf("%s%-23s [Status: %s, Size: %d, Words: %d, Lines: %d, Duration: %dms]", TERMINAL_CLEAR_LINE, s.prepareInputsOneLine(res), s.colorize(fmt.Sprintf("%d", res.StatusCode), res.StatusCode), res.ContentLength, res.ContentWords, res.ContentLines, res.Duration.Milliseconds())
resnormal := fmt.Sprintf("%s%s%-23s [Status: %d, Size: %d, Words: %d, Lines: %d, Duration: %dms]%s", TERMINAL_CLEAR_LINE, s.colorize(res.StatusCode), s.prepareInputsOneLine(res), res.StatusCode, res.ContentLength, res.ContentWords, res.ContentLines, res.Duration.Milliseconds(), ANSI_CLEAR)
fmt.Println(resnormal)
}

func (s *Stdoutput) colorize(input string, status int64) string {
func (s *Stdoutput) colorize(status int64) string {
if !s.config.Colors {
return input
return ""
}
colorCode := ANSI_CLEAR
if status >= 200 && status < 300 {
Expand All @@ -449,7 +448,7 @@ func (s *Stdoutput) colorize(input string, status int64) string {
if status >= 500 && status < 600 {
colorCode = ANSI_RED
}
return fmt.Sprintf("%s%s%s", colorCode, input, ANSI_CLEAR)
return colorCode
}

func printOption(name []byte, value []byte) {
Expand Down