30 |
extern BOOL g_use_rdp5; |
extern BOOL g_use_rdp5; |
31 |
extern uint16 g_server_rdp_version; |
extern uint16 g_server_rdp_version; |
32 |
extern int g_server_bpp; |
extern int g_server_bpp; |
|
extern time_t timezone; |
|
33 |
|
|
34 |
uint8 *g_next_packet; |
uint8 *g_next_packet; |
35 |
uint32 g_rdp_shareid; |
uint32 g_rdp_shareid; |
132 |
s->p += len; |
s->p += len; |
133 |
} |
} |
134 |
|
|
135 |
|
/* Input a string in Unicode |
136 |
|
* |
137 |
|
* Returns str_len of string |
138 |
|
*/ |
139 |
|
int |
140 |
|
rdp_in_unistr(STREAM s, char *string, int uni_len) |
141 |
|
{ |
142 |
|
int i = 0; |
143 |
|
|
144 |
|
while (i < uni_len / 2) |
145 |
|
{ |
146 |
|
in_uint8a(s, &string[i++], 1); |
147 |
|
in_uint8s(s, 1); |
148 |
|
} |
149 |
|
|
150 |
|
return i - 1; |
151 |
|
} |
152 |
|
|
153 |
|
|
154 |
/* Parse a logon info packet */ |
/* Parse a logon info packet */ |
155 |
static void |
static void |
156 |
rdp_send_logon_info(uint32 flags, char *domain, char *user, |
rdp_send_logon_info(uint32 flags, char *domain, char *user, |
166 |
int packetlen = 0; |
int packetlen = 0; |
167 |
uint32 sec_flags = g_encryption ? (SEC_LOGON_INFO | SEC_ENCRYPT) : SEC_LOGON_INFO; |
uint32 sec_flags = g_encryption ? (SEC_LOGON_INFO | SEC_ENCRYPT) : SEC_LOGON_INFO; |
168 |
STREAM s; |
STREAM s; |
169 |
tzset(); |
time_t t = time(NULL); |
170 |
|
time_t tzone; |
171 |
|
|
172 |
if (!g_use_rdp5 || 1 == g_server_rdp_version) |
if (!g_use_rdp5 || 1 == g_server_rdp_version) |
173 |
{ |
{ |
269 |
rdp_out_unistr(s, "127.0.0.1", len_ip); |
rdp_out_unistr(s, "127.0.0.1", len_ip); |
270 |
out_uint16_le(s, len_dll + 2); |
out_uint16_le(s, len_dll + 2); |
271 |
rdp_out_unistr(s, "C:\\WINNT\\System32\\mstscax.dll", len_dll); |
rdp_out_unistr(s, "C:\\WINNT\\System32\\mstscax.dll", len_dll); |
272 |
out_uint16_le(s, timezone/60); |
|
273 |
out_uint16_le(s, 0x0000); |
tzone = (mktime(gmtime(&t)) - mktime(localtime(&t))) / 60; |
274 |
|
out_uint32_le(s, tzone); |
275 |
|
|
276 |
rdp_out_unistr(s, "GTB, normaltid", 2 * strlen("GTB, normaltid")); |
rdp_out_unistr(s, "GTB, normaltid", 2 * strlen("GTB, normaltid")); |
277 |
out_uint8s(s, 62 - 2 * strlen("GTB, normaltid")); |
out_uint8s(s, 62 - 2 * strlen("GTB, normaltid")); |
278 |
|
|