out_uint8(s, datalen & 0xff);
if (encryption) {
- datalen -= 8;
+ datalen -= 11;
sec_sign(s->p, 8, sec_sign_key, rc4_key_len, s->p + 8, datalen);
sec_encrypt(s->p + 8, datalen);
switch (type)
{
+ case 16 ... 31:
+ // unknown, but looks like some sort of
+ // "count" of how many packets there are
+ printf("Unimplemented RDP5 opcode (count?) %d, skipping\n", type);
+ break;
case 32: { // mouse
listen_on_vnc = 1;
uint16 device_flags, x, y;
break;
}
default:
- printf("Unimplemented RDP5 opcode %d (len=%u)\n", type, length);
+ printf("Unimplemented RDP5 opcode %d\n", type);
return;
}
}