1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-25 08:59:01 +00:00

In realvnc-auth-bypass, check the status in socket receive operations

instead of checking for result == "TIMEOUT".
This commit is contained in:
david
2010-11-18 22:54:16 +00:00
parent f91c93dfee
commit c0b8514b4d

View File

@@ -26,7 +26,7 @@ action = function(host, port)
status, result = socket:receive_lines(1)
if (result == "TIMEOUT") then
if (not status) then
socket:close()
return
end
@@ -34,29 +34,19 @@ action = function(host, port)
socket:send("RFB 003.008\n")
status, result = socket:receive_bytes(2)
if (result == "TIMEOUT") then
if (not status or result ~= "\001\002") then
socket:close()
return
end
if (result ~= "\001\002") then
socket:close()
return
end
socket:send("\001")
status, result = socket:receive_bytes(4)
if (result == "TIMEOUT") then
if (not status or result ~= "\000\000\000\000") then
socket:close()
return
end
if (result ~= "\000\000\000\000") then
socket:close()
return
end
socket:close()
return "Vulnerable"