Chapter 9. Parallelism

NSE scripts are executed inside Lua threads (one thread per script) in parallel without developers having to explicitly define this behavior. However, the Nmap Scripting Engine (NSE) supports different mechanisms to offer finer execution control to developers who may want to work with additional threads to perform multiple network operations simultaneously. Also, NSE automatically executes network I/O operations in parallel. Execution of scripts is normally stopped when a network read task is performed and then yielded back. In order to expand or alter this behavior, we will need to use the parallelism mechanisms supported in NSE.

In this chapter, you will learn everything you need to know about parallelism when developing ...

Get Mastering the Nmap Scripting Engine now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.