1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-23 16:09:02 +00:00

Gets arguments with stdnse.get_script_args instead of reading them from nmap.registry

This commit is contained in:
paulino
2011-07-27 03:28:13 +00:00
parent 338ed74779
commit 26dc09ad43
19 changed files with 63 additions and 65 deletions

View File

@@ -210,15 +210,15 @@ action = function(host, port)
injectable = {}
-- start at the root
if nmap.registry.args['sql-injection.start'] then
table.insert(urllist, "/" .. nmap.registry.args['sql-injection.start'])
if stdnse.get_script_args('sql-injection.start') then
table.insert(urllist, "/" .. stdnse.get_script_args('sql-injection.start'))
else
table.insert(urllist, "/")
end
-- check for argument supplied max depth
if nmap.registry.args['sql-injection.maxdepth'] then
maxdepth = tonumber(nmap.registry.args['sql-injection.maxdepth'])
if stdnse.get_script_args('sql-injection.maxdepth') then
maxdepth = tonumber(stdnse.get_script_args('sql-injection.maxdepth'))
stdnse.print_debug("maxdepth set to: " .. maxdepth)
end