Book Image

Mastering the Nmap Scripting Engine

By : Paulino Calderon
Book Image

Mastering the Nmap Scripting Engine

By: Paulino Calderon

Overview of this book

Table of Contents (23 chapters)
Mastering the Nmap Scripting Engine
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Scan Phases
Script Categories
Nmap Options Mind Map
References
Index

Understanding the structure of an NSE script


An NSE script requires at least the following fields:

  • Description: This description is read by the --script-help Nmap option and is used in the documentation.

  • Categories: This field defines the script category used when selecting scripts. For a list of available categories, see Appendix C, Script Categories.

  • Action: This is the main function of the NSE script that gets executed on selection.

  • Execution rule: This defines when the script is going to run. See Chapter 1, Introduction to the Nmap Scripting Engine, for some examples of execution rules.

Note

For a complete list of categories, see Appendix C, Script Categories.

Other NSE script fields

Other available fields describe topics such as licensing, dependencies, and categories. These fields are optional, but I highly encourage you to add them to improve the quality of your script's documentation.

Author

This field gives credits to the authors of the scripts who share their work with the community. It...