mirror of
https://github.com/nmap/nmap.git
synced 2025-12-14 11:49:01 +00:00
o [NSE] Fixed bug in match.numbytes that would return one byte less than what
was requested. Updated redis library to take the fix into account. [Patrik]
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
# Nmap Changelog ($Id$); -*-text-*-
|
# Nmap Changelog ($Id$); -*-text-*-
|
||||||
|
|
||||||
|
o [NSE] Fixed bug in match.numbytes that would return one byte less than what
|
||||||
|
was requested. Updated redis library to take the fix into account. [Patrik]
|
||||||
|
|
||||||
o Added probe and matchline for Couchbase Membase NoSQL database [Patrik]
|
o Added probe and matchline for Couchbase Membase NoSQL database [Patrik]
|
||||||
|
|
||||||
o Added the new --script-args-file option which allows you to specify
|
o Added the new --script-args-file option which allows you to specify
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ end
|
|||||||
-- @usage sock:receive_buf(match.numbytes(80))
|
-- @usage sock:receive_buf(match.numbytes(80))
|
||||||
-- @see nmap.receive_buf
|
-- @see nmap.receive_buf
|
||||||
numbytes = function(num)
|
numbytes = function(num)
|
||||||
local n = num
|
local n = num + 1
|
||||||
return function(buf)
|
return function(buf)
|
||||||
if(#buf >=n) then
|
if(#buf >=n) then
|
||||||
return n, n
|
return n, n
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ Response = {
|
|||||||
|
|
||||||
local len = tonumber(data:match("^%$(%d*)"))
|
local len = tonumber(data:match("^%$(%d*)"))
|
||||||
-- we should only have a single line, so we can just peel of the length
|
-- we should only have a single line, so we can just peel of the length
|
||||||
status, data = self.socket:receive_buf(match.numbytes(len))
|
status, data = self.socket:receive_buf(match.numbytes(len-1))
|
||||||
if( not(status) ) then
|
if( not(status) ) then
|
||||||
return false, "Failed to receive data from server"
|
return false, "Failed to receive data from server"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user