diff --git a/nselib/redis.lua b/nselib/redis.lua index 2398439d9..d91e4176a 100644 --- a/nselib/redis.lua +++ b/nselib/redis.lua @@ -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 diff --git a/nselib/rsync.lua b/nselib/rsync.lua index d9f7e8374..b017b0007 100644 --- a/nselib/rsync.lua +++ b/nselib/rsync.lua @@ -39,7 +39,7 @@ Helper = { if ( not(status) ) then return false, err end - local status, data = self.socket:receive_buf("\n") + local status, data = self.socket:receive_buf("\n", false) if( not(status) ) then return false, err end @@ -119,7 +119,7 @@ Helper = { local modules = {} while(true) do - status, data = self.socket:receive_buf("\n") + status, data = self.socket:receive_buf("\n", false) if (not(status)) then return false, data end @@ -152,13 +152,13 @@ Helper = { return false, data end - status, data = self.socket:receive_buf(match.numbytes(4)) + status, data = self.socket:receive_buf(match.numbytes(4), false) if ( not(status) ) then return false, data end local pos, len = bin.unpack("