mirror of
https://github.com/nmap/nmap.git
synced 2025-12-17 05:09:00 +00:00
Fix logic errors in comm.opencon when data is not supplied.
It looks like this code never worked, because the debug message was using a nonexistent function (nsedebug.print_debug).
This commit is contained in:
@@ -223,12 +223,12 @@ local function opencon(host, port, protocol, data, opts)
|
|||||||
|
|
||||||
local response, early_resp;
|
local response, early_resp;
|
||||||
if opts and opts.recv_before then status, early_resp = read(sd, opts) end
|
if opts and opts.recv_before then status, early_resp = read(sd, opts) end
|
||||||
if #data > 0 then
|
if data and #data > 0 then
|
||||||
sd:send(data)
|
sd:send(data)
|
||||||
status, response = sd:receive()
|
status, response = sd:receive()
|
||||||
else
|
else
|
||||||
if not opts and opts.recv_before then
|
if not (opts and opts.recv_before) then
|
||||||
nsedebug.print_debug("Using comm.tryssl without first data payload and recv_first." ..
|
stdnse.print_debug("Using comm.tryssl without first data payload and recv_first." ..
|
||||||
"\nImpossible to test the connection for the correct protocol!")
|
"\nImpossible to test the connection for the correct protocol!")
|
||||||
end
|
end
|
||||||
response = early_resp
|
response = early_resp
|
||||||
|
|||||||
Reference in New Issue
Block a user