mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +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:
parent
7ae8aaaf97
commit
cf9ed0d411
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue