liunx命令访问网页

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_32447301/article/details/82586225

1.elinks - lynx-like访问www浏览器

[root@ecs-03-01-0006 logs] yum -y install elinks
[root@ecs-03-01-0006 logs] elinks --dump www.baidu.com

2.wget 访问www浏览器然后下载到本地

[root@ecs-03-01-0006 logs]# wget 127.0.0.1:9099
--2018-09-10 10:33:57--  http://127.0.0.1:9099/
Connecting to 127.0.0.1:9099... connected.
HTTP request sent, awaiting response... 200 OK
Length: 814 [text/html]
Saving to: ‘index.html’

100%[=================================================================================================================================================================================================>] 814         --.-K/s   in 0s      

2018-09-10 10:33:57 (290 MB/s) - ‘index.html’ saved [814/814]

[root@ecs-03-01-0006 logs]# 

3.curl会显示出源码

[root@ecs-03-01-0006 logs] yum -y install curl
[root@ecs-03-01-0006 ~]# curl 127.0.0.1:9099
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>监管合规门户</title><style>@media screen and (max-width: 1610px) {
        body::-webkit-scrollbar { width: 0; height:2px; /*background:#ccc;*/ border-radius:10px;/*外层轨道*/}
        body::-webkit-scrollbar-thumb{ display:block; width: 0; margin:0 auto; border-radius: 10px; /*内层轨道*/}
      }</style><link href=/static/css/app.1dac10e0862ae6f6fbad4710e1360733.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js

4.lynx 访问www浏览器url

[root@ecs-03-01-0006 logs] yum install lynx
[root@ecs-03-01-0006 logs] lynx 127.0.0.1:8888

5.查看端口是否开放

[root@crxjtest xinetd.d]# yum list |grep telnet  
...  
Trying other mirror.  
telnet.x86_64                          1:0.17-47.el6                 @anaconda-RedHatEnterpriseLinux-201111171049.x86_64/6.2  
telnet-server.x86_64                   1:0.17-47.el6                 local  
[root@crxjtest xinetd.d]# yum install telnet-server.x86_64  
...  
Trying other mirror.  
Setting up Install Process  
Resolving Dependencies  
--> Running transaction check  
---> Package telnet-server.x86_64 1:0.17-47.el6 will be installed  
--> Processing Dependency: xinetd for package: 1:telnet-server-0.17-47.el6.x86_64  
--> Running transaction check  
---> Package xinetd.x86_64 2:2.3.14-33.el6 will be installed  
--> Finished Dependency Resolution  
[root@ecs-03-01-0006 logs] telnet 127.0.0.1 8888

《参考:https://blog.csdn.net/zhuying_linux/article/details/6881728

阅读更多
换一批

没有更多推荐了,返回首页