From 361f10fc90c8042a4b9810ca4af70933d72e5d01 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 29 Sep 2009 14:58:44 +0000 Subject: [PATCH] Update NSEDoc to say that nmap.get_port_state can return nil if you pass it a port that was not scanned. --- nselib/nmap.luadoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nselib/nmap.luadoc b/nselib/nmap.luadoc index 70e8801b9..18a7de6fe 100644 --- a/nselib/nmap.luadoc +++ b/nselib/nmap.luadoc @@ -55,7 +55,8 @@ function timing_level() -- This function takes a host table and a port table and returns a port table -- for the queried port. The port table returned is similar in structure to the -- ones passed to the hostrule, portrule, and --- action functions. +-- action functions. If the given port was not scanned the function +-- returns nil. -- -- You can of course reuse the host and port tables passed to a script's rule -- function. The purpose of this call is to be able to match scripts against @@ -68,7 +69,7 @@ function timing_level() -- @param host Host table, containing an ip field. -- @param port Port table, containing number and -- protocol fields. --- @return A new port table holding the status and information for the port. +-- @return A new port table holding the status and information for the port, or nil. -- @usage p = nmap.get_port_state({ip="127.0.0.1"}, {number="80", protocol="tcp"}) function get_port_state(host, port)