1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-14 18:39:03 +00:00

Added missing second parameter for receive_buf which caused errors with new

Lua version.
This commit is contained in:
patrik
2012-05-27 19:20:34 +00:00
parent cc1ba1ff3d
commit 656f03676e
11 changed files with 24 additions and 24 deletions

View File

@@ -58,7 +58,7 @@ action = function(host, port)
local srvinfo
repeat
local status, data = socket:receive_buf("\r\n")
local status, data = socket:receive_buf("\r\n", false)
if ( not(status) ) then
return fail("Failed to read response from server")
elseif ( data:match("^5") ) then

View File

@@ -95,7 +95,7 @@ earlier. The vulnerability is the consequence of weak service configuration.
end
end
local status, data = socket:receive_buf("DOTO00000000")
local status, data = socket:receive_buf("DOTO00000000", false)
if ( status ) then
local output = data:match("SOUT%w%w%w%w%w%w%w%w(.*)")

View File

@@ -159,11 +159,11 @@ action = function(host, port)
end
-- If there's an error we get a response back, and only then
local status, data = socket:receive_buf("\n")
local status, data = socket:receive_buf("\n", false)
if( status and data ~= "<error>" ) then
return fail("An unknown error occured, aborting ...")
elseif ( status ) then
status, data = socket:receive_buf("\n")
status, data = socket:receive_buf("\n", false)
if ( status ) then
return fail(data)
else
@@ -176,7 +176,7 @@ action = function(host, port)
end
local tags = {}
local status, tag = socket:receive_buf("\n")
local status, tag = socket:receive_buf("\n", false)
while(true) do
if ( not(status) ) then
break
@@ -194,7 +194,7 @@ action = function(host, port)
while(true) do
local data
status, data = socket:receive_buf("\n")
status, data = socket:receive_buf("\n", false)
if ( not(status) ) then
break
end

View File

@@ -77,7 +77,7 @@ action = function(host, port)
repeat
local entry
status, line = socket:receive_buf("\r\n")
status, line = socket:receive_buf("\r\n", false)
if ( status ) then
status, entry = gps.NMEA.parse(line)
if ( status ) then

View File

@@ -97,7 +97,7 @@ action = function(host, port)
return fail("Failed to send request to server")
end
local status, resp = socket:receive_buf("\r\n\r\n")
local status, resp = socket:receive_buf("\r\n\r\n", false)
if ( not(status) ) then
return fail("Failed to receive response from server")
end

View File

@@ -73,7 +73,7 @@ end
local function recvResponse(socket)
local kvs = {}
repeat
local status, response = socket:receive_buf("\r\n")
local status, response = socket:receive_buf("\r\n", false)
if ( not(status) ) then
return false, "Failed to receive response from server"
end

View File

@@ -45,7 +45,7 @@ Driver = {
end,
login = function(self, username, password)
local status, line = self.socket:receive_buf("\r\n")
local status, line = self.socket:receive_buf("\r\n", false)
if ( line:match("^220 VMware Authentication Daemon.*SSL Required") ) then
self.socket:reconnect_ssl()
end
@@ -57,7 +57,7 @@ Driver = {
return false, err
end
local status, response = self.socket:receive_buf("\r\n")
local status, response = self.socket:receive_buf("\r\n", false)
if ( not(status) or not(response:match("^331") ) ) then
local err = brute.Error:new( "Received unexpected response from server" )
err:setRetry( true )
@@ -70,7 +70,7 @@ Driver = {
err:setRetry( true )
return false, err
end
status, response = self.socket:receive_buf("\r\n")
status, response = self.socket:receive_buf("\r\n", false)
if ( response:match("^230") ) then
return true, brute.Account:new(username, password, creds.State.VALID)
@@ -93,7 +93,7 @@ local function checkAuthd(host, port)
return false, "Failed to connect to server"
end
local status, line = socket:receive_buf("\r\n")
local status, line = socket:receive_buf("\r\n", false)
socket:close()
if ( not(status) ) then
return false, "Failed to receive response from server"