Nmap Development mailing list archives
Re: NSE structured output--normal output formatting
From: Patrick Donnelly <batrick () batbytes com>
Date: Sat, 21 Jul 2012 01:48:11 -0400
On Sat, Jul 21, 2012 at 1:02 AM, Daniel Miller <bonsaiviking () gmail com> wrote:
I don't think that David is advocating for string output that is wholly (or even mostly) different in content from the structured output, but rather that the transform function should be called within the script body, rather than by the engine, after the fact.
Sorry David for the confusion. I thought you were advocating all transformations would happen on the script side but after reading your OP again, I see you want to support all three cases. As for what I think, I don't yet see an example script that would benefit from supporting returning both a table and a string. So far all we have is nfs-ls and that should look like (IMO): local file = {uid=1000,path="/foo", ...} local filestr = "drwx------ ...." -- transform code here output.exports[1].files[1] = stdnse.scriptoutput(file, filestr) So I'm against this change.
I am not advocating for abandoning a string representation that cannot be recreated from XML structure: there are too many display options for it to be obvious how to generate the string.
Not convinced.
I'll throw in one more advantage for the metamethod approach: nesting of different display types. Consider nfs-ls.nse, which has ls-style tables of data nested within an outline structure describing each export. With metamethods, I "tag" each ls-table with the rows-and-columns-style, then insert each into the standard-style output table.
This doesn't make sense to me.
My implementation on Github can already handle this,
Can you start posting patches to the list or make a mirror branch on svn in /nmap-exp so it's easier to follow? I haven't been able to look at this and it's becoming quite frustrating during these discussions. I also want to see what nfs-ls looks like. Also, how are you handling verbosity now for script output? -- - Patrick Donnelly _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- NSE structured output--normal output formatting David Fifield (Jul 19)
- Re: NSE structured output--normal output formatting Patrick Donnelly (Jul 20)
- Re: NSE structured output--normal output formatting David Fifield (Jul 20)
- Re: NSE structured output--normal output formatting Patrick Donnelly (Jul 20)
- Re: NSE structured output--normal output formatting Daniel Miller (Jul 20)
- Re: NSE structured output--normal output formatting David Fifield (Jul 20)
- Re: NSE structured output--normal output formatting Patrick Donnelly (Jul 20)
- Re: NSE structured output--normal output formatting Daniel Miller (Jul 24)
- Re: NSE structured output--normal output formatting Patrick Donnelly (Jul 24)
- Re: NSE structured output--normal output formatting Aleksandar Nikolic (Jul 27)
- Re: NSE structured output--normal output formatting Daniel Miller (Jul 27)
- Re: NSE structured output--normal output formatting David Fifield (Jul 20)
- Re: NSE structured output--normal output formatting Patrick Donnelly (Jul 20)
- Re: NSE structured output--normal output formatting Daniel Miller (Jul 20)