NLnetLabs / dnsi

A tool to investigate the DNS.
BSD 3-Clause "New" or "Revised" License
46 stars 3 forks source link

Don't add padding to the last cell in tables (and some more comments) #36

Closed tertsdiepraam closed 3 months ago

tertsdiepraam commented 3 months ago

This is important for when data in the last column gets really big where the padding will wrap in the terminal and add a lot of unnecessary blank lines. For example in this query:

> dnsi query --tls --server one.one.one.one nlnetlabs.nl
HEADER
  opcode:   QUERY
  rcode:    NOERROR
  id:       0
  flags:    QR RD RA
  records:  QUESTION: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

OPT PSEUDOSECTION
  EDNS     version: 0; flags: false; udp: 1232
  PADDING  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ()

QUESTION SECTION
  Name            Type
  nlnetlabs.nl    AAAA

ANSWER SECTION
  Owner           TTL       Type    Data                
  nlnetlabs.nl    4m  0s    AAAA    2a01:4f8:c0c:cdfa::1

EXTRA INFO
  When:           Tue Jun 25 13:15:13 +02:00 2024
  Query time:     62 msec
  Server:         2606:4700:4700::1111#853
  Protocol:       TLS
  Response size:  468 bytes

This is based on a suggestion by @Philip-NLnetLabs