1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-01 02:59:01 +00:00

[NSE] --script-args may now have whitespace in unquoted strings (but

surrounding whitespace is ignored). Here is a simple example for clarity:
  --script-args 'greeting = This is a greeting'
  Becomes: { ["greeting"] = "This is a greeting" }
This commit is contained in:
batrick
2009-07-25 19:45:05 +00:00
parent 7ae8aaaf97
commit cf9ed0d411

View File

@@ -624,7 +624,7 @@ do -- Load script arguments (--script-args)
local function parse_string (str, start)
-- Unquoted
local uqi, uqj, uqm = find(str,
"^%s*([^'\"%s{},=][^%s{},=]*)%s*[},=]", start);
"^%s*([^'\"%s{},=][^{},=]-)%s*[},=]", start);
-- Quoted
local qi, qj, q, qm = find(str, "^%s*(['\"])(.-[^\\])%1%s*[},=]", start);
-- Empty Quote