mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 14:11:29 +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-*-
|
# 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
|
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]
|
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
|
-- @param key number containing the element number to retrieve
|
||||||
-- @return ie table containing the info element if it exists
|
-- @return ie table containing the info element if it exists
|
||||||
getIE = function(self, key)
|
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
|
if ( key == ie.type ) then
|
||||||
return ie
|
return ie
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ TAP = {
|
|||||||
-- @return status true on success, false on failure
|
-- @return status true on success, false on failure
|
||||||
parse = function(self)
|
parse = function(self)
|
||||||
if ( 24 > #self.data ) then
|
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"
|
return false, "Packet to short"
|
||||||
end
|
end
|
||||||
local pos
|
local pos
|
||||||
|
|||||||
@@ -623,12 +623,12 @@ local function printBuffer(strData)
|
|||||||
print(out)
|
print(out)
|
||||||
end
|
end
|
||||||
|
|
||||||
function test()
|
-- function test()
|
||||||
local res
|
-- local res
|
||||||
res = versionQuery()
|
-- res = versionQuery()
|
||||||
print(type(res),res:len(),res)
|
-- print(type(res),res:len(),res)
|
||||||
local out= bin.unpack('C'..#res,res)
|
-- local out= bin.unpack('C'..#res,res)
|
||||||
printBuffer(res)
|
-- printBuffer(res)
|
||||||
end
|
-- end
|
||||||
--test()
|
--test()
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ LCP = {
|
|||||||
|
|
||||||
-- MRU
|
-- MRU
|
||||||
if ( 1 == opt.option ) then
|
if ( 1 == opt.option ) then
|
||||||
opt.value = select(2, bin.unpack(">S", self.raw))
|
opt.value = select(2, bin.unpack(">S", opt.raw))
|
||||||
end
|
end
|
||||||
return LCP.ConfigOption:new(opt.option, opt.value, opt.raw)
|
return LCP.ConfigOption:new(opt.option, opt.value, opt.raw)
|
||||||
end,
|
end,
|
||||||
@@ -297,7 +297,7 @@ LCP = {
|
|||||||
parse = function(data)
|
parse = function(data)
|
||||||
local ack = LCP.ConfigAck:new()
|
local ack = LCP.ConfigAck:new()
|
||||||
ack.header = LCP.Header.parse(data)
|
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
|
return ack
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ Response = {
|
|||||||
end
|
end
|
||||||
table.insert(results, data)
|
table.insert(results, data)
|
||||||
end
|
end
|
||||||
return true, { data = results, type = MULTIBULK }
|
return true, { data = results, type = Response.Type.MULTIBULK }
|
||||||
end
|
end
|
||||||
|
|
||||||
return false, "Unsupported response"
|
return false, "Unsupported response"
|
||||||
|
|||||||
@@ -1205,10 +1205,10 @@ local l_filter_vuln = function(vuln_table, filter)
|
|||||||
|
|
||||||
if filter.id_type then
|
if filter.id_type then
|
||||||
if not vuln_table.IDS or not next(vuln_table.IDS) or
|
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
|
return false
|
||||||
elseif filter.id then
|
elseif filter.id then
|
||||||
return (vuln_table.IDS[id_type] == filter.id)
|
return (vuln_table.IDS[filter.id_type] == filter.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ Response = {
|
|||||||
fromString = function(data)
|
fromString = function(data)
|
||||||
local find = Response.FIND_NODE:new(data)
|
local find = Response.FIND_NODE:new(data)
|
||||||
if ( find.header.proto_version < 13 ) then
|
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
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ Helper = {
|
|||||||
createSession = function(self, auth_names, authr_names, disp_no)
|
createSession = function(self, auth_names, authr_names, disp_no)
|
||||||
local info = nmap.get_interface_info(self.host.interface)
|
local info = nmap.get_interface_info(self.host.interface)
|
||||||
if ( not(info) ) then
|
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
|
end
|
||||||
|
|
||||||
local req = xdmcp.Packet[xdmcp.OpCode.QUERY]:new(auth_names)
|
local req = xdmcp.Packet[xdmcp.OpCode.QUERY]:new(auth_names)
|
||||||
|
|||||||
Reference in New Issue
Block a user