centos7 使用telnet

在win上测试telnet www.baidu.com 80会跳转到另外一个DOS,看不到所谓的trying 12......,所以用centos是了一下:

[root@localhost bin]# telnet www.baidu.com 80
Trying 220.181.38.150...
Connected to www.baidu.com.
Escape character is '^]'.

首先如果没有安装telnet,需要执行:

yum install telnet-server
yum install telnet

然后便可以测试:

GET /index.html HTTP/1.1
Host: www.baidu.com

 

 



posted @ 2020-12-11 12:48  Forrest1576  阅读(291)  评论(0)    收藏  举报