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