mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +00:00
o [NSE] Fixed a bunch of global access errors in various libraries reported by
the nse_check_globals script. [Patrik]
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
# Nmap Changelog ($Id$); -*-text-*-
|
||||
|
||||
o [NSE] Fixed a bunch of global access errors in various libraries reported by
|
||||
the nse_check_globals script. [Patrik]
|
||||
|
||||
o [NSE] Added url-snarf. The script sniffs the network for URLs in HTTP
|
||||
traffic and prints the URL together with the originating IP. [Patrik]
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ IAX2 = {
|
||||
-- @param key number containing the element number to retrieve
|
||||
-- @return ie table containing the info element if it exists
|
||||
getIE = function(self, key)
|
||||
for _, ie in ipairs(r.ies or {}) do
|
||||
for _, ie in ipairs(self.ies or {}) do
|
||||
if ( key == ie.type ) then
|
||||
return ie
|
||||
end
|
||||
|
||||
@@ -163,7 +163,7 @@ TAP = {
|
||||
-- @return status true on success, false on failure
|
||||
parse = function(self)
|
||||
if ( 24 > #self.data ) then
|
||||
stdnse.print_debug("%s: Header packet too short (%d bytes)", SCRIPT_NAME, #self.data)
|
||||
stdnse.print_debug("membase: Header packet too short (%d bytes)", #self.data)
|
||||
return false, "Packet to short"
|
||||
end
|
||||
local pos
|
||||
|
||||
@@ -623,12 +623,12 @@ local function printBuffer(strData)
|
||||
print(out)
|
||||
end
|
||||
|
||||
function test()
|
||||
local res
|
||||
res = versionQuery()
|
||||
print(type(res),res:len(),res)
|
||||
local out= bin.unpack('C'..#res,res)
|
||||
printBuffer(res)
|
||||
end
|
||||
-- function test()
|
||||
-- local res
|
||||
-- res = versionQuery()
|
||||
-- print(type(res),res:len(),res)
|
||||
-- local out= bin.unpack('C'..#res,res)
|
||||
-- printBuffer(res)
|
||||
-- end
|
||||
--test()
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ LCP = {
|
||||
|
||||
-- MRU
|
||||
if ( 1 == opt.option ) then
|
||||
opt.value = select(2, bin.unpack(">S", self.raw))
|
||||
opt.value = select(2, bin.unpack(">S", opt.raw))
|
||||
end
|
||||
return LCP.ConfigOption:new(opt.option, opt.value, opt.raw)
|
||||
end,
|
||||
@@ -297,7 +297,7 @@ LCP = {
|
||||
parse = function(data)
|
||||
local ack = LCP.ConfigAck:new()
|
||||
ack.header = LCP.Header.parse(data)
|
||||
ack.options = LCP.ConfigOptions.parse(data:sub(#tostring(req.header) + 1))
|
||||
ack.options = LCP.ConfigOptions.parse(data:sub(#tostring(ack.header) + 1))
|
||||
return ack
|
||||
end,
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ Response = {
|
||||
end
|
||||
table.insert(results, data)
|
||||
end
|
||||
return true, { data = results, type = MULTIBULK }
|
||||
return true, { data = results, type = Response.Type.MULTIBULK }
|
||||
end
|
||||
|
||||
return false, "Unsupported response"
|
||||
|
||||
@@ -1205,10 +1205,10 @@ local l_filter_vuln = function(vuln_table, filter)
|
||||
|
||||
if filter.id_type then
|
||||
if not vuln_table.IDS or not next(vuln_table.IDS) or
|
||||
not vuln_table.IDS[id_type] then
|
||||
not vuln_table.IDS[filter.id_type] then
|
||||
return false
|
||||
elseif filter.id then
|
||||
return (vuln_table.IDS[id_type] == filter.id)
|
||||
return (vuln_table.IDS[filter.id_type] == filter.id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -299,7 +299,7 @@ Response = {
|
||||
fromString = function(data)
|
||||
local find = Response.FIND_NODE:new(data)
|
||||
if ( find.header.proto_version < 13 ) then
|
||||
stdnse.print_debug("ERROR: Unsupported version %d", self.header.proto_version)
|
||||
stdnse.print_debug("ERROR: Unsupported version %d", find.header.proto_version)
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
@@ -310,7 +310,7 @@ Helper = {
|
||||
createSession = function(self, auth_names, authr_names, disp_no)
|
||||
local info = nmap.get_interface_info(self.host.interface)
|
||||
if ( not(info) ) then
|
||||
return false, ("Failed to get information for interface %s"):format(host.interface)
|
||||
return false, ("Failed to get information for interface %s"):format(self.host.interface)
|
||||
end
|
||||
|
||||
local req = xdmcp.Packet[xdmcp.OpCode.QUERY]:new(auth_names)
|
||||
|
||||
Reference in New Issue
Block a user