Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Re: Suggestion: Using script output - Human-readable and machine-parseable
From: David Fifield <david () bamsoftware com>
Date: Wed, 6 Apr 2011 15:26:46 -0700

On Wed, Apr 06, 2011 at 03:23:50PM -0700, Fyodor wrote:
On Tue, Apr 05, 2011 at 07:35:29AM -0500, Daniel Miller wrote:

I'm attaching a patch that allows for formatting output as YAML.

For these reasons, I wonder if it would be better to create a general
results formatting function which takes a Lua table of results and
creates both XML and normal output from that?  For normal output, it
would do things like add the indenting and might ignore the labels in
some or all cases.  For XML, it would use the labels as attributes in
XML tags providing the data.  There would probably be an XML element
containing the user-formatted string results too (as there is now).

For what it's worth, I don't propose that YAML text should be output in
the XML. Instead, the underlying structure would be converted to XML
elements. When I said "tag" the output as YAML, I meant internally, not
in a user-visible way. The output routines would convert the underlying
structure to text for normal output and XML elements for XML output. A
script could conceivably output different information in either form.

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


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]
AlienVault