Environment variables

The following are the environment variables used in preparing an Nmap script:

The following is a structure of a simple Nmap script:

//Rule section
portrule = function(host, port)
return port.protocol == "tcp"
and port.number == 25
and port.state == "open"
end

//Action section
action = function(host, port)
return "smtp port is open"
end