From 6b1421db697b5bfd8ea3f7e802386b99f01215e6 Mon Sep 17 00:00:00 2001 From: jah Date: Wed, 29 Apr 2009 23:51:28 +0000 Subject: [PATCH] Fixed leading backslash appearing in script filenames after running --script-updatedb which caused an error when choosing which scripts to be run. See: http://seclists.org/nmap-dev/2009/q2/0266.html --- nse_main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nse_main.cc b/nse_main.cc index 5cce8b0fa..7561a57df 100644 --- a/nse_main.cc +++ b/nse_main.cc @@ -333,7 +333,7 @@ int script_updatedb (void) " local categories = rawget(env, 'categories')\n" " assert(type(categories) == 'table', script.." " ' categories field is not a table')\n" - " local basename = assert(match(script, '[/\\]?([^/\\]-%.nse)$'))\n" + " local basename = assert(match(script, '[/\\\\]?([^/\\\\]-%.nse)$'))\n" " table.sort(categories)\n" " for j, category in ipairs(categories) do\n" " db:write('Entry { category = \"', lower(category),"