Nmap Development mailing list archives

format_output question


From: Patrik Karlsson <patrik () labb1 com>
Date: Wed, 13 Jan 2010 21:16:51 +0100

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?

//Patrik
--
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: