先在命令行输入以下命令:

telnet www.baidu.com 80

centos下 telnet访问百度

点击确认之后出现如下界面

centos下 telnet访问百度

然后接着输入以下两行命令

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

centos下 telnet访问百度

到了这里 接着连续按两下 enter键 就会返回百度首页的内容 如下:

HTTP/1.1 200 OK
Date: Sun, 17 Sep 2017 09:31:07 GMT
Content-Type: text/html
Content-Length: 14613
Last-Modified: Thu, 14 Sep 2017 03:04:00 GMT
Connection: Keep-Alive
Vary: Accept-Encoding
Set-Cookie: BAIDUID=B0BE15AB9B826700DABA32CFEA847004:FG=1; expires=Thu, 31-Dec-37 23:55:55 GMT; max-age=2147483647; path=/; domain=.baidu.com
Set-Cookie: BIDUPSID=B0BE15AB9B826700DABA32CFEA847004; expires=Thu, 31-Dec-37 23:55:55 GMT; max-age=2147483647; path=/; domain=.baidu.com
Set-Cookie: PSTM=1505640667; expires=Thu, 31-Dec-37 23:55:55 GMT; max-age=2147483647; path=/; domain=.baidu.com
P3P: CP=" OTI DSP COR IVA OUR IND COM "
Server: BWS/1.1
X-UA-Compatible: IE=Edge,chrome=1
Pragma: no-cache
Cache-control: no-cache
Accept-Ranges: bytes

<!DOCTYPE html><!--STATUS OK-->
<html>
....
</html>

centos下 telnet访问百度

 

相关文章:

  • 2021-09-08
  • 2021-10-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-30
  • 2021-11-05
  • 2022-02-07
猜你喜欢
  • 2022-12-23
  • 2022-01-20
  • 2021-06-29
  • 2021-04-21
  • 2021-12-17
  • 2022-12-23
  • 2021-08-16
相关资源
相似解决方案