Nmap Development mailing list archives
Re: format_output question
From: Ron <ron () skullsecurity net>
Date: Wed, 13 Jan 2010 14:55:30 -0600
Ah, that one I can reproduce. It might just be a font thing, but the output for both your commands looked indented incorrectly.
I'll take a look at format_output() and see if I can remember how it was supposed to work. :)
Ron On 01/13/2010 02:44 PM, Patrik Karlsson wrote:
Hi Ron, It's the second example having only one sublevel (Level 2) I'm having issues with. //Patrik On 13 jan 2010, at 21.38, Ron wrote:Hi Patrik, That definitely appears to be a bug, but I can't reproduce it. I copied and pasted your code into this function: action = function(host, port) local a = {} local a2 = {} table.insert(a, "Level 1 - Item 1") table.insert(a2, "Level 2 - Item 1") table.insert(a2, "Level 2 - Item 2") table.insert( a, a2 ) return stdnse.format_output(true, a) end And the response is: | test: | Level 1 - Item 1 | Level 2 - Item 1 |_ Level 2 - Item 2 Is there some other circumstance, perhaps? On 01/13/2010 02:16 PM, Patrik Karlsson wrote:Hi I'm looking into some output issues I'm having in two of my scripts and noticed the following: table.insert(a, "Level 1 - Item 1") table.insert(a2, "Level 2 - Item 1") table.insert(a2, "Level 2 - Item 2") table.insert( a, a2 ) return stdnse.format_output(true, a) produces the following output | test: | Level 1 - Item 1 | Level 2 - Item 1 |_ Level 2 - Item 2 while the following code (having only one item at Level2) table.insert(a, "Level 1 - Item 1") table.insert(a2, "Level 2 - Item 1") table.insert( a, a2 ) return stdnse.format_output(true, a) produces the following output, depending on your font settings it may be difficult to see but the Level 2 item is not indented properly and is more to the left than Level 1. | test: | Level 1 - Item 1 |_Level 2 - Item 1 Is this the way it should work or a bug? //PatrikHmm, that looks like it might be a bug. I tested it pretty good, when I first wrote it, but we've made some changes since then. _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/-- Patrik Karlsson http://www.cqure.net
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- format_output question Patrik Karlsson (Jan 13)
- Re: format_output question Ron (Jan 13)
- Re: format_output question Patrik Karlsson (Jan 13)
- Re: format_output question Ron (Jan 13)
- Re: format_output question Ron (Jan 13)
- Re: format_output question Patrik Karlsson (Jan 13)
- Re: format_output question Ron (Jan 13)