亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? licence.c

?? LInux 下的遠程桌面工具 Rdesktop
?? C
字號:
/* -*- c-basic-offset: 8 -*-   rdesktop: A Remote Desktop Protocol client.   RDP licensing negotiation   Copyright (C) Matthew Chapman 1999-2007   This program is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 2 of the License, or   (at your option) any later version.   This program is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   GNU General Public License for more details.   You should have received a copy of the GNU General Public License   along with this program; if not, write to the Free Software   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.*/#include "rdesktop.h"#include "ssl.h"extern char g_username[64];extern char g_hostname[16];static uint8 g_licence_key[16];static uint8 g_licence_sign_key[16];RD_BOOL g_licence_issued = False;/* Generate a session key and RC4 keys, given client and server randoms */static voidlicence_generate_keys(uint8 * client_random, uint8 * server_random, uint8 * pre_master_secret){	uint8 master_secret[48];	uint8 key_block[48];	/* Generate master secret and then key material */	sec_hash_48(master_secret, pre_master_secret, client_random, server_random, 'A');	sec_hash_48(key_block, master_secret, server_random, client_random, 'A');	/* Store first 16 bytes of session key as MAC secret */	memcpy(g_licence_sign_key, key_block, 16);	/* Generate RC4 key from next 16 bytes */	sec_hash_16(g_licence_key, &key_block[16], client_random, server_random);}static voidlicence_generate_hwid(uint8 * hwid){	buf_out_uint32(hwid, 2);	strncpy((char *) (hwid + 4), g_hostname, LICENCE_HWID_SIZE - 4);}/* Present an existing licence to the server */static voidlicence_present(uint8 * client_random, uint8 * rsa_data,		uint8 * licence_data, int licence_size, uint8 * hwid, uint8 * signature){	uint32 sec_flags = SEC_LICENCE_NEG;	uint16 length =		16 + SEC_RANDOM_SIZE + SEC_MODULUS_SIZE + SEC_PADDING_SIZE +		licence_size + LICENCE_HWID_SIZE + LICENCE_SIGNATURE_SIZE;	STREAM s;	s = sec_init(sec_flags, length + 4);	out_uint8(s, LICENCE_TAG_PRESENT);	out_uint8(s, 2);	/* version */	out_uint16_le(s, length);	out_uint32_le(s, 1);	out_uint16(s, 0);	out_uint16_le(s, 0x0201);	out_uint8p(s, client_random, SEC_RANDOM_SIZE);	out_uint16(s, 0);	out_uint16_le(s, (SEC_MODULUS_SIZE + SEC_PADDING_SIZE));	out_uint8p(s, rsa_data, SEC_MODULUS_SIZE);	out_uint8s(s, SEC_PADDING_SIZE);	out_uint16_le(s, 1);	out_uint16_le(s, licence_size);	out_uint8p(s, licence_data, licence_size);	out_uint16_le(s, 1);	out_uint16_le(s, LICENCE_HWID_SIZE);	out_uint8p(s, hwid, LICENCE_HWID_SIZE);	out_uint8p(s, signature, LICENCE_SIGNATURE_SIZE);	s_mark_end(s);	sec_send(s, sec_flags);}/* Send a licence request packet */static voidlicence_send_request(uint8 * client_random, uint8 * rsa_data, char *user, char *host){	uint32 sec_flags = SEC_LICENCE_NEG;	uint16 userlen = strlen(user) + 1;	uint16 hostlen = strlen(host) + 1;	uint16 length = 128 + userlen + hostlen;	STREAM s;	s = sec_init(sec_flags, length + 2);	out_uint8(s, LICENCE_TAG_REQUEST);	out_uint8(s, 2);	/* version */	out_uint16_le(s, length);	out_uint32_le(s, 1);	out_uint16(s, 0);	out_uint16_le(s, 0xff01);	out_uint8p(s, client_random, SEC_RANDOM_SIZE);	out_uint16(s, 0);	out_uint16_le(s, (SEC_MODULUS_SIZE + SEC_PADDING_SIZE));	out_uint8p(s, rsa_data, SEC_MODULUS_SIZE);	out_uint8s(s, SEC_PADDING_SIZE);	out_uint16_le(s, LICENCE_TAG_USER);	out_uint16_le(s, userlen);	out_uint8p(s, user, userlen);	out_uint16_le(s, LICENCE_TAG_HOST);	out_uint16_le(s, hostlen);	out_uint8p(s, host, hostlen);	s_mark_end(s);	sec_send(s, sec_flags);}/* Process a licence demand packet */static voidlicence_process_demand(STREAM s){	uint8 null_data[SEC_MODULUS_SIZE];	uint8 *server_random;	uint8 signature[LICENCE_SIGNATURE_SIZE];	uint8 hwid[LICENCE_HWID_SIZE];	uint8 *licence_data;	int licence_size;	SSL_RC4 crypt_key;	/* Retrieve the server random from the incoming packet */	in_uint8p(s, server_random, SEC_RANDOM_SIZE);	/* We currently use null client keys. This is a bit naughty but, hey,	   the security of licence negotiation isn't exactly paramount. */	memset(null_data, 0, sizeof(null_data));	licence_generate_keys(null_data, server_random, null_data);	licence_size = load_licence(&licence_data);	if (licence_size > 0)	{		/* Generate a signature for the HWID buffer */		licence_generate_hwid(hwid);		sec_sign(signature, 16, g_licence_sign_key, 16, hwid, sizeof(hwid));		/* Now encrypt the HWID */		ssl_rc4_set_key(&crypt_key, g_licence_key, 16);		ssl_rc4_crypt(&crypt_key, hwid, hwid, sizeof(hwid));		licence_present(null_data, null_data, licence_data, licence_size, hwid, signature);		xfree(licence_data);		return;	}	licence_send_request(null_data, null_data, g_username, g_hostname);}/* Send an authentication response packet */static voidlicence_send_authresp(uint8 * token, uint8 * crypt_hwid, uint8 * signature){	uint32 sec_flags = SEC_LICENCE_NEG;	uint16 length = 58;	STREAM s;	s = sec_init(sec_flags, length + 2);	out_uint8(s, LICENCE_TAG_AUTHRESP);	out_uint8(s, 2);	/* version */	out_uint16_le(s, length);	out_uint16_le(s, 1);	out_uint16_le(s, LICENCE_TOKEN_SIZE);	out_uint8p(s, token, LICENCE_TOKEN_SIZE);	out_uint16_le(s, 1);	out_uint16_le(s, LICENCE_HWID_SIZE);	out_uint8p(s, crypt_hwid, LICENCE_HWID_SIZE);	out_uint8p(s, signature, LICENCE_SIGNATURE_SIZE);	s_mark_end(s);	sec_send(s, sec_flags);}/* Parse an authentication request packet */static RD_BOOLlicence_parse_authreq(STREAM s, uint8 ** token, uint8 ** signature){	uint16 tokenlen;	in_uint8s(s, 6);	/* unknown: f8 3d 15 00 04 f6 */	in_uint16_le(s, tokenlen);	if (tokenlen != LICENCE_TOKEN_SIZE)	{		error("token len %d\n", tokenlen);		return False;	}	in_uint8p(s, *token, tokenlen);	in_uint8p(s, *signature, LICENCE_SIGNATURE_SIZE);	return s_check_end(s);}/* Process an authentication request packet */static voidlicence_process_authreq(STREAM s){	uint8 *in_token = NULL, *in_sig;	uint8 out_token[LICENCE_TOKEN_SIZE], decrypt_token[LICENCE_TOKEN_SIZE];	uint8 hwid[LICENCE_HWID_SIZE], crypt_hwid[LICENCE_HWID_SIZE];	uint8 sealed_buffer[LICENCE_TOKEN_SIZE + LICENCE_HWID_SIZE];	uint8 out_sig[LICENCE_SIGNATURE_SIZE];	SSL_RC4 crypt_key;	/* Parse incoming packet and save the encrypted token */	licence_parse_authreq(s, &in_token, &in_sig);	memcpy(out_token, in_token, LICENCE_TOKEN_SIZE);	/* Decrypt the token. It should read TEST in Unicode. */	ssl_rc4_set_key(&crypt_key, g_licence_key, 16);	ssl_rc4_crypt(&crypt_key, in_token, decrypt_token, LICENCE_TOKEN_SIZE);	/* Generate a signature for a buffer of token and HWID */	licence_generate_hwid(hwid);	memcpy(sealed_buffer, decrypt_token, LICENCE_TOKEN_SIZE);	memcpy(sealed_buffer + LICENCE_TOKEN_SIZE, hwid, LICENCE_HWID_SIZE);	sec_sign(out_sig, 16, g_licence_sign_key, 16, sealed_buffer, sizeof(sealed_buffer));	/* Now encrypt the HWID */	ssl_rc4_set_key(&crypt_key, g_licence_key, 16);	ssl_rc4_crypt(&crypt_key, hwid, crypt_hwid, LICENCE_HWID_SIZE);	licence_send_authresp(out_token, crypt_hwid, out_sig);}/* Process an licence issue packet */static voidlicence_process_issue(STREAM s){	SSL_RC4 crypt_key;	uint32 length;	uint16 check;	int i;	in_uint8s(s, 2);	/* 3d 45 - unknown */	in_uint16_le(s, length);	if (!s_check_rem(s, length))		return;	ssl_rc4_set_key(&crypt_key, g_licence_key, 16);	ssl_rc4_crypt(&crypt_key, s->p, s->p, length);	in_uint16(s, check);	if (check != 0)		return;	g_licence_issued = True;	in_uint8s(s, 2);	/* pad */	/* advance to fourth string */	length = 0;	for (i = 0; i < 4; i++)	{		in_uint8s(s, length);		in_uint32_le(s, length);		if (!s_check_rem(s, length))			return;	}	g_licence_issued = True;	save_licence(s->p, length);}/* Process a licence packet */voidlicence_process(STREAM s){	uint8 tag;	in_uint8(s, tag);	in_uint8s(s, 3);	/* version, length */	switch (tag)	{		case LICENCE_TAG_DEMAND:			licence_process_demand(s);			break;		case LICENCE_TAG_AUTHREQ:			licence_process_authreq(s);			break;		case LICENCE_TAG_ISSUE:			licence_process_issue(s);			break;		case LICENCE_TAG_REISSUE:		case LICENCE_TAG_RESULT:			break;		default:			unimpl("licence tag 0x%x\n", tag);	}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一二区视频| 91久久线看在观草草青青| 成人欧美一区二区三区在线播放| 欧美精品一区二区三| 日韩一区二区三区四区五区六区| 欧美老肥妇做.爰bbww| 在线电影欧美成精品| 欧美电影一区二区三区| 91精品国产综合久久久久久漫画 | 日韩一区二区三区四区 | 日韩欧美国产精品一区| 欧美色精品在线视频| 欧美日韩中文字幕精品| 欧美精品在线视频| 日韩三级精品电影久久久| 久久综合久色欧美综合狠狠| 国产视频一区二区在线观看| 欧美国产精品v| 亚洲乱码国产乱码精品精可以看| 亚洲自拍都市欧美小说| 首页国产欧美久久| 国产自产高清不卡| 成人国产亚洲欧美成人综合网 | 另类综合日韩欧美亚洲| 激情久久五月天| 91麻豆免费看片| 欧美高清视频在线高清观看mv色露露十八 | 国产精品自拍在线| 色综合久久中文字幕综合网 | 秋霞电影网一区二区| 国内外成人在线| 99精品视频在线观看| 555www色欧美视频| 久久久久久毛片| 亚洲国产欧美日韩另类综合| 国内一区二区视频| 在线观看视频欧美| 国产亚洲欧洲997久久综合 | 国内精品免费**视频| 色域天天综合网| 精品国产电影一区二区| 最新久久zyz资源站| 日韩电影在线免费看| 国产99精品国产| 欧美精品乱码久久久久久按摩| 久久麻豆一区二区| 婷婷六月综合网| 97成人超碰视| 久久午夜国产精品| 日日嗨av一区二区三区四区| www.视频一区| 日韩精品一区二| 午夜激情一区二区| 日本电影欧美片| 国产精品视频第一区| 日本sm残虐另类| 欧美午夜精品理论片a级按摩| 中文字幕第一区二区| 久久爱www久久做| 欧美一区二区三区在线视频| 一二三四社区欧美黄| 99re这里只有精品首页| 国产亚洲短视频| 国产精品自拍在线| 2021中文字幕一区亚洲| 青青草97国产精品免费观看| 在线观看成人免费视频| 国产精品成人免费精品自在线观看| 国产一区二区导航在线播放| 欧美本精品男人aⅴ天堂| 日本特黄久久久高潮| 欧美美女一区二区| 天天做天天摸天天爽国产一区| 欧美性受极品xxxx喷水| 日韩成人免费电影| 欧美欧美欧美欧美首页| 亚洲欧美色一区| 91免费视频大全| 亚洲激情自拍偷拍| 欧美午夜片在线看| 亚洲国产一区二区视频| 欧美体内she精高潮| 亚洲制服丝袜av| 欧美日韩小视频| 日本 国产 欧美色综合| 欧美电影免费观看高清完整版在| 日本系列欧美系列| 久久久久久久免费视频了| 国产麻豆午夜三级精品| 国产精品九色蝌蚪自拍| 色丁香久综合在线久综合在线观看| 亚洲免费高清视频在线| 欧美老女人第四色| 国产在线播放一区| 国产精品久久久久久久久晋中| 一本一本大道香蕉久在线精品| 亚洲一区二区三区视频在线播放 | 日韩在线一区二区三区| 日韩欧美国产成人一区二区| 国产乱人伦偷精品视频不卡 | 日韩三级视频在线看| 国产精品资源在线观看| 亚洲精品视频在线看| 717成人午夜免费福利电影| 精品一区二区三区av| 国产精品国产三级国产aⅴ原创 | 亚洲一区二区美女| 91精品国模一区二区三区| 国产成人免费在线观看| 一区二区在线观看视频| 欧美xxxx在线观看| 91视视频在线观看入口直接观看www| 午夜精品久久久久影视| 国产视频不卡一区| 欧美精品九九99久久| 成人黄色777网| 日韩精品电影一区亚洲| 国产精品免费视频观看| 成人黄色小视频| 日韩中文字幕91| 亚洲特级片在线| 99久久99久久综合| 亚洲综合免费观看高清完整版 | 亚洲精品日日夜夜| 亚洲精品一区二区精华| 欧美色倩网站大全免费| 成人综合婷婷国产精品久久免费| 五月天激情综合| 国产精品免费av| 精品少妇一区二区三区日产乱码| 色噜噜狠狠成人中文综合 | 国产精品乱码久久久久久| 欧美一区二区黄色| 在线精品国精品国产尤物884a| 国产精品中文字幕日韩精品 | 国产日本欧洲亚洲| 日韩一区二区三区视频在线| 91久久线看在观草草青青| 成人av资源在线| 国产一区二区三区综合| 久久成人羞羞网站| 日本中文字幕不卡| 日韩1区2区日韩1区2区| 天涯成人国产亚洲精品一区av| 亚洲美女少妇撒尿| 亚洲人123区| 中文字幕视频一区| 中文字幕日韩av资源站| 亚洲国产电影在线观看| 国产人伦精品一区二区| 久久久综合九色合综国产精品| 精品国产一二三区| 精品久久久久久久人人人人传媒| 欧美一区二区三区视频免费| 717成人午夜免费福利电影| 欧美精品亚洲一区二区在线播放| 欧美亚洲高清一区| 欧美高清视频一二三区 | 欧美日韩一区在线| 欧美浪妇xxxx高跟鞋交| 91精品国产aⅴ一区二区| 日韩午夜三级在线| 欧美一区中文字幕| 精品久久国产97色综合| 久久精品视频一区二区三区| 国产视频一区在线观看| 136国产福利精品导航| 亚洲精品乱码久久久久久| 悠悠色在线精品| 日韩vs国产vs欧美| 国产酒店精品激情| av网站一区二区三区| 欧美性欧美巨大黑白大战| 欧美精品v日韩精品v韩国精品v| 欧美一区二区三区影视| 久久久久亚洲蜜桃| 亚洲你懂的在线视频| 视频一区国产视频| 国产一区二区伦理片| 色综合咪咪久久| 制服丝袜成人动漫| 欧美国产亚洲另类动漫| 亚洲综合在线第一页| 麻豆精品国产传媒mv男同| 成人黄色小视频| 欧美另类z0zxhd电影| 欧美国产日韩一二三区| 夜夜嗨av一区二区三区中文字幕 | 91麻豆免费看片| 亚洲精品在线一区二区| 亚洲色图在线看| 久久不见久久见中文字幕免费| 成人黄色大片在线观看| 欧美一级艳片视频免费观看| 久久久久国产精品免费免费搜索 | 日韩一区二区免费电影| 亚洲欧洲av色图| 久久精品999| 欧美性欧美巨大黑白大战| 国产三级精品三级|