Skip to content

Commit

Permalink
Don't actually print decoded base64 cause it prolly breaks the terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
mt-inside committed Apr 22, 2024
1 parent af22386 commit 0128d75
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/output/renderer_tty.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,9 @@ func (o TtyRenderer) HeadFull(d *state.RequestData) {
for n, c := range d.HttpCookies {
val := c.Value
decoded := ""
if b64, err := base64.StdEncoding.DecodeString(val); err == nil {
val = string(b64)
decoded = " (decoded base64)"
// Don't actually print the decoded base64, cause it's likely to contain non-printing chars
if _, err := base64.StdEncoding.DecodeString(val); err == nil {
decoded = " (valid base64)"
}
fmt.Printf("\t%s%s = %s\n", o.s.Addr(n), decoded, o.s.Noun(o.s.Truncate(val)))
}
Expand Down

0 comments on commit 0128d75

Please sign in to comment.