O'Reilly logo

Mastering the Nmap Scripting Engine by Paulino Calderón Pale

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

XML structured output

The objective of the XML structured output is to return data to users in structures that are easier to parse than the blob of text returned by the older scripts. The best part is that we can take advantage of this feature transparently in our scripts using the standard functions provided by the Nmap API and the stdnse library. If you are considering sending your NSE script to get it included with official Nmap releases, I highly recommend making your scripts support the structured output.

Note

The official documentation of the stdnse and nmap libraries can be found here:

Implementing structured output in your scripts

Lua tables are perfect data structures ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required