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

Summary


NSE automatically performs several operations in parallel to obtain better performance during scans. Most of the time, we won't even realize when our scripts are yielded because of this. However, there are special situations where we may need finer control over the execution of our scripts.

In this chapter, you learned all the parallelism mechanisms supported by NSE and how you can use them to control the execution flow of scripts and worker threads. We introduced Lua coroutines, showed the differences from traditional preemptive multithreading, and demonstrated how to use them to achieve collaborative multithreading. Additionally, you learned about condition variables and mutexes to control the execution flow of threads in NSE.

The next step is to review all the scripts you have previously written and check whether any of them could be improved by implementing parallelism. With a bit of luck, you will make your NSE scripts even faster.

In the upcoming chapter, you will learn about...