mirror of
https://github.com/nmap/nmap.git
synced 2025-12-24 16:39:03 +00:00
Added missing second parameter for receive_buf which caused errors with new
Lua version.
This commit is contained in:
@@ -49,7 +49,7 @@ Response = {
|
||||
end,
|
||||
|
||||
receive = function(self)
|
||||
local status, data = self.socket:receive_buf("\r\n")
|
||||
local status, data = self.socket:receive_buf("\r\n", false)
|
||||
if ( not(status) ) then
|
||||
return false, "Failed to receive data from server"
|
||||
end
|
||||
@@ -78,7 +78,7 @@ Response = {
|
||||
|
||||
local len = tonumber(data:match("^%$(%d*)"))
|
||||
-- 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), false)
|
||||
if( not(status) ) then
|
||||
return false, "Failed to receive data from server"
|
||||
end
|
||||
@@ -93,12 +93,12 @@ Response = {
|
||||
|
||||
for i=1, count do
|
||||
-- peel of the length
|
||||
local status = self.socket:receive_buf("\r\n")
|
||||
local status = self.socket:receive_buf("\r\n", false)
|
||||
if( not(status) ) then
|
||||
return false, "Failed to receive data from server"
|
||||
end
|
||||
|
||||
status, data = self.socket:receive_buf("\r\n")
|
||||
status, data = self.socket:receive_buf("\r\n", false)
|
||||
if( not(status) ) then
|
||||
return false, "Failed to receive data from server"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user