Nmap Development mailing list archives
Re: [RFC][patch] XML structured script output (Nmap-script-XML as of 15 July)
From: David Fifield <david () bamsoftware com>
Date: Thu, 19 Jul 2012 16:13:51 -0700
On Thu, Jul 19, 2012 at 04:08:37PM -0700, David Fifield wrote:
I can deal with the field names being lower-case and identifier-like; maybe people will even prefer them that way. But the fact that "md5" and "sha1" are not on adjacent lines is galling. Maybe a special kind of table format that keeps order (i.e., an array of name-value pairs)? That would seem to require a higher-level function with which to set output values.
There is something like this in Python called an OrderedDict, http://docs.python.org/dev/library/collections.html#collections.OrderedDict What if we provided each script instance with a global "output" variable that is an ordered dict. Scripts can assign into this table, and the output will retain the same order as the assignments. Scripts can keep returning as string as they do now. Basically every time they add something to their output string, they can add something to the global "output" as well. New scripts that don't need fancy formatting can just assign into "output" and rely on automatic serialization into text format. David Fifield _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Re: [RFC][patch] XML structured script output (Nmap-script-XML as of 15 July) David Fifield (Jul 19)
- Re: [RFC][patch] XML structured script output (Nmap-script-XML as of 15 July) David Fifield (Jul 19)
- Re: [RFC][patch] XML structured script output (Nmap-script-XML as of 15 July) Patrick Donnelly (Jul 20)
- Re: [RFC][patch] XML structured script output (Nmap-script-XML as of 15 July) David Fifield (Jul 20)
- Re: [RFC][patch] XML structured script output (Nmap-script-XML as of 15 July) Patrick Donnelly (Jul 20)
- Re: [RFC][patch] XML structured script output (Nmap-script-XML as of 15 July) David Fifield (Jul 20)
- Re: [RFC][patch] XML structured script output (Nmap-script-XML as of 15 July) David Fifield (Jul 20)
- Re: XML structured script output (storing results per script instance) David Fifield (Jul 31)
- Re: XML structured script output (storing results per script instance) Patrick Donnelly (Jul 31)
- Re: XML structured script output (storing results per script instance) David Fifield (Jul 31)
- Re: XML structured script output (storing results per script instance) Patrick Donnelly (Aug 01)
- Re: XML structured script output (storing results per script instance) Daniel Miller (Aug 01)
- Re: XML structured script output (storing results per script instance) Patrick Donnelly (Aug 01)
- Re: XML structured script output (storing results per script instance) Patrick Donnelly (Jul 31)