From cf9ed0d4117252f5d550e04e6fabd4c1da289765 Mon Sep 17 00:00:00 2001 From: batrick Date: Sat, 25 Jul 2009 19:45:05 +0000 Subject: [PATCH] [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" } --- nse_main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nse_main.lua b/nse_main.lua index 3f83f2068..eef80d8d4 100644 --- a/nse_main.lua +++ b/nse_main.lua @@ -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