2024年最新安全工具-curl学习_--tls-max(1),成功拿到offer

Directory to save files in

-Z, --parallel Perform transfers in parallel

–parallel-immediate Do not wait for multiplexing (with --parallel)

–parallel-max Maximum concurrency for parallel transfers

–pass Pass phrase for the private key

–path-as-is Do not squash … sequences in URL path

–pinnedpubkey FILE/HASHES Public key to verify peer against

–post301 Do not switch to GET after following a 301

–post302 Do not switch to GET after following a 302

–post303 Do not switch to GET after following a 303

–preproxy [protocol://]host[:port] Use this proxy first

-#, --progress-bar Display transfer progress as a bar

–proto Enable/disable PROTOCOLS

–proto-default Use PROTOCOL for any URL missing a scheme

–proto-redir Enable/disable PROTOCOLS on redirect

-x, --proxy [protocol://]host[:port] Use this proxy

–proxy-anyauth Pick any proxy authentication method

–proxy-basic Use Basic authentication on the proxy

–proxy-cacert CA certificate to verify peer against for proxy

–proxy-capath

CA directory to verify peer against for proxy

–proxy-cert <cert[:passwd]> Set client certificate for proxy

–proxy-cert-type Client certificate type for HTTPS proxy

–proxy-ciphers SSL ciphers to use for proxy

–proxy-crlfile Set a CRL list for proxy

–proxy-digest Use Digest authentication on the proxy

–proxy-header
header/@file Pass custom header(s) to proxy

–proxy-insecure Do HTTPS proxy connections without verifying the proxy

–proxy-key Private key for HTTPS proxy

–proxy-key-type Private key file type for proxy

–proxy-negotiate Use HTTP Negotiate (SPNEGO) authentication on the proxy

–proxy-ntlm Use NTLM authentication on the proxy

–proxy-pass Pass phrase for the private key for HTTPS proxy

–proxy-pinnedpubkey FILE/HASHES public key to verify proxy with

–proxy-service-name SPNEGO proxy service name

–proxy-ssl-allow-beast Allow security flaw for interop for HTTPS proxy

–proxy-ssl-auto-client-cert Use auto client certificate for proxy (Schannel)

–proxy-tls13-ciphers TLS 1.3 proxy cipher suites

–proxy-tlsauthtype TLS authentication type for HTTPS proxy

–proxy-tlspassword TLS password for HTTPS proxy

–proxy-tlsuser TLS username for HTTPS proxy

–proxy-tlsv1 Use TLSv1 for HTTPS proxy

-U, --proxy-user
user:password Proxy user and password

–proxy1.0 <host[:port]> Use HTTP/1.0 proxy on given port

-p, --proxytunnel Operate through an HTTP proxy tunnel (using CONNECT)

–pubkey SSH Public key file name

-Q, --quote Send command(s) to server before transfer

–random-file File for reading random data from

-r, --range Retrieve only the bytes within RANGE

–raw Do HTTP “raw”; no transfer decoding

-e, --referer Referrer URL

-J, --remote-header-name Use the header-provided filename

-O, --remote-name Write output to a file named as the remote file

–remote-name-all Use the remote file name for all URLs

-R, --remote-time Set the remote file’s time on the local output

-X, --request Specify request command to use

–request-target

Specify the target for this request

–resolve <[+]host:port:addr[,addr]…> Resolve the host+port to this address

–retry Retry request if transient problems occur

–retry-all-errors Retry all errors (use with --retry)

–retry-connrefused Retry on connection refused (use with --retry)

–retry-delay Wait time between retries

–retry-max-time Retry only within this period

–sasl-authzid Identity for SASL PLAIN authentication

–sasl-ir Enable initial response in SASL authentication

–service-name SPNEGO service name

-S, --show-error Show error even when -s is used

-s, --silent Silent mode

–socks4 <host[:port]> SOCKS4 proxy on given host + port

–socks4a <host[:port]> SOCKS4a proxy on given host + port

–socks5 <host[:port]> SOCKS5 proxy on given host + port

–socks5-basic Enable username/password auth for SOCKS5 proxies

–socks5-gssapi Enable GSS-API auth for SOCKS5 proxies

–socks5-gssapi-nec Compatibility with NEC SOCKS5 server

–socks5-gssapi-service SOCKS5 proxy service name for GSS-API

–socks5-hostname <host[:port]> SOCKS5 proxy, pass host name to proxy

-Y, --speed-limit Stop transfers slower than this

-y, --speed-time Trigger ‘speed-limit’ abort after this time

–ssl Try SSL/TLS

–ssl-allow-beast Allow security flaw to improve interop

–ssl-auto-client-cert Use auto client certificate (Schannel)

–ssl-no-revoke Disable cert revocation checks (Schannel)

–ssl-reqd Require SSL/TLS

–ssl-revoke-best-effort Ignore missing/offline cert CRL dist points

-2, --sslv2 Use SSLv2

-3, --sslv3 Use SSLv3

–stderr Where to redirect stderr

–styled-output Enable styled output for HTTP headers

–suppress-connect-headers Suppress proxy CONNECT response headers

–tcp-fastopen Use TCP Fast Open

–tcp-nodelay Use the TCP_NODELAY option

-t, --telnet-option <opt=val> Set telnet option

–tftp-blksize Set TFTP BLKSIZE option

–tftp-no-options Do not send any TFTP options

-z, --time-cond
Transfer based on a time condition
–tls-max Set maximum allowed TLS version
–tls13-ciphers TLS 1.3 cipher suites to use
–tlsauthtype TLS authentication type
–tlspassword TLS password
–tlsuser TLS user name
-1, --tlsv1 Use TLSv1.0 or greater
–tlsv1.0 Use TLSv1.0 or greater
–tlsv1.1 Use TLSv1.1 or greater
–tlsv1.2 Use TLSv1.2 or greater
–tlsv1.3 Use TLSv1.3 or greater
–tr-encoding Request compressed transfer encoding
–trace Write a debug trace to FILE
–trace-ascii Like --trace, but without hex output
–trace-time Add time stamps to trace/verbose output
–unix-socket

Connect through this Unix domain socket

-T, --upload-file Transfer local FILE to destination

–url URL to work with

-B, --use-ascii Use ASCII/text transfer

-u, --user
user:password Server user and password

-A, --user-agent Send User-Agent to server

-v, --verbose Make the operation more talkative

-V, --version Show version number and quit

-w, --write-out Use output FORMAT after completion

–xattr Store metadata in extended file attributes


通过curl --help all帮助命令,我们可以看到所有的选项,这里学几个常用的选项


## 无选项


### 命令




curl http://httpbin.org


### 结果


**命令行结果**  
 ![在这里插入图片描述](https://img-blog.csdnimg.cn/9fdd048349984bf2b1b023c6364f80e3.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAbGFkeV9raWxsZXI5,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center)  
 可以看到返回了html页面  
 **wireshark抓包结果**  
 ![在这里插入图片描述](https://img-blog.csdnimg.cn/e7f30b0138a844ce9a3f58f8b8fb26fd.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAbGFkeV9raWxsZXI5,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center)  
 可以看到curl发送了一个HTTP1.1的GET请求,添加了请求头HOST、User-Agent和Accept。其中User-Agent是版本。  
 ![在这里插入图片描述](https://img-blog.csdnimg.cn/83934af121d24c6cb8bf06a1c9fd4fa5.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAbGFkeV9raWxsZXI5,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center)  
 可以看到httpbin.org的响应包含了头部和数据,数据就是curl显示的html页面代码。那么头部curl如何显示呢?请继续阅读。


## 请求头


### 仅显示返回的头部


-I选项


#### 命令




curl http://httpbin.org -I


#### 结果


![在这里插入图片描述](https://img-blog.csdnimg.cn/fe9c58cb3d774d50ba7d9270c13a702d.png#pic_center)  
 可以看到仅显示了头部


### 保存返回的头部




-D


#### 命令




curl http://httpbin.org -D recv_head.txt


#### 结果


![在这里插入图片描述](https://img-blog.csdnimg.cn/67d207be50054f82b0074fc5dd294d00.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAbGFkeV9raWxsZXI5,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center)  
 可以看到添加了将返回数据包的头部保存到E盘下recv\_head.txt文件的选项,打开文件  
 ![在这里插入图片描述](https://img-blog.csdnimg.cn/c880fe21746746f2b6c25866a9fc1261.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAbGFkeV9raWxsZXI5,size_10,color_FFFFFF,t_70,g_se,x_16#pic_center)  
 可以看到和前面抓包的结果一样。


### 添加请求头




-H header/@file


请求头使用key: value的形式


#### 命令




curl -H “blog: lady_killer9” -H “User-Agent: firefox” http://httpbin.org


#### 结果


![在这里插入图片描述](https://img-blog.csdnimg.cn/bfe4ff5aa7dc45a4b3ee720a5be2d34f.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAbGFkeV9raWxsZXI5,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center)  
 ![在这里插入图片描述](https://img-blog.csdnimg.cn/6b62fa43b57948f58a63c299de8f90e4.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAbGFkeV9raWxsZXI5,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center)  
 可以看到覆盖了自带的User-Agent,添加了新的请求头部blog


### 覆盖User-Agent的值


UserAgent是经常用的,可以使用-A直接替换value




-A


#### 命令




curl -A chrome http://httpbin.org


#### 结果


![在这里插入图片描述](https://img-blog.csdnimg.cn/e9ea0f8ebd554aafb2fd2c5d47b040ae.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAbGFkeV9raWxsZXI5,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center)  
 ![在这里插入图片描述](https://img-blog.csdnimg.cn/7f51cad7ae0a4e58abc55958ea3c5017.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAbGFkeV9raWxsZXI5,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center)  
 可以看到User-Agent修改了


## GET请求


默认发送的就是GET请求,这里说一下如何添加参数。一般在url上使用?添加参数即可,注意,如果不转义的话,使用双引号。  
 ![在这里插入图片描述](https://img-blog.csdnimg.cn/d108a618106542198ba5094d3b225124.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAbGFkeV9raWxsZXI5,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center)  
 ![在这里插入图片描述](https://img-blog.csdnimg.cn/aa1960c054124dd88085b1da0f708197.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAbGFkeV9raWxsZXI5,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center)  
 也可以使用-G选项配合-d选项添加  
 ![在这里插入图片描述](https://img-blog.csdnimg.cn/62ba8e2df2074831860db5c19d1848cb.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAbGFkeV9raWxsZXI5,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center)  
 ![在这里插入图片描述](https://img-blog.csdnimg.cn/79967585ef224f1b8fee49548bdb93bd.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAbGFkeV9raWxsZXI5,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center)


## POST请求


-X指定请求,-d添加数据




-X
-d


#### 表单




## 最后

**自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。**

**深知大多数网络安全工程师,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!**

**因此收集整理了一份《2024年网络安全全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友。**

![img](https://img-blog.csdnimg.cn/img_convert/db53d310ca691a9f7bd0c8393defa91b.png)

![img](https://img-blog.csdnimg.cn/img_convert/e2b823a5b5ff2ef1f1f736f326368ce6.png)

![img](https://img-blog.csdnimg.cn/img_convert/1c50969eb6ba41d289e89d42d319343c.png)

![img](https://img-blog.csdnimg.cn/img_convert/3702348e753bc878862e2eeb9884ee2e.png)

![img](https://img-blog.csdnimg.cn/img_convert/05fec3848b5ddd3df28c5c8d00a163e1.png)

 

**既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上网络安全知识点!真正的体系化!**

[**如果你觉得这些内容对你有帮助,需要这份全套学习资料的朋友可以戳我获取!!**](https://bbs.csdn.net/topics/618653875)

**由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且会持续更新!**

从何学起的朋友。**

[外链图片转存中...(img-ketZGDQr-1715439511037)]

[外链图片转存中...(img-v9hzZC9F-1715439511038)]

[外链图片转存中...(img-5CH5eYQM-1715439511038)]

[外链图片转存中...(img-OIKy3wJ1-1715439511038)]

[外链图片转存中...(img-muyuaTS0-1715439511039)]

 

**既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上网络安全知识点!真正的体系化!**

[**如果你觉得这些内容对你有帮助,需要这份全套学习资料的朋友可以戳我获取!!**](https://bbs.csdn.net/topics/618653875)

**由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且会持续更新!**

  • 20
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值