示例#1
0
        private static void sendSynchronize()
        {
            RdpPacket packet = new RdpPacket();

            packet.WriteLittleEndian16((short)1);
            packet.WriteLittleEndian16((short)0x3ea);
            IsoLayer.sendDataPDU(packet, IsoLayer.PDUType2.PDUTYPE2_SYNCHRONIZE, Secure.RDPEncrypted() ? MCS.SEC_ENCRYPT : 0);
        }
示例#2
0
        private static void sendControl(int action)
        {
            RdpPacket packet = new RdpPacket();

            packet.WriteLittleEndian16((short)action);
            packet.WriteLittleEndian16((short)0);
            packet.WriteLittleEndian32(0);
            IsoLayer.sendDataPDU(packet, IsoLayer.PDUType2.PDUTYPE2_CONTROL, Secure.RDPEncrypted() ? MCS.SEC_ENCRYPT : 0);
        }
示例#3
0
        private static void sendFontList()
        {
            RdpPacket packet = new RdpPacket();

            packet.WriteLittleEndian16((short)0);
            packet.WriteLittleEndian16((short)0);
            packet.WriteLittleEndian16((short)3);
            packet.WriteLittleEndian16((short)50);
            IsoLayer.sendDataPDU(packet, IsoLayer.PDUType2.PDUTYPE2_FONTLIST, Secure.RDPEncrypted() ? MCS.SEC_ENCRYPT : 0);
        }
示例#4
0
        private static void sendPersistKeyList()
        {
            int num    = 0;
            int num2   = 0;
            int num3   = 0;
            int num4   = 0;
            int num5   = 0;
            int num6   = 0;
            int num7   = 0;
            int num8   = 0;
            int num9   = 0;
            int num10  = 0;
            int offset = 0;

            while ((((num6 < num) || (num7 < num2)) || ((num8 < num3) || (num9 < num4))) || (num10 < num5))
            {
                int       num12     = 0;
                int       num13     = 0;
                int       num14     = 0;
                int       num15     = 0;
                int       num16     = 0;
                bool      bMoreKeys = false;
                RdpPacket packet    = new RdpPacket();
                packet.WriteLittleEndian16((ushort)num12);
                packet.WriteLittleEndian16((ushort)num13);
                packet.WriteLittleEndian16((ushort)num14);
                packet.WriteLittleEndian16((ushort)num15);
                packet.WriteLittleEndian16((ushort)num16);
                packet.WriteLittleEndian16((ushort)num);
                packet.WriteLittleEndian16((ushort)num2);
                packet.WriteLittleEndian16((ushort)num3);
                packet.WriteLittleEndian16((ushort)num4);
                packet.WriteLittleEndian16((ushort)num5);
                byte num17 = 0;
                if (offset == 0)
                {
                    num17 = (byte)(num17 | 1);
                }
                if (!bMoreKeys)
                {
                    num17 = (byte)(num17 | 2);
                }
                packet.WriteByte(num17);
                packet.WriteByte(0);
                packet.WriteLittleEndian16((short)0);

                IsoLayer.sendDataPDU(packet, IsoLayer.PDUType2.PDUTYPE2_BITMAPCACHE_PERSISTENT_LIST, Secure.RDPEncrypted() ? MCS.SEC_ENCRYPT : 0);
                num6  += num12;
                num7  += num13;
                num8  += num14;
                num9  += num15;
                num10 += num16;
            }
        }
示例#5
0
        public static void Disconnect()
        {
            RdpPacket packet = new RdpPacket();

            packet.WriteLittleEndian16((short)1);
            packet.WriteLittleEndian16((short)0x3ea);
            IsoLayer.sendDataPDU(packet, IsoLayer.PDUType2.PDUTYPE2_SHUTDOWN_REQUEST, Secure.RDPEncrypted() ? SEC_ENCRYPT : 0);
            packet = new RdpPacket();
            packet.WriteByte((byte)(DPUM << 2));
            packet.WriteByte(3);
            IsoLayer.SendTPKT(packet);
        }