-
Book Overview & Buying
-
Table Of Contents
Mastering the Nmap Scripting Engine
By :
This is the core API that allows scripts to obtain host and port information such as name resolution, state, version detection results, Mac address, and more (if available). It also provides the interface to Nsock, Nmap's socket library, which will be covered in Chapter 8, Working with Network Sockets and Binary Data.
The arguments passed to the main action function consist of two Lua tables corresponding to host and port information. The amount of information available depends on the options used during the scans. For example, the host.os table will show nothing if the OS detection mode (-O) was not set.
The host table is a regular Lua table with the following fields:
host.os: This is the table containing OS matches (only available with OS detection)
host.ip: This is the IP address of the target
host.name: This is the reverse DNS name of the target (if available)
host.targetname: This is the hostname specified in the command line
host.directly_connected...
Change the font size
Change margin width
Change background colour