Summary
Lua is a dynamically typed language that is perfect for quick scripting. It is very light, memory-safe, and offers useful functions for collaborative multitasking, pattern matching, data modelling, and string handling. Nmap uses Lua to power its scripting engine called NSE. In this chapter, I tried to provide the fundamentals of Lua for those who are not familiar with the language. I covered topics such as string manipulation, flow control structures, data types, and even special quirks in the language.
I firmly believe that, to truly master NSE, one must be able to debug and create NSE scripts. Those who do will have an invaluable tool at their disposal. In the next chapter, we will go deep into the core of NSE to learn its libraries, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access