mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 16:57:06 +00:00
Escape backslashes which may appear in Windows filenames.
This commit is contained in:
parent
b0fe74e355
commit
76239f73b9
1 changed files with 2 additions and 0 deletions
|
|
@ -648,6 +648,8 @@ local function get_chosen_scripts (rules)
|
|||
local forced, rule = is_forced_set(rule);
|
||||
used_rules[rule] = false; -- has not been used yet
|
||||
forced_rules[rule] = forced;
|
||||
-- Here we escape backslashes which might appear in Windows filenames.
|
||||
rule = gsub(rule, "\\([^\\])", "\\\\%1");
|
||||
-- Globalize all `names`, all visible characters not ',', '(', ')', and ';'
|
||||
local globalized_rule =
|
||||
gsub(rule, "[\033-\039\042-\043\045-\058\060-\126]+", globalize);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue