Nmap Development mailing list archives
Structured script output merge candidate 2
From: David Fifield <david () bamsoftware com>
Date: Fri, 10 Aug 2012 06:57:42 -0700
On Sat, Aug 04, 2012 at 05:08:40PM -0700, David Fifield wrote:
I have been integrating and editing Daniel Miller's patches for structured script output. Structured script output allows scripts to return a table of name-value pairs, which will be reflected in an element hierarchy in XML output. The code is here: svn co https://svn.nmap.org/nmap-exp/david/xml-output This is what the XML output looks like. The normal output is the same as in Nmap trunk. https://secwiki.org/w/Nmap/Structured_Script_Output#Merge_candidate_1 These commands show sample diffs that make scripts provide structured output: svn diff -c 29491 https://svn.nmap.org/nmap-exp/david/xml-output svn diff -c 29492 https://svn.nmap.org/nmap-exp/david/xml-output svn diff -c 29493 https://svn.nmap.org/nmap-exp/david/xml-output This merge candidate is missing one thing, which is an ordered output table along the lines of what Patrik provided in http://seclists.org/nmap-dev/2012/q3/289.
I made a new merge candidate 2, the above branch at r29553, mainly adding the stdnse.output_table function that allows ordering tables for output. I think this branch is in a fit state to merge if there are no objections. Script authors should check out the changes and make sure that what they'll need to do to make their scripts produce structured output is tolerable. You can't just return the table that you've been passing to stdnse.format_output. In most cases you want to build a nice queryable table with thoughtful key names, then construct the format_output table separately (possibly automatically). 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:
- Structured script output merge candidate 1 David Fifield (Aug 04)
- Structured script output merge candidate 2 David Fifield (Aug 10)
- Structured script output merged David Fifield (Aug 14)
- Structured script output merge candidate 2 David Fifield (Aug 10)