专家
公告
财富商城
电子网
旗下网站
首页
问题库
专栏
标签库
话题
专家
NEW
门户
发布
提问题
发文章
嵌入式
嵌入式 Wget使用一点方法
2019-07-12 17:11
发布
生成海报
站内文章
/
嵌入式Linux
17344
0
1347
编译的时候请使用--without-ssl --disable--http
wget使用方法(some)
前提说明:
Web服务器
http://127.0.0.1:8333/test.php
是我自己搭建的一台nginx+phpweb服务器
1 post请求
Wget默认发送Get请求,通过指定参数--post-dataor --post-file 这两个选项
e.g wget--post-data "aaaa"
http://127.0.0.1:8333/test.php
wget--post-data "user=foo"
http://127.0.0.1:8333/test.php
wget–post-file post_file
http://127.0.0.1:8333/test.php
2 head请求
wget --debug--spider
http://127.0.0.1:8333/test.php
--spider并不下载文件,通过head请求服务器,获取web服务器响应
3 –no-cache禁用缓存
e.g wget–no-cache
http://127.0.0.1:8333/test.php
请求数据包头部Pragma:no-cache,不使用缓存,http1.1加上Cache-Control: no-cache, must-revalidate
4 –referer使用referer
Referrer主要用户点击的上一个页面,一般可以用做防盗链技术,防盗链可以在url后面加一个key=value加密字段,或者使用特定referer字段。
e.g wget–debug –referer
www.baidu.com
http://127.0.0.1:8333/test.php
5 显示wget帮助和版本信息
Wget –v or wget –h
6 –e 就是执行命令
e.g wget-e "postdata=111111111"
http://localhost:8333/test.php
这种形式和wget –post-data=”11111111”
http://localhost:8333/test.php
是相同的。
7 logfile (-o)把debug信息输出到文件
e.g wget
http://localhost:8333/test.php
-ologfile
8 referer设置
e.g wget --debug --referer "www.baidu.com/dsadsa"
www.baidu.com/index.html
Ta的文章
更多
>>
嵌入式 Wget使用一点方法
0 个评论
热门文章
×
关闭
举报内容
检举类型
检举内容
检举用户
检举原因
广告推广
恶意灌水
回答内容与提问无关
抄袭答案
其他
检举说明(必填)
提交
关闭
×
打开微信“扫一扫”,打开网页后点击屏幕右上角分享按钮