February 2015
Beginner to intermediate
244 pages
4h 37m
English
Nmap scans are divided into several phases but NSE is only involved in three of them: pre-scanning, script scanning, and post-scanning. The execution rule defined by a function in the NSE script determines whether it runs in any of those phases.
To learn more about the phases of Nmap scans, check out Appendix A, Scan Phases.
NSE scripts can have one of four different types of execution rule:
prerulepostruleportrulehostruleLet's review some examples of these different script rules. This will also help you learn to debug scripts for those times when you run into problems:
prerule(): The following is a snippet from the targets-sniffer.nse NSE script. It illustrates how we can use a prerule function to check whether ...Read now
Unlock full access