Getting your scripts ready for submission
Hopefully, after going through this chapter, you have learned how to write your very own scripts and now you are ready to share them with the world. Before a submission gets incorporated into the main source code trunk, it must pass certain quality control checks. All committed code must adhere to the project's code standards and must be tested thoroughly.
This recipe will go over the process of preparing your NSE script for submission.
How to do it...
- First, visit https://secwiki.org/w/Nmap/Code_Standards and make sure that you read the whole document. It describes the code standards guidelines followed by the organization. For Lua and NSE scripts, the rules are simple:
–Use NSEDoc tags to document the script.
–Indent with two spaces, not tabs.
–Functions and variables must be local.
–Scripts should support structured output.
–Always use explicit endianness in format strings.
- Once your script...