资源简介
该程序是linux下telnet的完整实现,编译已经通过。喜欢linux程序设计的朋友可以研究一下。
![](http://www.nz998.com/pic/65620.jpg)
代码片段和文件信息
/*-
* 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. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California Berkeley and its contributors.
* 4. 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.
*/
#ifndef lint
static char sccsid[] = “@(#)authenc.c 8.1 (Berkeley) 6/6/93“;
#endif /* not lint */
#if defined(AUTHENTICATION)
#include
#include
#include
#include
#include “general.h“
#include “ring.h“
#include “externs.h“
#include “defines.h“
#include “types.h“
int
net_write(str len)
unsigned char *str;
int len;
{
if (NETROOM() > len) {
ring_supply_data(&netoring str len);
if (str[0] == IAC && str[1] == SE)
printsub(‘>‘ &str[2] len-2);
return(len);
}
return(0);
}
void
net_encrypt()
{
}
int
telnet_spin()
{
return(-1);
}
char *
telnet_getenv(val)
char *val;
{
return((char *)env_getvalue((unsigned char *)val));
}
char *
telnet_gets(prompt result length echo)
char *prompt;
char *result;
int length;
int echo;
{
extern char *getpass();
extern int globalmode;
int om = globalmode;
char *res;
TerminalNewMode(-1);
if (echo) {
printf(“%s“ prompt);
res = fgets(result length stdin);
} else if (res = getpass(prompt)) {
strncpy(result res length);
res = result;
}
TerminalNewMode(om);
return(res);
}
#endif /* defined(AUTHENTICATION)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-12-06 14:36 mytelnet\
文件 1408 2013-03-01 20:21 mytelnet\Makefile
文件 590 2013-03-01 19:24 mytelnet\Makefile_bark
文件 1418 2013-03-01 20:21 mytelnet\Makefile~
文件 25373 2003-08-18 13:40 mytelnet\README
文件 3004 2003-08-18 13:40 mytelnet\authenc.c
文件 1280 2013-03-01 19:55 mytelnet\authenc.o
文件 65408 2013-03-01 14:27 mytelnet\commands.c
文件 2654 2003-08-18 13:40 mytelnet\defines.h
文件 14137 2003-08-18 13:40 mytelnet\externs.h
文件 2211 2003-08-18 13:40 mytelnet\fdset.h
文件 2104 2003-08-18 13:40 mytelnet\general.h
文件 3223 2003-08-18 13:40 mytelnet\genget.c
文件 2378 2003-08-18 13:40 mytelnet\getent.c
文件 7602 2013-03-01 20:12 mytelnet\main.c
文件 7602 2013-03-01 19:43 mytelnet\main.c~
文件 8620 2013-03-01 20:15 mytelnet\main.o
文件 3388 2003-08-18 13:40 mytelnet\misc-proto.h
文件 2752 2003-08-18 13:40 mytelnet\misc.c
文件 2038 2003-08-18 13:40 mytelnet\misc.h
文件 94631 2013-03-01 19:25 mytelnet\mytelnet
文件 4544 2003-08-18 13:40 mytelnet\network.c
文件 7240 2013-03-01 20:15 mytelnet\network.o
文件 7404 2003-08-18 13:40 mytelnet\ring.c
文件 3316 2003-08-18 13:40 mytelnet\ring.h
文件 7228 2013-03-01 20:15 mytelnet\ring.o
文件 26245 2003-08-18 13:40 mytelnet\sys_bsd.c
文件 54378 2013-03-01 15:32 mytelnet\telnet.c
文件 5089 2003-08-18 13:40 mytelnet\terminal.c
文件 9500 2003-08-18 13:40 mytelnet\tn3270.c
文件 2304 2003-08-18 13:40 mytelnet\types.h
............此处省略1个文件信息
- 上一篇:Qt下基于snap7西门子PLC通信.zip
- 下一篇:Excel文件比对并替换
相关资源
- uboot到linux logo显示不间断 补丁
- UNIX/LINUX编程实践教程的源码
- Linux任务管理器
- linux应用层的华容道游戏源代码
- ubuntu9.10 可加载内核模块和字符设备驱
- MP3文件ID3v2ID3v2APEv2标签读取
- 操作系统实验——虚存管理实验
- linux下的发包工具sendip
- 尚观培训linux许巍关于c 的笔记和讲义
- 尚观培训linux董亮老师关于数据结构的
- linux 线程池源码 c 版
- linux C 电梯程序练习
- linux下用多进程同步方法解决生产者
- Linux 操作系统实验(全)
- Linux From Scratch 中文手册
- linux 网络实验 ftp程序
- Linux命令大全离线版&在线版
- 操作系统共享内存实验
- dos 下运行Linux 命令--gnu_utils
- linux 0.12内核源代码
- linux简易shell C实现
- linux实验报告及心得体会
- 基于GTK的Linux环境下的简易任务管理器
- linux扫雷游戏代码
- CAN Linux驱动代码
- Linux系统教材
- intel 82579LM 网卡驱动Linux系统版 v1.9.
- SA1110处理器掌上电脑液晶显示器设计
- 基于Linux的串口服务器设计
- Windows下访问LINUX的利器-SSH
评论
共有 条评论