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, 5);
+ out_uint16_le(s, 1);
// aiee, no crypto info yet! :-)
*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 /* */
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)
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);
-
+ printf("sec_flags=%x\n", sec_flags);
+
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)
{
- licence_process(s);
+ printf("SEC_LICENSE_NEG unknown\n");
+ //licence_process(s);
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);