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

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

?? encrypt.c

?? 經典的unix下telnetd代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*     $OpenBSD: encrypt.c,v 1.3 2003/06/26 07:53:27 deraadt Exp $     *//*- * Copyright (c) 1991, 1993 *	The Regents of the University of California.  All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors *    may be used to endorse or promote products derived from this software *    without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * This source code is no longer held under any constraint of USA * `cryptographic laws' since it was exported legally.  The cryptographic * functions were removed from the code and a "Bones" distribution was * made.  A Commodity Jurisdiction Request #012-94 was filed with the * USA State Department, who handed it to the Commerce department.  The * code was determined to fall under General License GTDA under ECCN 5D96G, * and hence exportable.  The cryptographic interfaces were re-added by Eric * Young, and then KTH proceeded to maintain the code in the free world. * *//* * Copyright (C) 1990 by the Massachusetts Institute of Technology * * Export of this software from the United States of America is assumed * to require a specific license from the United States Government. * It is the responsibility of any person or organization contemplating * export to obtain such a license before exporting. * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright * notice appear in all copies and that both that copyright notice and * this permission notice appear in supporting documentation, and that * the name of M.I.T. not be used in advertising or publicity pertaining * to distribution of the software without specific, written prior * permission.  M.I.T. makes no representations about the suitability of * this software for any purpose.  It is provided "as is" without express * or implied warranty. *//*RCSID("$KTH: encrypt.c,v 1.22.8.1 2002/02/06 03:39:13 assar Exp $");*/#if	defined(ENCRYPTION)#define	ENCRYPT_NAMES#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/types.h>#include <arpa/telnet.h>#include "encrypt.h"#include "misc.h"/* * These functions pointers point to the current routines * for encrypting and decrypting data. */void	(*encrypt_output) (unsigned char *, int);int	(*decrypt_input) (int);char	*nclearto;int encrypt_debug_mode = 0;static int decrypt_mode = 0;static int encrypt_mode = 0;static int encrypt_verbose = 0;static int autoencrypt = 0;static int autodecrypt = 0;static int havesessionkey = 0;static int Server = 0;static const char *Name = "Noname";#define	typemask(x)	((x) > 0 ? 1 << ((x)-1) : 0)static long i_support_encrypt = typemask(ENCTYPE_DES_CFB64)     | typemask(ENCTYPE_DES_OFB64);     static long i_support_decrypt = typemask(ENCTYPE_DES_CFB64)     | typemask(ENCTYPE_DES_OFB64);     static long i_wont_support_encrypt = 0;     static long i_wont_support_decrypt = 0;#define	I_SUPPORT_ENCRYPT	(i_support_encrypt & ~i_wont_support_encrypt)#define	I_SUPPORT_DECRYPT	(i_support_decrypt & ~i_wont_support_decrypt)     static long remote_supports_encrypt = 0;     static long remote_supports_decrypt = 0;     static Encryptions encryptions[] = {#if	defined(DES_ENCRYPTION)	 { "DES_CFB64",	ENCTYPE_DES_CFB64,	   cfb64_encrypt,		   cfb64_decrypt,	   cfb64_init,	   cfb64_start,	   cfb64_is,	   cfb64_reply,	   cfb64_session,	   cfb64_keyid,	   cfb64_printsub },	 { "DES_OFB64",	ENCTYPE_DES_OFB64,	   ofb64_encrypt,		   ofb64_decrypt,	   ofb64_init,	   ofb64_start,	   ofb64_is,	   ofb64_reply,	   ofb64_session,	   ofb64_keyid,	   ofb64_printsub },#endif	 { 0, },     };static unsigned char str_send[64] = { IAC, SB, TELOPT_ENCRYPT,				      ENCRYPT_SUPPORT };static unsigned char str_suplen = 0;static unsigned char str_start[72] = { IAC, SB, TELOPT_ENCRYPT };static unsigned char str_end[] = { IAC, SB, TELOPT_ENCRYPT, 0, IAC, SE };Encryptions *findencryption(int type){    Encryptions *ep = encryptions;    if (!(I_SUPPORT_ENCRYPT & remote_supports_decrypt & typemask(type)))	return(0);    while (ep->type && ep->type != type)	++ep;    return(ep->type ? ep : 0);}Encryptions *finddecryption(int type){    Encryptions *ep = encryptions;    if (!(I_SUPPORT_DECRYPT & remote_supports_encrypt & typemask(type)))	return(0);    while (ep->type && ep->type != type)	++ep;    return(ep->type ? ep : 0);}#define	MAXKEYLEN 64static struct key_info {    unsigned char keyid[MAXKEYLEN];    int keylen;    int dir;    int *modep;    Encryptions *(*getcrypt)(int);} ki[2] = {    { { 0 }, 0, DIR_ENCRYPT, &encrypt_mode, findencryption },    { { 0 }, 0, DIR_DECRYPT, &decrypt_mode, finddecryption },};voidencrypt_init(const char *name, int server){    Encryptions *ep = encryptions;    Name = name;    Server = server;    i_support_encrypt = i_support_decrypt = 0;    remote_supports_encrypt = remote_supports_decrypt = 0;    encrypt_mode = 0;    decrypt_mode = 0;    encrypt_output = 0;    decrypt_input = 0;#ifdef notdef    encrypt_verbose = !server;#endif    str_suplen = 4;    while (ep->type) {	if (encrypt_debug_mode)	    printf(">>>%s: I will support %s\r\n",		   Name, ENCTYPE_NAME(ep->type));	i_support_encrypt |= typemask(ep->type);	i_support_decrypt |= typemask(ep->type);	if ((i_wont_support_decrypt & typemask(ep->type)) == 0)	    if ((str_send[str_suplen++] = ep->type) == IAC)		str_send[str_suplen++] = IAC;	if (ep->init)	    (*ep->init)(Server);	++ep;    }    str_send[str_suplen++] = IAC;    str_send[str_suplen++] = SE;}voidencrypt_list_types(void){    Encryptions *ep = encryptions;    printf("Valid encryption types:\n");    while (ep->type) {	printf("\t%s (%d)\r\n", ENCTYPE_NAME(ep->type), ep->type);	++ep;    }}intEncryptEnable(char *type, char *mode){    if (isprefix(type, "help") || isprefix(type, "?")) {	printf("Usage: encrypt enable <type> [input|output]\n");	encrypt_list_types();	return(0);    }    if (EncryptType(type, mode))	return(EncryptStart(mode));    return(0);}intEncryptDisable(char *type, char *mode){    Encryptions *ep;    int ret = 0;    if (isprefix(type, "help") || isprefix(type, "?")) {	printf("Usage: encrypt disable <type> [input|output]\n");	encrypt_list_types();    } else if ((ep = (Encryptions *)genget(type, (char**)encryptions,					   sizeof(Encryptions))) == 0) {	printf("%s: invalid encryption type\n", type);    } else if (Ambiguous(ep)) {	printf("Ambiguous type '%s'\n", type);    } else {	if ((mode == 0) || (isprefix(mode, "input") ? 1 : 0)) {	    if (decrypt_mode == ep->type)		EncryptStopInput();	    i_wont_support_decrypt |= typemask(ep->type);	    ret = 1;	}	if ((mode == 0) || (isprefix(mode, "output"))) {	    if (encrypt_mode == ep->type)		EncryptStopOutput();	    i_wont_support_encrypt |= typemask(ep->type);	    ret = 1;	}	if (ret == 0)	    printf("%s: invalid encryption mode\n", mode);    }    return(ret);}intEncryptType(char *type, char *mode){    Encryptions *ep;    int ret = 0;    if (isprefix(type, "help") || isprefix(type, "?")) {	printf("Usage: encrypt type <type> [input|output]\n");	encrypt_list_types();    } else if ((ep = (Encryptions *)genget(type, (char**)encryptions,					   sizeof(Encryptions))) == 0) {	printf("%s: invalid encryption type\n", type);    } else if (Ambiguous(ep)) {	printf("Ambiguous type '%s'\n", type);    } else {	if ((mode == 0) || isprefix(mode, "input")) {	    decrypt_mode = ep->type;	    i_wont_support_decrypt &= ~typemask(ep->type);	    ret = 1;	}	if ((mode == 0) || isprefix(mode, "output")) {	    encrypt_mode = ep->type;	    i_wont_support_encrypt &= ~typemask(ep->type);	    ret = 1;	}	if (ret == 0)	    printf("%s: invalid encryption mode\n", mode);    }    return(ret);}intEncryptStart(char *mode){    int ret = 0;    if (mode) {	if (isprefix(mode, "input"))	    return(EncryptStartInput());	if (isprefix(mode, "output"))	    return(EncryptStartOutput());	if (isprefix(mode, "help") || isprefix(mode, "?")) {	    printf("Usage: encrypt start [input|output]\n");	    return(0);	}	printf("%s: invalid encryption mode 'encrypt start ?' for help\n", mode);	return(0);    }    ret += EncryptStartInput();    ret += EncryptStartOutput();    return(ret);}intEncryptStartInput(void){    if (decrypt_mode) {	encrypt_send_request_start();	return(1);    }    printf("No previous decryption mode, decryption not enabled\r\n");    return(0);}intEncryptStartOutput(void){    if (encrypt_mode) {	encrypt_start_output(encrypt_mode);	return(1);    }    printf("No previous encryption mode, encryption not enabled\r\n");    return(0);}intEncryptStop(char *mode){    int ret = 0;    if (mode) {	if (isprefix(mode, "input"))	    return(EncryptStopInput());	if (isprefix(mode, "output"))	    return(EncryptStopOutput());	if (isprefix(mode, "help") || isprefix(mode, "?")) {	    printf("Usage: encrypt stop [input|output]\n");	    return(0);	}	printf("%s: invalid encryption mode 'encrypt stop ?' for help\n", mode);	return(0);    }    ret += EncryptStopInput();    ret += EncryptStopOutput();    return(ret);}intEncryptStopInput(void){    encrypt_send_request_end();    return(1);}intEncryptStopOutput(void){    encrypt_send_end();    return(1);}voidencrypt_display(void){    printf("Autoencrypt for output is %s. Autodecrypt for input is %s.\r\n",	   autoencrypt?"on":"off", autodecrypt?"on":"off");    if (encrypt_output)	printf("Currently encrypting output with %s\r\n",	       ENCTYPE_NAME(encrypt_mode));    else	printf("Currently not encrypting output\r\n");	    if (decrypt_input)	printf("Currently decrypting input with %s\r\n",	       ENCTYPE_NAME(decrypt_mode));    else	printf("Currently not decrypting input\r\n");}intEncryptStatus(void){    printf("Autoencrypt for output is %s. Autodecrypt for input is %s.\r\n",	   autoencrypt?"on":"off", autodecrypt?"on":"off");    if (encrypt_output)	printf("Currently encrypting output with %s\r\n",	       ENCTYPE_NAME(encrypt_mode));    else if (encrypt_mode) {	printf("Currently output is clear text.\r\n");	printf("Last encryption mode was %s\r\n",	       ENCTYPE_NAME(encrypt_mode));    } else	printf("Currently not encrypting output\r\n");	    if (decrypt_input) {	printf("Currently decrypting input with %s\r\n",	       ENCTYPE_NAME(decrypt_mode));    } else if (decrypt_mode) {	printf("Currently input is clear text.\r\n");	printf("Last decryption mode was %s\r\n",	       ENCTYPE_NAME(decrypt_mode));    } else	printf("Currently not decrypting input\r\n");    return 1;}voidencrypt_send_support(void){    if (str_suplen) {	/*	 * If the user has requested that decryption start	 * immediatly, then send a "REQUEST START" before	 * we negotiate the type.	 */	if (!Server && autodecrypt)	    encrypt_send_request_start();	telnet_net_write(str_send, str_suplen);	printsub('>', &str_send[2], str_suplen - 2);	str_suplen = 0;    }}intEncryptDebug(int on){    if (on < 0)	encrypt_debug_mode ^= 1;    else	encrypt_debug_mode = on;    printf("Encryption debugging %s\r\n",	   encrypt_debug_mode ? "enabled" : "disabled");    return(1);}/* turn on verbose encryption, but dont keep telling the whole world */void encrypt_verbose_quiet(int on){    if(on < 0)	encrypt_verbose ^= 1;    else	encrypt_verbose = on ? 1 : 0;}intEncryptVerbose(int on){    encrypt_verbose_quiet(on);    printf("Encryption %s verbose\r\n",	   encrypt_verbose ? "is" : "is not");    return(1);}intEncryptAutoEnc(int on){    encrypt_auto(on);    printf("Automatic encryption of output is %s\r\n",	   autoencrypt ? "enabled" : "disabled");    return(1);}intEncryptAutoDec(int on){    decrypt_auto(on);    printf("Automatic decryption of input is %s\r\n",	   autodecrypt ? "enabled" : "disabled");    return(1);}/* Called when we receive a WONT or a DONT ENCRYPT after we sent a DO   encrypt */voidencrypt_not(void)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品国产澳门| 国产精品高清亚洲| 免费观看成人av| 日韩欧美自拍偷拍| 国产毛片精品视频| 中文av字幕一区| 色偷偷一区二区三区| 午夜精品福利视频网站 | 在线观看免费亚洲| 蜜桃视频在线观看一区二区| 欧美一区二区三区啪啪| 狠狠狠色丁香婷婷综合激情| 国产亲近乱来精品视频 | 亚洲综合视频在线观看| 欧美色图第一页| 久久成人免费日本黄色| 国产精品美女久久久久久久久| 色呦呦一区二区三区| 日韩**一区毛片| 国产日产亚洲精品系列| 色噜噜狠狠色综合中国| 美女高潮久久久| 国产精品久久久久久久久免费相片| 91啪在线观看| 另类小说色综合网站| 国产精品久久久久aaaa樱花| 欧美麻豆精品久久久久久| 国产综合一区二区| 亚洲午夜电影在线观看| 精品免费一区二区三区| 色综合久久久久久久久久久| 日韩精品91亚洲二区在线观看| 久久久影视传媒| 欧美日韩和欧美的一区二区| 国产精品一区三区| 亚洲成人av福利| 欧美国产精品专区| 欧美一区在线视频| 色综合久久综合中文综合网| 国内精品伊人久久久久av影院| 一区二区三区影院| 久久精品一区八戒影视| 制服丝袜日韩国产| 一本久久精品一区二区| 国产乱码精品一区二区三区av| 亚洲国产一区二区视频| 国产精品区一区二区三区| 正在播放一区二区| 在线亚洲人成电影网站色www| 国产精品一区在线观看乱码 | 91精品国产乱| 91视频一区二区| 国产成+人+日韩+欧美+亚洲| 视频一区二区不卡| 亚洲综合激情小说| 国产精品久久久久久久浪潮网站 | av影院午夜一区| 精品无人区卡一卡二卡三乱码免费卡| 一级日本不卡的影视| 国产精品卡一卡二| 国产午夜精品理论片a级大结局 | 久久精品一区蜜桃臀影院| 欧美一区二区视频在线观看2020| 色婷婷av一区二区三区gif| 成人做爰69片免费看网站| 国产一区欧美日韩| 九九国产精品视频| 日本中文字幕一区| 日韩和欧美一区二区| 亚洲国产精品综合小说图片区| 国产精品每日更新在线播放网址| 久久久久99精品国产片| 亚洲精品一区二区三区福利 | 欧美视频在线一区| 一本大道av一区二区在线播放| 成人动漫一区二区三区| 懂色av一区二区三区免费观看| 国产黄人亚洲片| 国产成人福利片| a亚洲天堂av| 色网站国产精品| 欧美性xxxxxxxx| 欧美嫩在线观看| 91精品国产综合久久精品app| 欧美日韩国产a| 日韩欧美激情一区| 国产亚洲欧美在线| 国产精品久久久久aaaa樱花| 亚洲女厕所小便bbb| 亚洲一区在线观看视频| 天天影视涩香欲综合网| 美女视频黄a大片欧美| 国产精品一线二线三线精华| 国产91丝袜在线播放九色| 91视频国产资源| 欧美三级视频在线观看| 欧美一区二区国产| 欧美精品一区二区三区在线播放 | 日韩免费电影网站| 国产亚洲精品久| 亚洲精品国产精华液| 日韩成人一区二区| 国产精品亚洲视频| 一本大道久久a久久综合 | 久久综合九色综合97_久久久| 国产日产亚洲精品系列| 麻豆国产精品一区二区三区| 国产一区二区在线免费观看| av午夜精品一区二区三区| 欧美嫩在线观看| 国产欧美视频在线观看| 亚洲电影第三页| 国产真实乱偷精品视频免| 色综合天天综合给合国产| 欧美一级爆毛片| 国产精品久久久久一区二区三区共| 一二三区精品福利视频| 精品一区在线看| 在线视频综合导航| 26uuu色噜噜精品一区| 一区二区三区欧美亚洲| 国产一区二区视频在线| 欧美少妇一区二区| 国产精品视频看| 美国十次综合导航| 91久久精品一区二区| 久久综合视频网| 天天亚洲美女在线视频| 91亚洲男人天堂| 国产亚洲欧洲一区高清在线观看| 亚洲国产精品麻豆| 菠萝蜜视频在线观看一区| 欧美大片一区二区| 亚洲国产精品久久人人爱| 国产.欧美.日韩| 日韩美女主播在线视频一区二区三区| 国产精品久久久久久亚洲伦| 狠狠网亚洲精品| 欧美美女一区二区在线观看| 亚洲三级视频在线观看| 国产精品自拍毛片| 日韩欧美黄色影院| 丝袜美腿亚洲综合| 91久久久免费一区二区| 国产精品欧美久久久久一区二区| 裸体健美xxxx欧美裸体表演| 欧美色视频一区| 怡红院av一区二区三区| 99久久精品免费看国产| 国产午夜一区二区三区| 国产在线精品不卡| 欧美白人最猛性xxxxx69交| 天天亚洲美女在线视频| 欧美三区在线观看| 亚洲综合成人在线| 在线视频欧美区| 一区二区三区四区高清精品免费观看| 大胆亚洲人体视频| 国产欧美一区二区在线观看| 国产一区二区成人久久免费影院 | 日韩免费高清视频| 免费不卡在线观看| 日韩一区二区电影网| 蜜桃91丨九色丨蝌蚪91桃色| 制服丝袜国产精品| 日本欧美加勒比视频| 91麻豆精品国产综合久久久久久 | 91视频国产观看| 亚洲视频每日更新| 色婷婷av一区二区三区gif| 亚洲欧美日韩久久精品| 色婷婷综合久久久中文一区二区| 视频一区二区国产| 欧美精品第一页| 日本特黄久久久高潮| 日韩免费看的电影| 国产高清视频一区| 国产精品美女久久久久久2018| 99久久精品国产一区| 亚洲精品老司机| 欧美特级限制片免费在线观看| 一区二区三区精密机械公司| 欧美性视频一区二区三区| 亚洲va欧美va国产va天堂影院| 欧美高清精品3d| 极品瑜伽女神91| 国产精品久久毛片a| 91九色02白丝porn| 日韩高清中文字幕一区| 精品国产1区2区3区| 成人av网址在线| 亚洲国产另类精品专区| 精品欧美久久久| 97aⅴ精品视频一二三区| 亚洲五码中文字幕| 欧美大肚乱孕交hd孕妇| 波多野结衣中文字幕一区二区三区| 伊人开心综合网| 精品国产青草久久久久福利| av在线一区二区三区|