From 99c192cd1d922d200bc7a1554dcaf603e095fe2c Mon Sep 17 00:00:00 2001 From: tomsellers Date: Wed, 4 Jul 2012 17:58:21 +0000 Subject: [PATCH] Fix exception thrown in reverse-index when it is run again a host with no open ports. /reverse-index.nse:112: bad argument #1 to 'pairs' (table expected, got nil) --- scripts/reverse-index.nse | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/reverse-index.nse b/scripts/reverse-index.nse index 51248fe1b..f1e079684 100644 --- a/scripts/reverse-index.nse +++ b/scripts/reverse-index.nse @@ -136,6 +136,10 @@ end postaction = function() local db = nmap.registry[SCRIPT_NAME] + if ( db == nil ) then + return false + end + local results local mode = stdnse.get_script_args("reverse-index.mode") or "horizontal"