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

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 ...

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