From 656f03676e8bb73012bc507a942c2b9ddfc9ed8f Mon Sep 17 00:00:00 2001 From: patrik Date: Sun, 27 May 2012 19:20:34 +0000 Subject: [PATCH] Added missing second parameter for receive_buf which caused errors with new Lua version. --- nselib/redis.lua | 8 ++++---- nselib/rsync.lua | 8 ++++---- nselib/stun.lua | 4 ++-- nselib/xmpp.lua | 2 +- scripts/dict-info.nse | 2 +- scripts/distcc-cve2004-2687.nse | 2 +- scripts/gkrellm-info.nse | 8 ++++---- scripts/gpsd-info.nse | 2 +- scripts/icap-info.nse | 2 +- scripts/memcached-info.nse | 2 +- scripts/vmauthd-brute.nse | 8 ++++---- 11 files changed, 24 insertions(+), 24 deletions(-) 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("