wget使用方法(some)
2014-04-13 21:18
459 查看
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 –h6 –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 -ologfile8 referer设置
e.g wget --debug --referer "www.baidu.com/dsadsa"www.baidu.com/index.html
相关文章推荐
- TCP版backshell的VBS脚本代码
- TCP Wrappers防火墙介绍与封锁IP地址的方法
- c语言多进程tcp服务器示例
- win2003连接限制TCP连接限制
- Android TCP 文件客户端与服务器DEMO介绍
- 实现了基于TCP的Java Socket编程实例代码
- 基于JAVA中Jersey处理Http协议中的Multipart的详解
- [源码分享]Erlang TCP 服务器代码
- 用命令巧看Vista的TCP/IP连接数
- tcp-ip-状态详解
- TCP 接收窗口自动调节
- TCP/IP的三次握手连接和四次握手关闭
- TCP三次握手/四次挥手详解
- TCP传输连接建立与释放详解
- tcp socket的发送与接收缓冲区
- 重新安装tcp/ip
- 查看Apache并发请求数及其TCP连接状态及用tcpdump来收集ip的访问量
- DNS什么时候用UDP什么时候用TCP来传输解释
- TCP三次握手及四次挥手详解
- TCP/IP经典基础知识