mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Fixed global assignments with nse_check_globals
All fixes made by hand. A couple real bugs/errors fixed, due to copy-paste of code from other scripts without changing variable names.
This commit is contained in:
parent
8a07146936
commit
db1d82ad1f
39 changed files with 112 additions and 77 deletions
|
|
@ -569,13 +569,13 @@ Crawler = {
|
|||
-- @param u URL that points to the resource we want to check.
|
||||
iswithindomain = function(self, u)
|
||||
local parsed_u = url.parse(tostring(u))
|
||||
if ( o.base_url:getPort() ~= 80 and o.base_url:getPort() ~= 443 ) then
|
||||
if ( tonumber(parsed_u.port) ~= tonumber(o.base_url:getPort()) ) then
|
||||
if ( self.options.base_url:getPort() ~= 80 and self.options.base_url:getPort() ~= 443 ) then
|
||||
if ( tonumber(parsed_u.port) ~= tonumber(self.options.base_url:getPort()) ) then
|
||||
return false
|
||||
end
|
||||
elseif ( parsed_u.scheme ~= o.base_url:getProto() ) then
|
||||
elseif ( parsed_u.scheme ~= self.options.base_url:getProto() ) then
|
||||
return false
|
||||
elseif ( parsed_u.host == nil or parsed_u.host:sub(-#o.base_url:getDomain()):lower() ~= o.base_url:getDomain():lower() ) then
|
||||
elseif ( parsed_u.host == nil or parsed_u.host:sub(-#self.options.base_url:getDomain()):lower() ~= self.options.base_url:getDomain():lower() ) then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
|
|
@ -592,8 +592,8 @@ Crawler = {
|
|||
return true
|
||||
end
|
||||
|
||||
local signstring = ""
|
||||
if signs then
|
||||
signstring = ""
|
||||
for _, s in signs do
|
||||
signstring = signstring .. s
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue