工具_curl

  • post

curl -d "user=nickwolfe&password=12345" http://www.yahoo.com/login.cgi

 

curl -d@"/home/lin_jianke/json.txt" "http://"

 

  • 保存到文件:

curl -o baidu.html "http://www.baidu.com"

 

  • Header

 

curl -H"Authorization: 1e058e2471b07678b01a0ba36bbcdb51" -H"Content-Type: application/json" "http://192.168.1.131:8080/browseTitleServer/api/title/browse/json?id=1"

 

  • 代理

curl -x 192.168.200.253:3128 "http://www.facebook.com/home.php"

 

  • cookie

$ curl -x 123.45.67.89:1080 -o page.html -D cookie0001.txt http://www.linuxidc.com

这样,当页面被存到page.html的同时,cookie信息也被存到了cookie0001.txt里面了

 

 

这次我们使用这个option来把上次的cookie信息追加到http request里面去: -b

$ curl -x 123.45.67.89:1080 -o page1.html -D cookie0002.txt -b cookie0001.txt http://www.linuxidc.com

 

 

  • 保存文件

$ curl -O http://cgi2.tky.3web.ne.jp/~zzh/screen1.JPG

 

这样,就可以按照服务器上的文件名,自动存在本地了!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值