mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 14:11:29 +00:00
Fix some globals in nselib/data/http-*.lua
This commit is contained in:
@@ -298,7 +298,7 @@ table.insert(fingerprints, {
|
|||||||
local _, hex = bin.unpack("H" .. str:len(), str)
|
local _, hex = bin.unpack("H" .. str:len(), str)
|
||||||
return hex:lower()
|
return hex:lower()
|
||||||
end
|
end
|
||||||
local login = string.format("J20K34NMMT89XPIJ34S login %s %s", tohex(user), tohex(pass))
|
local login = ("J20K34NMMT89XPIJ34S login %s %s"):format(tohex(user), tohex(pass))
|
||||||
local lpath = url.absolute(path, "usmCgi.cgi/?" .. url.escape(login))
|
local lpath = url.absolute(path, "usmCgi.cgi/?" .. url.escape(login))
|
||||||
local req = http.get(host, port, lpath, {no_cache=true, redirect_ok = false})
|
local req = http.get(host, port, lpath, {no_cache=true, redirect_ok = false})
|
||||||
return req
|
return req
|
||||||
|
|||||||
@@ -367,13 +367,13 @@ tools = { Django = { rapidDetect = function(host, port)
|
|||||||
local response = http.get(host, port, "/")
|
local response = http.get(host, port, "/")
|
||||||
|
|
||||||
if response and response.status == 200 then
|
if response and response.status == 200 then
|
||||||
header_composed_by = response.header['composed-by']
|
local header_composed_by = response.header['composed-by']
|
||||||
-- Check in Composed-by header for the version
|
-- Check in Composed-by header for the version
|
||||||
if header_composed_by ~= nil then
|
if header_composed_by ~= nil then
|
||||||
version = string.match(header_composed_by, ('SPIP ((%d+)%.(%d+)%.(%d+))'))
|
local version = string.match(header_composed_by, ('SPIP (%d+%.%d+%.%d+)'))
|
||||||
end
|
if version ~= nil then
|
||||||
if version ~= nil then
|
return "Version of the SPIP install is " .. version
|
||||||
return "Version of the SPIP install is " .. version
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|||||||
Reference in New Issue
Block a user