Nmap Development mailing list archives

Re: [nse] Output formatting


From: David Fifield <david () bamsoftware com>
Date: Wed, 26 Nov 2008 13:44:55 -0700

On Tue, Nov 25, 2008 at 11:57:20AM -0600, Ron wrote:
I'm working on making the output of my scripts formatted consistently.  
But that raises the question of how to do that, especially for multiline  
output?

So, here are some examples:
--
Host script results:
|  smb-check-vulns:
|  MS08-067: FIXED
|_ regsvc DoS: VULNERABLE
--

--
Host script results:
|  smb-check-vulns:
|  |  MS08-067: FIXED
|_ |_ regsvc DoS: VULNERABLE
--

--
Host script results:
|  smb-check-vulns:
|  |_ MS08-067: FIXED
|_ |_ regsvc DoS: VULNERABLE
--

I personally find the last one easiest to read, but the second one looks  
more consistent.

In this simple case I don't like any extra characters. The first example
looks best to me. I know that in your other scripts you do have a need
to display hierarchical information.

How about this style? If you have more than one line you add another
level of hierarchy under the existing level.

Host script results:
|  smb-check-vulns:
|  MS08-067: FIXED
|  |  Extra information.
|  |_ More.
|_ regsvc DoS: VULNERABLE

It might look even better with just indentation.
Host script results:
|  smb-check-vulns:
|  MS08-067: FIXED
|    Extra information.
|    More.
|_ regsvc DoS: VULNERABLE

David Fifield

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: