Exemplo n.º 1
0
void rpc_ntlm_http_init_channel(rdpRpc* rpc, rdpNtlmHttp* ntlm_http, TSG_CHANNEL channel)
{
	if (channel == TSG_CHANNEL_IN)
		http_context_set_method(ntlm_http->context, "RPC_IN_DATA");
	else if (channel == TSG_CHANNEL_OUT)
		http_context_set_method(ntlm_http->context, "RPC_OUT_DATA");

	http_context_set_uri(ntlm_http->context, "/rpc/rpcproxy.dll?localhost:3388");
	http_context_set_accept(ntlm_http->context, "application/rpc");
	http_context_set_cache_control(ntlm_http->context, "no-cache");
	http_context_set_connection(ntlm_http->context, "Keep-Alive");
	http_context_set_user_agent(ntlm_http->context, "MSRPC");
	http_context_set_host(ntlm_http->context, rpc->settings->GatewayHostname);

	if (channel == TSG_CHANNEL_IN)
	{
		http_context_set_pragma(ntlm_http->context,
			"ResourceTypeUuid=44e265dd-7daf-42cd-8560-3cdb6e7a2729");
	}
	else if (channel == TSG_CHANNEL_OUT)
	{
		http_context_set_pragma(ntlm_http->context,
				"ResourceTypeUuid=44e265dd-7daf-42cd-8560-3cdb6e7a2729" ", "
				"SessionId=fbd9c34f-397d-471d-a109-1b08cc554624");
	}
}
Exemplo n.º 2
0
static int rpc_out_channel_rpch_init(rdpRpc* rpc, RpcOutChannel* outChannel)
{
	HttpContext* http;
	outChannel->ntlm = ntlm_new();

	if (!outChannel->ntlm)
		return -1;

	outChannel->http = http_context_new();

	if (!outChannel->http)
		return -1;

	http = outChannel->http;
	http_context_set_method(http, "RPC_OUT_DATA");
	http_context_set_uri(http, "/rpc/rpcproxy.dll?localhost:3388");
	http_context_set_accept(http, "application/rpc");
	http_context_set_cache_control(http, "no-cache");
	http_context_set_connection(http, "Keep-Alive");
	http_context_set_user_agent(http, "MSRPC");
	http_context_set_host(http, rpc->settings->GatewayHostname);
	http_context_set_pragma(http,
	                        "ResourceTypeUuid=44e265dd-7daf-42cd-8560-3cdb6e7a2729, "
	                        "SessionId=fbd9c34f-397d-471d-a109-1b08cc554624");
	return 1;
}
Exemplo n.º 3
0
static int rpc_in_channel_rpch_init(rdpRpc* rpc, RpcInChannel* inChannel)
{
	HttpContext* http;
	inChannel->ntlm = ntlm_new();

	if (!inChannel->ntlm)
		return -1;

	inChannel->http = http_context_new();

	if (!inChannel->http)
		return -1;

	http = inChannel->http;
	http_context_set_method(http, "RPC_IN_DATA");
	http_context_set_uri(http, "/rpc/rpcproxy.dll?localhost:3388");
	http_context_set_accept(http, "application/rpc");
	http_context_set_cache_control(http, "no-cache");
	http_context_set_connection(http, "Keep-Alive");
	http_context_set_user_agent(http, "MSRPC");
	http_context_set_host(http, rpc->settings->GatewayHostname);
	http_context_set_pragma(http, "ResourceTypeUuid=44e265dd-7daf-42cd-8560-3cdb6e7a2729");
	return 1;
}