资源简介
该程序是linux下telnet的完整实现,编译已经通过。喜欢linux程序设计的朋友可以研究一下。
代码片段和文件信息
/*-
* 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文件比对并替换
相关资源
- Linux 0.11下信号量的简单实现——用生
- linux ubuntu
- linux下多线程socket通信完整源码文件
- 深入理解Linux内核第三版中文版+英文
- 最全Linux C 库函数官方中文API手册
- UbuntuLinux下通过ndiswrapper安装无线网卡
- deepin-scrot
- linux下Questasim10/Modelsim安装以及破解方
- how linux works 精通linux 中文版 第二版
- 在Linux环境下模拟实现简单命令解释器
- IT机房搬迁实施方案
- 马哥Linux2016全套视频教程及随堂笔记
- 山东大学linux期末复习资料.zip
- Linuxc聊天室,有日志功能可群聊可私
- 简易路由器-demo
- 一款非常好用的telnet工具
- 2018年Linux系统安全检查、加固shell脚本
- 上传项目到Linux服务器
- CentOS-7-x86_64-DVD-1611.iso镜像
- LinuxFTP简单实现、
- Linux_C函数库参考手册(清晰版完整版
- 马哥Linux运维共208讲(初级中级高级必
- 《嵌入式Linux驱动开发教程》书中完整
- Linux常用命令手册大全
- 电子相册--QT
- NVIDIA-Linux-x86_64-378.09
- NVIDIA-Linux-x86_64-384.59
- linux下基于TCP的多用户聊天室含文档
- Linux贪吃蛇
- Linux音乐播放器代码
评论
共有 条评论