httpTool
@ Zhang zhiyang · Monday, Jan 1, 0001 · 1 minute read · Update at Monday, Jan 1, 0001

0x00 curl

参数 说明 示例
-A 设置user-agent curl -A “Chrome” http://www.baidu.com
-X 用指定方法请求 curl -X POST http://httpbin.org/post
-I 只返回请求的头信息
-d 以POST方法请求url,并发送相应的参数 -d a=1 -d b=2 -d c=3
-d “a=1&b=2&c=3”
-d @filename
-O 下载文件并以远程的文件名保存
-o 下载文件并以指定的文件名保存 curl -o fox.jpeg http://httpbin.org/image/jpeg
-L 跟随重定向请求 curl -IL https://baidu.com
-H 设置头信息 curl -o image.webp -H “accept:image/webp” http://httpbin.org/image
-k 允许发起不安全的SSL请求
-b 设置cookies curl -b a=test http://httpbin.org/cookies
-s 不显示其他无关信息
-v 显示连接过程中的所有信息
# 自定义一个命令,查看本机外网IP
alias myip="curl http://httpbin.org/get|grep -E '\d+'|grep -v User-Agent|cut -d '\"' -f4"

0x01 wget

A B C
-O 以指定文件名保存下载的文件 wget -O test.png http://httpbin.org/image/png
–limit-rate 以指定的速度下载目标文件 –limit-rate=200k
-c 断点续传
-b 后台下载
-U 设置User-Agent wget -U “Chrome” http://httpbin.org/image/png
–mirror 镜像某个目标网站
-p 下载页面中的所有相关资源
-r 递归下载所有网页中所有的链接
# 镜像下载整个网站并保存到本地
wget -c --mirror -U "Mozilla" -p --convert-links http://docs.python-requests.org
http
Save as image
Zhang zhiyang's blog
不过是些许风霜罢了
c cyber http linux math mysql php python 前端

© 2016 - 2022 Zhangzhiyang的博客

Powered by Hugo with theme Dream.

我听别人说这世界上有一种鸟是没有脚的,它只能够一直的飞呀飞呀,飞累了就在风里面睡觉,这种鸟一辈子只能下地一次,那一次就是它死亡的时候。

日程

Zhangzhiyang的 ❤️ 博客

其他

如果你喜欢我的开源项目或者它们可以给你带来帮助,可以赏一杯咖啡 ☕ 给我。~

If you like my open source projects or they can help you. You can buy me a coffee ☕.~

PayPal

https://paypal.me/g1eny0ung

Patreon

Become a Patron!

微信赞赏码

wechat

最好附加一下信息或者留言,方便我可以将捐助记录 📝 下来,十分感谢 🙏。

It is better to attach some information or leave a message so that I can record the donation 📝, thank you very much 🙏.