diff --git a/bin/recordings/recording_1565196968/client.rbs b/bin/recordings/recording_1565196968/client.rbs new file mode 100644 index 0000000..280d872 Binary files /dev/null and b/bin/recordings/recording_1565196968/client.rbs differ diff --git a/bin/recordings/recording_1565196968/server.rbs b/bin/recordings/recording_1565196968/server.rbs new file mode 100644 index 0000000..223edd9 Binary files /dev/null and b/bin/recordings/recording_1565196968/server.rbs differ diff --git a/bin/recordings/recording_1565197944/client.rbs b/bin/recordings/recording_1565197944/client.rbs new file mode 100644 index 0000000..c4b1d9e Binary files /dev/null and b/bin/recordings/recording_1565197944/client.rbs differ diff --git a/bin/recordings/recording_1565197944/server.rbs b/bin/recordings/recording_1565197944/server.rbs new file mode 100644 index 0000000..e69de29 diff --git a/bin/recordings/recording_1565198023/client.rbs b/bin/recordings/recording_1565198023/client.rbs new file mode 100644 index 0000000..9595b39 Binary files /dev/null and b/bin/recordings/recording_1565198023/client.rbs differ diff --git a/bin/recordings/recording_1565198225/client.rbs b/bin/recordings/recording_1565198225/client.rbs new file mode 100644 index 0000000..2449575 Binary files /dev/null and b/bin/recordings/recording_1565198225/client.rbs differ diff --git a/bin/recordings/recording_1565198561/client.rbs b/bin/recordings/recording_1565198561/client.rbs new file mode 100644 index 0000000..d87179e Binary files /dev/null and b/bin/recordings/recording_1565198561/client.rbs differ diff --git a/bin/recordings/recording_1565198561/server.rbs b/bin/recordings/recording_1565198561/server.rbs new file mode 100644 index 0000000..e69de29 diff --git a/bin/recordings/recording_1565199074/client.rbs b/bin/recordings/recording_1565199074/client.rbs new file mode 100644 index 0000000..bc61803 Binary files /dev/null and b/bin/recordings/recording_1565199074/client.rbs differ diff --git a/bin/recordings/recording_1565199074/server.rbs b/bin/recordings/recording_1565199074/server.rbs new file mode 100644 index 0000000..e69de29 diff --git a/bin/recordings/recording_1565199179/client.rbs b/bin/recordings/recording_1565199179/client.rbs new file mode 100644 index 0000000..92ab278 Binary files /dev/null and b/bin/recordings/recording_1565199179/client.rbs differ diff --git a/bin/recordings/recording_1565199179/server.rbs b/bin/recordings/recording_1565199179/server.rbs new file mode 100644 index 0000000..e69de29 diff --git a/bin/vnc_recorder b/bin/vnc_recorder index 43ee114..e0c6c21 100755 Binary files a/bin/vnc_recorder and b/bin/vnc_recorder differ diff --git a/vnc_rec/client-recorder.go b/vnc_rec/client-recorder.go index 09cae4f..913d7c3 100644 --- a/vnc_rec/client-recorder.go +++ b/vnc_rec/client-recorder.go @@ -134,7 +134,6 @@ func (r *ClientRecorder) HandleRfbSegment(data *common.RfbSegment) error { r.writeToDisk() case common.SegmentRectSeparator: logger.Debugf("ClientRecorder.HandleRfbSegment: not writing rect") - //r.writeToDisk() case common.SegmentBytes: logger.Debug("ClientRecorder.HandleRfbSegment: not writing bytes, len:", len(data.Bytes)) if r.buffer.Len()+len(data.Bytes) > r.maxWriteSize-4 { @@ -146,20 +145,20 @@ func (r *ClientRecorder) HandleRfbSegment(data *common.RfbSegment) error { r.serverInitMessage = data.Message.(*common.ServerInit) case common.SegmentFullyParsedClientMessage: clientMsg := data.Message.(common.ClientMessage) - switch clientMsg.Type() { case common.SetPixelFormatMsgType: clientMsg := data.Message.(*server.MsgSetPixelFormat) logger.Debugf("ClientRecorder.HandleRfbSegment: client message %v", *clientMsg) r.serverInitMessage.PixelFormat = clientMsg.PF case common.KeyEventMsgType: - clientMsg := data.Message.(*server.MsgKeyEvent) - logger.Debug("Recorder.HandleRfbSegment: writing bytes for KeyEventMsgType, len:", *clientMsg) - clientMsg.Write(r.writer) + clientMsg := data.Message.(common.ClientMessage) + logger.Debug("Recorder.HandleRfbSegment: writing bytes for KeyEventMsgType, len:", clientMsg) + binary.Write(r.writer, binary.BigEndian, clientMsg) + case common.PointerEventMsgType: - clientMsg := data.Message.(*server.MsgPointerEvent) - logger.Debug("Recorder.HandleRfbSegment: writing bytes for PointerEventMsgType, len:", *clientMsg) - clientMsg.Write(r.writer) + clientMsg := data.Message.(common.ClientMessage) + logger.Debug("Recorder.HandleRfbSegment: writing bytes for PointerEventMsgType, len:", clientMsg) + binary.Write(r.writer, binary.BigEndian, clientMsg) default: //return errors.New("unknown client message type:" + string(data.UpcomingObjectType)) } diff --git a/vnc_rec/proxy.go b/vnc_rec/proxy.go index 3e58834..112b59f 100644 --- a/vnc_rec/proxy.go +++ b/vnc_rec/proxy.go @@ -132,7 +132,6 @@ func (vp *VncProxy) newServerConnHandler(cfg *server.ServerConfig, sconn *server return err } if session.Type == SessionTypeRecordingProxy { - cconn.Listeners.AddListener(rec_s) cconn.Listeners.AddListener(rec_c) }