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:
@@ -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
|
||||
|
||||
@@ -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(.*)")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user