Пример #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="rdpedycClient"></param>
 public RdpeusbClient(RdpedycClient rdpedycClient)
 {
     this.rdpedycClient         = rdpedycClient;
     this.rdpeusbChannelDicbyId = new Dictionary <uint, DynamicVirtualChannel>();
     this.receivedDvcData       = new Dictionary <uint, QueueManager>();
     this.pduParser             = new RdpeusbServerPduParser();
 }
        private void CheckSupportedProtocols()
        {
            // Notify the UI for detecting protocol supported finished
            DetectorUtil.WriteLog("Check specified protocols support...");
            bool serverSupportUDPFECR = false;
            bool serverSupportUDPFECL = false;

            if (connectResponsePdu.mcsCrsp.gccPdu.serverMultitransportChannelData != null)
            {
                if (connectResponsePdu.mcsCrsp.gccPdu.serverMultitransportChannelData.flags.HasFlag(MULTITRANSPORT_TYPE_FLAGS.TRANSPORTTYPE_UDPFECR))
                {
                    serverSupportUDPFECR = true;
                }
                if (connectResponsePdu.mcsCrsp.gccPdu.serverMultitransportChannelData.flags.HasFlag(MULTITRANSPORT_TYPE_FLAGS.TRANSPORTTYPE_UDPFECL))
                {
                    serverSupportUDPFECL = true;
                }
            }
            detectInfo.IsSupportRDPEMT = serverSupportUDPFECR || serverSupportUDPFECL;

            if (detectInfo.IsSupportRDPEMT)
            {
                DetectorUtil.WriteLog("Detect RDPEMT supported");
            }
            else
            {
                DetectorUtil.WriteLog("Detect RDPEMT unsupported");
            }

            rdpedycClient = new RdpedycClient(rdpbcgrClient, rdpbcgrClient.Context, false);

            try
            {
                DynamicVirtualChannel channel = rdpedycClient.ExpectChannel(timeout, DYVNAME_RDPEDYC, DynamicVC_TransportType.RDP_TCP);
                if (channel != null)
                {
                    detectInfo.IsSupportRDPEDYC = true;
                }
                rdpedycClient.CloseChannel((ushort)channel.ChannelId);
            }
            catch
            {
                detectInfo.IsSupportRDPEDYC = false;
            }

            if (detectInfo.IsSupportRDPEDYC)
            {
                DetectorUtil.WriteLog("Detect RDPEDYC supported");
            }
            else
            {
                DetectorUtil.WriteLog("Detect RDPEDYC unsupported");
            }

            DetectorUtil.WriteLog("Passed", false, LogStyle.StepPassed);
        }
Пример #3
0
        /// <summary>
        /// Establish the RDPBCGR connection with RDP server
        /// If the SVCNames is not null, then a RDPEDYC static channel is created.
        /// </summary>
        /// <param name="encryptProtocol">Encryption protocol, RDP, TLS, Credssp </param>
        /// <param name="requestedProtocols"></param>
        /// <param name="SVCNames">Static virtual virtual name, DRDYNVC for EDYC channel name</param>
        /// <param name="highestCompressionTypeSupported">whether compressed supported </param>
        /// <param name="isReconnect">whether reconnect supported </param>
        /// <param name="autoLogon">whether autologon supported </param>
        /// <param name="supportEGFX">whether EGFX supported </param>
        /// <param name="supportAutoDetect">whether auto detect supported </param>
        /// <param name="supportHeartbeatPDU">whether HeartbeatPDU supported </param>
        /// <param name="supportMultitransportReliable">whether MultitransportReliable supported </param>
        /// <param name="supportMultitransportLossy">whether MultitransportLossy supported </param>
        /// <param name="supportAutoReconnect">whether AutoReconnect supported </param>
        /// <param name="supportFastPathInput">whether FastPathInput supported </param>
        /// <param name="supportFastPathOutput">whether FastPathOutput supported </param>
        /// <param name="supportSurfaceCommands">whether SurfaceCommands supported </param>
        /// <param name="supportSVCCompression">whether SVCCompression supported </param>
        /// <param name="supportRemoteFXCodec">whether RemoteFXCodec supported </param>
        public void ConnectToServer(EncryptedProtocol encryptProtocol,
                                    requestedProtocols_Values requestedProtocols,
                                    string[] SVCNames,
                                    CompressionType highestCompressionTypeSupported = CompressionType.PACKET_COMPR_TYPE_RDP61,
                                    bool isReconnect                   = false,
                                    bool autoLogon                     = false,
                                    bool supportEGFX                   = false,
                                    bool supportAutoDetect             = false,
                                    bool supportHeartbeatPDU           = false,
                                    bool supportMultitransportReliable = false,
                                    bool supportMultitransportLossy    = false,
                                    bool supportAutoReconnect          = false,
                                    bool supportFastPathInput          = false,
                                    bool supportFastPathOutput         = false,
                                    bool supportSurfaceCommands        = false,
                                    bool supportSVCCompression         = false,
                                    bool supportRemoteFXCodec          = false
                                    )
        {
            this.bcgrAdapter.ConnectToServer(encryptProtocol);
            this.bcgrAdapter.EstablishRDPConnection(requestedProtocols,
                                                    SVCNames,
                                                    highestCompressionTypeSupported,
                                                    isReconnect,
                                                    autoLogon,
                                                    supportEGFX,
                                                    supportAutoDetect,
                                                    supportHeartbeatPDU,
                                                    supportMultitransportReliable,
                                                    supportMultitransportLossy,
                                                    supportAutoReconnect,
                                                    supportFastPathInput,
                                                    supportFastPathOutput,
                                                    supportSurfaceCommands,
                                                    supportSVCCompression,
                                                    supportRemoteFXCodec
                                                    );

            rdpedycClientStack = new RdpedycClient(bcgrAdapter.rdpbcgrClientStack.Context, false);

            rdpedycClientStack.UnhandledExceptionReceived += (ex) =>
            {
                Site.Log.Add(LogEntryKind.Debug, $"Unhandled exception from RdpedycClient: {ex}");
            };
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="rdpedycClient"></param>
 public RdpeiClient(RdpedycClient rdpedycClient)
 {
     this.rdpedycClient = rdpedycClient;
     receivedList       = new List <RDPINPUT_PDU>();
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="rdpedycClient"></param>
 public RdpegfxClient(RdpedycClient rdpedycClient)
 {
     this.rdpedycClient = rdpedycClient;
     receivedList       = new List <RdpegfxPdu>();
 }
Пример #6
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="rdpedycClient"></param>
 public RdpegtClient(RdpedycClient rdpedycClient)
 {
     this.rdpedycClient = rdpedycClient;
     receivedList       = new List <MAPPED_GEOMETRY_PACKET>();
 }