]> git.sesse.net Git - rdpsrv/commitdiff
Change RDP version to v1, to get simpler login packets. Notice login packets.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 4 Feb 2005 01:19:57 +0000 (01:19 +0000)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 4 Feb 2005 01:19:57 +0000 (01:19 +0000)
mcs.c
rdp.c
secure.c

diff --git a/mcs.c b/mcs.c
index e3690516e9fb75ec8a4cb244c9f25d8a5d7a97ac..ff2dfdb0cfe6ed1a13b79d481b281eda5d77f862 100644 (file)
--- a/mcs.c
+++ b/mcs.c
@@ -172,10 +172,10 @@ mcs_send_connect_response()
        out_uint8s(s, 21);   // ick
        out_uint8(s, 0);
 
        out_uint8s(s, 21);   // ick
        out_uint8(s, 0);
 
-       // server info -- we claim to support RDP5
+       // server info -- we claim to support RDP4
        out_uint16_le(s, SEC_TAG_SRV_INFO);
        out_uint16_le(s, 6);  // length
        out_uint16_le(s, SEC_TAG_SRV_INFO);
        out_uint16_le(s, 6);  // length
-       out_uint16_le(s, 5);
+       out_uint16_le(s, 1);
 
        // aiee, no crypto info yet! :-)
        
 
        // aiee, no crypto info yet! :-)
        
diff --git a/rdp.c b/rdp.c
index 1663dfdc7bbcf85f52c01c01a58c5fde6a29a5c9..11ed6f914d859cfb29c68a716a985375bee64683 100644 (file)
--- a/rdp.c
+++ b/rdp.c
@@ -71,7 +71,7 @@ rdp_recv(uint8 * type)
        *type = pdu_type & 0xf;
 
 #if WITH_DEBUG
        *type = pdu_type & 0xf;
 
 #if WITH_DEBUG
-       DEBUG(("RDP packet #%d, (type %x)\n", ++g_packetno, *type));
+       DEBUG(("RDP packet #%d, (type %x, length %u)\n", ++g_packetno, *type, length));
        hexdump(g_next_packet, length);
 #endif /*  */
 
        hexdump(g_next_packet, length);
 #endif /*  */
 
index fd96936e09bebc0cff5a93cc52bb4dd9f38c2965..9147cbc21ba3b8903adc967866da4fa977af69e9 100644 (file)
--- a/secure.c
+++ b/secure.c
@@ -344,7 +344,7 @@ sec_send_to_channel(STREAM s, uint32 flags, uint16 channel)
        int datalen;
 
        s_pop_layer(s, sec_hdr);
        int datalen;
 
        s_pop_layer(s, sec_hdr);
-       //if (!g_licence_issued || (flags & SEC_ENCRYPT))
+//     if (!g_licence_issued || (flags & SEC_ENCRYPT))
                out_uint32_le(s, flags);
 
        if (flags & SEC_ENCRYPT)
                out_uint32_le(s, flags);
 
        if (flags & SEC_ENCRYPT)
@@ -721,23 +721,33 @@ sec_recv(void)
 
        while ((s = mcs_recv(&channel)) != NULL)
        {
 
        while ((s = mcs_recv(&channel)) != NULL)
        {
-               if (/*g_encryption || !g_licence_issued*/ 0)
+               if (/*g_encryption || !g_licence_issued*/ 1)
                {
                        in_uint32_le(s, sec_flags);
                {
                        in_uint32_le(s, sec_flags);
-
+                       printf("sec_flags=%x\n", sec_flags);
+                       
                        if (sec_flags & SEC_ENCRYPT)
                        {
                        if (sec_flags & SEC_ENCRYPT)
                        {
+                               printf("encrypt\n");
                                in_uint8s(s, 8);        /* signature */
                                sec_decrypt(s->p, s->end - s->p);
                        }
 
                        if (sec_flags & SEC_LICENCE_NEG)
                        {
                                in_uint8s(s, 8);        /* signature */
                                sec_decrypt(s->p, s->end - s->p);
                        }
 
                        if (sec_flags & SEC_LICENCE_NEG)
                        {
-                               licence_process(s);
+                               printf("SEC_LICENSE_NEG unknown\n");
+                               //licence_process(s);
                                continue;
                        }
                                continue;
                        }
+
+                       if (sec_flags & SEC_LOGON_INFO) 
+                       {
+                               printf("Received logon packet!\n");
+
+                       }
                }
 
                }
 
+               printf("Received MCS data on ch %u\n", channel);
                if (channel != MCS_GLOBAL_CHANNEL)
                {
                        channel_process(s, channel);
                if (channel != MCS_GLOBAL_CHANNEL)
                {
                        channel_process(s, channel);