1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-28 02:19:04 +00:00

[NSE] Added Boolean Operators for --script. You may now use a boolean operator

("and", "or", or "not") combined with categories, filenames, and filenames with
a '*', wildcard, to match many files.  This change requires the script database
to be recompiled. Please see the thread at
http://seclists.org/nmap-dev/2009/q2/0100.html for more information.
This commit is contained in:
batrick
2009-04-30 05:49:47 +00:00
parent 6b1421db69
commit 98e51ec007
3 changed files with 88 additions and 47 deletions

View File

@@ -335,10 +335,11 @@ int script_updatedb (void)
" ' categories field is not a table')\n"
" local basename = assert(match(script, '[/\\\\]?([^/\\\\]-%.nse)$'))\n"
" table.sort(categories)\n"
" db:write('Entry { filename = \"', basename, '\", categories = {')\n"
" for j, category in ipairs(categories) do\n"
" db:write('Entry { category = \"', lower(category),"
" '\", filename = \"', basename, '\" }\\n')\n"
" db:write(' \"', lower(category), '\",')\n"
" end\n"
" db:write(' } }\\n')\n"
"end\n"
"db:close()\n";
int status = SCRIPT_ENGINE_SUCCESS;