1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-25 08:59:01 +00:00

fixed bug that would fail reading url and options supplied to the Helper:new

method.
This commit is contained in:
patrik
2012-01-28 19:29:32 +00:00
parent fb3eb4c6c5
commit d4ca7dccfd

View File

@@ -659,12 +659,12 @@ Crawler = {
return
end
self.options.maxdepth = tonumber(stdnse.get_script_args(sn .. ".maxdepth"))
self.options.maxpagecount = tonumber(stdnse.get_script_args(sn .. ".maxpagecount"))
self.url = stdnse.get_script_args(sn .. ".url")
self.options.withinhost = stdnse.get_script_args(sn .. ".withinhost")
self.options.withindomain = stdnse.get_script_args(sn .. ".withindomain")
self.options.noblacklist = stdnse.get_script_args(sn .. ".noblacklist")
self.options.maxdepth = self.options.maxdepth or tonumber(stdnse.get_script_args(sn .. ".maxdepth"))
self.options.maxpagecount = self.options.maxpagecount or tonumber(stdnse.get_script_args(sn .. ".maxpagecount"))
self.url = self.url or stdnse.get_script_args(sn .. ".url")
self.options.withinhost = self.options.withinhost or stdnse.get_script_args(sn .. ".withinhost")
self.options.withindomain = self.options.withindomain or stdnse.get_script_args(sn .. ".withindomain")
self.options.noblacklist = self.options.noblacklist or stdnse.get_script_args(sn .. ".noblacklist")
end,
-- Loads the argument on a library level