From 1df98ce7567c86a9f1791d748f28588f8a927071 Mon Sep 17 00:00:00 2001 From: cy <1040641785@qq.com> Date: Sat, 18 Jul 2020 14:46:56 +0800 Subject: [PATCH] fix in version 3.7 if security-type is 1 the server does not send the SecurityResult message reference resources https://datatracker.ietf.org/doc/rfc6143/?include_text=1 A.2. Differences in the Version 3.7 Protocol After the security handshake, if the security-type is 1, for no authentication, the server does not send the SecurityResult message but proceeds directly to the initialization messages (Section 7.3). --- rdpy/protocol/rfb/rfb.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rdpy/protocol/rfb/rfb.py b/rdpy/protocol/rfb/rfb.py index b43cfa0..aed1812 100644 --- a/rdpy/protocol/rfb/rfb.py +++ b/rdpy/protocol/rfb/rfb.py @@ -303,7 +303,10 @@ def recvSecurityList(self, data): if self._securityLevel.value == SecurityType.VNC: self.expect(16, self.recvVNCChallenge) else: - self.expect(4, self.recvSecurityResult) + if self._securityLevel.value == SecurityType.NONE and self._version.value == ProtocolVersion.RFB003007: + self.sendClientInit() + else: + self.expect(4, self.recvSecurityResult) def recvVNCChallenge(self, data): """