155 |
int len_password = 2 * strlen(password); |
int len_password = 2 * strlen(password); |
156 |
int len_program = 2 * strlen(program); |
int len_program = 2 * strlen(program); |
157 |
int len_directory = 2 * strlen(directory); |
int len_directory = 2 * strlen(directory); |
158 |
uint32 sec_flags = encryption ? (SEC_LOGON_INFO | SEC_ENCRYPT) |
uint32 sec_flags = encryption ? (SEC_LOGON_INFO | SEC_ENCRYPT) : SEC_LOGON_INFO; |
|
: SEC_LOGON_INFO; |
|
159 |
STREAM s; |
STREAM s; |
160 |
|
|
161 |
s = sec_init(sec_flags, 18 + len_domain + len_user + len_password |
s = sec_init(sec_flags, 18 + len_domain + len_user + len_password |
211 |
|
|
212 |
/* Send a single input event */ |
/* Send a single input event */ |
213 |
void |
void |
214 |
rdp_send_input(uint32 time, uint16 message_type, uint16 device_flags, |
rdp_send_input(uint32 time, uint16 message_type, uint16 device_flags, uint16 param1, uint16 param2) |
|
uint16 param1, uint16 param2) |
|
215 |
{ |
{ |
216 |
STREAM s; |
STREAM s; |
217 |
|
|
440 |
RDP_CAPLEN_GENERAL + RDP_CAPLEN_BITMAP + RDP_CAPLEN_ORDER + |
RDP_CAPLEN_GENERAL + RDP_CAPLEN_BITMAP + RDP_CAPLEN_ORDER + |
441 |
RDP_CAPLEN_BMPCACHE + RDP_CAPLEN_COLCACHE + |
RDP_CAPLEN_BMPCACHE + RDP_CAPLEN_COLCACHE + |
442 |
RDP_CAPLEN_ACTIVATE + RDP_CAPLEN_CONTROL + |
RDP_CAPLEN_ACTIVATE + RDP_CAPLEN_CONTROL + |
443 |
RDP_CAPLEN_POINTER + RDP_CAPLEN_SHARE + RDP_CAPLEN_UNKNOWN |
RDP_CAPLEN_POINTER + RDP_CAPLEN_SHARE + RDP_CAPLEN_UNKNOWN + 4 /* w2k fix, why? */ ; |
|
+ 4 /* w2k fix, why? */ ; |
|
444 |
|
|
445 |
s = rdp_init(14 + caplen + sizeof(RDP_SOURCE)); |
s = rdp_init(14 + caplen + sizeof(RDP_SOURCE)); |
446 |
|
|
523 |
in_uint16_le(s, datalen); |
in_uint16_le(s, datalen); |
524 |
in_uint8p(s, data, datalen); |
in_uint8p(s, data, datalen); |
525 |
in_uint8p(s, mask, masklen); |
in_uint8p(s, mask, masklen); |
526 |
cursor = ui_create_cursor(x, y, width, height, mask, |
cursor = ui_create_cursor(x, y, width, height, mask, data); |
|
data); |
|
527 |
ui_set_cursor(cursor); |
ui_set_cursor(cursor); |
528 |
cache_put_cursor(cache_idx, cursor); |
cache_put_cursor(cache_idx, cursor); |
529 |
break; |
break; |
574 |
bmpdata = xmalloc(width * height); |
bmpdata = xmalloc(width * height); |
575 |
for (y = 0; y < height; y++) |
for (y = 0; y < height; y++) |
576 |
{ |
{ |
577 |
in_uint8a(s, |
in_uint8a(s, &bmpdata[(height - y - 1) * width], width); |
|
&bmpdata[(height - y - 1) * width], |
|
|
width); |
|
578 |
} |
} |
579 |
ui_paint_bitmap(left, top, cx, cy, width, height, |
ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata); |
|
bmpdata); |
|
580 |
xfree(bmpdata); |
xfree(bmpdata); |
581 |
continue; |
continue; |
582 |
} |
} |
589 |
bmpdata = xmalloc(width * height); |
bmpdata = xmalloc(width * height); |
590 |
if (bitmap_decompress(bmpdata, width, height, data, size)) |
if (bitmap_decompress(bmpdata, width, height, data, size)) |
591 |
{ |
{ |
592 |
ui_paint_bitmap(left, top, cx, cy, width, height, |
ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata); |
|
bmpdata); |
|
593 |
} |
} |
594 |
|
|
595 |
xfree(bmpdata); |
xfree(bmpdata); |
714 |
if (!sec_connect(server)) |
if (!sec_connect(server)) |
715 |
return False; |
return False; |
716 |
|
|
717 |
rdp_send_logon_info(flags, domain, username, password, |
rdp_send_logon_info(flags, domain, username, password, command, directory); |
|
command, directory); |
|
718 |
return True; |
return True; |
719 |
} |
} |
720 |
|
|