From baab50f5a6c7ba1472991cbcd3d514b665573b1f Mon Sep 17 00:00:00 2001 From: paulino Date: Wed, 18 Jul 2012 19:11:16 +0000 Subject: [PATCH] Updates documentation about importing NSE libraries after upgrade to LUA 5.2 --- docs/sample-script.nse | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/sample-script.nse b/docs/sample-script.nse index 03d6ec974..242d2f500 100644 --- a/docs/sample-script.nse +++ b/docs/sample-script.nse @@ -72,11 +72,17 @@ license = "Same as Nmap--See http://nmap.org/book/man-legal.html" -- * vuln: Scripts that check for specific, known vulnerabilities should be in the 'vuln' category. categories = { "safe", "intrusive" } -- TODO: remove one or the other. --- NSELib libraries should be included here. -require 'stdnse' +-- NSELib libraries should be included here. Note that the declaration to import libraries changed after the upgrade to Lua 5.2 +-- +-- Format for Nmap versions <=6: +-- require 'stdnse' --require 'shortport' -- Uncomment if you want to use the 'shortport' rule. --require 'nsedebug' -- Uncomment while you are debuggint to access debug functions. - +-- +-- Format for Nmap versions >= 6.01: +local stdnse = require "stdnse" +--local shortport = require 'shortport' -- Uncomment if you want to use the 'shortport' rule. +--local nsedebug = require 'nsedebug' -- Uncomment while you are debuggint to access debug functions. -- The next section is rules that will cause the script to execute. These can -- be any one or more of: