From 56d71fe6df179bb585c01a95eca73ccf430617ab Mon Sep 17 00:00:00 2001 From: dmiller Date: Sat, 2 Apr 2016 15:54:32 +0000 Subject: [PATCH] Fix endianness bug making RFB 3.3 not detect auth type --- nselib/vnc.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nselib/vnc.lua b/nselib/vnc.lua index e8226a9be..d6bd1f290 100644 --- a/nselib/vnc.lua +++ b/nselib/vnc.lua @@ -222,7 +222,7 @@ VNC = { return false, "VNC:handshake failed to receive security data" end - vncsec.types[1] = select(2, bin.unpack("I", tmp) ) + vncsec.types[1] = select(2, bin.unpack(">I", tmp) ) self.vncsec = vncsec -- do we have an invalid security type, if so we need to handle an @@ -355,7 +355,7 @@ VNC = { return false, "Failed to retrieve authentication status from server" end - if ( select(2, bin.unpack("I", result) ) ~= 0 ) then + if ( select(2, bin.unpack(">I", result) ) ~= 0 ) then return false, "Authentication failed" end return true