From a870f3cbb9c6e3813c01818826f1ca366b1e8fb8 Mon Sep 17 00:00:00 2001 From: wentianle Date: Fri, 10 Aug 2018 01:42:52 +0800 Subject: [PATCH 1/2] fix vncproxy on windows 2008 rfb proto parse bug Uint8 value range out of bounds causes problems in the parsing protocol --- encodings/enc-tight.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encodings/enc-tight.go b/encodings/enc-tight.go index 3cdf925..c1cb881 100644 --- a/encodings/enc-tight.go +++ b/encodings/enc-tight.go @@ -142,7 +142,7 @@ func handleTightFilters(subencoding uint8, pixelFmt *common.PixelFormat, rect *c return } - paletteSize := colorCount + 1 // add one more + paletteSize := int(colorCount) + 1 // add one more logger.Debugf("handleTightFilters: ----PALETTE_FILTER: paletteSize=%d bytesPixel=%d\n", paletteSize, bytesPixel) //complete palette _, err = r.ReadBytes(int(paletteSize) * bytesPixel) From 6e1a343b5f47c85a048c77d6170fd9eb203104e1 Mon Sep 17 00:00:00 2001 From: Amit Bezalel Date: Fri, 17 Aug 2018 09:19:47 +0300 Subject: [PATCH 2/2] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5af5733..842488d 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ An RFB proxy, written in go that can save and replay FBS files - Tested on tight encoding with: - Tightvnc (client + java client + server) - FBS player (tightVnc Java player) - - NoVnc(web client) + - NoVnc(web client) => use -wsPort to open a websocket - ChickenOfTheVnc(client) - VineVnc(server) - TigerVnc(client) @@ -25,7 +25,7 @@ An RFB proxy, written in go that can save and replay FBS files ## Usage: recorder -recDir=./recording.rbs -targHost=192.168.0.100 -targPort=5903 -targPass=@@@@@ player -fbsFile=./myrec.fbs -tcpPort=5905 - proxy -recDir=./recordings/ -targHost=192.168.0.100 -targPort=5903 -targPass=@@@@@ -tcpPort=5903 -vncPass=@!@!@! + proxy -recDir=./recordings/ -targHost=192.168.0.100 -targPort=5903 -targPass=@@@@@ -tcpPort=5903 -wsPort=5905 -vncPass=@!@!@! ### Code usage examples * player/main.go (fbs recording vnc client)