Native Environment
Windows 7
Method/Steps1, Access to the website
Https://curl.haxx.se/download/?C=M;O=D website
2, depending on the number of bits of your operating system and whether you needSsldownload the appropriate version.
Download curl-7.33.0-win64-ssl-sspi.zip hereand unzip to the directory where you need to use the Curl command after the download is complete . Here for the convenience of my first direct decompression to the current directory.
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7F/00/wKioL1cPdn_yMnUvAAF57hPQxaI487.png "style=" float: none; "title=" Qq20160414184729.png "alt=" Wkiol1cpdn_ymnuvaaf57hpqxai487.png "/>
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7F/02/wKiom1cPdcfQ_8saAABgDegr2b4246.png "style=" float: none; "title=" Qq20160414184758.png "alt=" Wkiom1cpdcfq_8saaabgdegr2b4246.png "/>
3, open Run this command in this window
"The system environment variable is not established, so you can only run it in this directory" to detect if it works
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7F/02/wKiom1cPdciw-phZAABVMl-NKpg216.png "style=" float: none; "title=" Qq20160414184807.png "alt=" Wkiom1cpdciw-phzaabvml-nkpg216.png "/>
Attention:
Get the " Open command Window here " above (W) ", use your keyboard shift+ Right mouse button
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7F/00/wKioL1cPdoCQ2ihTAABuUXyq8UM685.png "style=" float: none; "title=" Qq20160414184814.png "alt=" Wkiol1cpdocq2ihtaabuuxyq8um685.png "/>
C:\common_command>curl -v -x options https://www.baidu.com/ *adding handle: conn: 0x205e100*adding handle: send: 0*adding handle: recv: 0*curl_ addhandletopipeline: length: 1* -conn 0 (0x205e100) send_pipe: 1, recv _pipe: 0*about to connect () to www.baidu.com port 443 (#0) * Trying 220.181.112.244...* Connectedto www.baidu.com (220.181.112.244) port 443 (#0) *sslv3, tls handshake, client hello (1):* SSLv3, TLS handshake, server hello (2):* sslv3, tls handshake, cert (one):* SSLv3, tls alert, server hello (2):* SSLcertificate problem: unable to Get local issuer certificate*closing connection 0curl: ( SSL certificate) problem: unable to get local issuer certificatemoredetails here: http://curl.haxx.se/ docs/sslcerts.html curlperforms ssl certificate verification by default, using a "Bundle" of Certificate Authority (CA) public keys ( CAcerts). if the default bundle file isn ' T adequate, you can specify analternate file using the --cacert option. ifthis https server uses a certificate signed by a ca Represented in the bundle, the certificate verificationprobably failed due to a problem with the certificate (it might beexpired, or the name might not match the domain name in the url). Ifyou ' D like to turn off curL ' s verification of the certificate, use the -k (or --insecure) option. C:\common_command>
4, adding system environment variables
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7F/00/wKioL1cPdoCB4vh-AAEariMrFRM014.png "style=" float: none; "title=" Qq20160414184826.png "alt=" Wkiol1cpdocb4vh-aaearimrfrm014.png "/>
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7F/02/wKiom1cPdcmSfyERAABmN29lbWg804.png "style=" float: none; "title=" Qq20160414184834.png "alt=" Wkiom1cpdcmsfyeraabmn29lbwg804.png "/>
the difference between a user variable and a system variable:
A: User variable: The environment variable is valid after the user logs on.
system variable: refers to any user who logs on to the system, and the environment variable is valid.
How to use: to determine whether the environment variable is sensitive or whether there are user restrictions, if not configured in the system variables, otherwise, according to the sensitivity or restrictions on the configuration of the user's environment variables, is conducive to security.
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7F/00/wKioL1cPdoGjFZ8cAACJox4vms0305.png "style=" float: none; "title=" Qq20160414184842.png "alt=" Wkiol1cpdogjfz8caacjox4vms0305.png "/>
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7F/02/wKiom1cPdcmRv6dzAACIg0oacUc551.png "style=" float: none; "title=" Qq20160414184849.png "alt=" Wkiom1cpdcmrv6dzaacig0oacuc551.png "/>
5, under other paths, to test whether you can use theCURLCommand
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7F/00/wKioL1cPdoHB9jMFAADhAjWo5mU688.png "style=" float: none; "title=" Qq20160414184855.png "alt=" Wkiol1cpdohb9jmfaadhajwo5mu688.png "/>
Success!
6, the command is commonly used
For:
1. To see which HTTP requests the site can allow "frequently used:GET, HEAD, Post,put, DELETE, OPTIONS"
we often don't want to have PUT and DELETE requests, if any, need to be closed because of the vulnerability to security issues.
[[Email protected] ~]$ curl -v -x options https://www.aliyun.com/*about to connect () to www.aliyun.com port 443 (#0) * trying 42.156.220.114... connected*Connected to www.aliyun.com (42.156.220.114) port 443 (#0) *initializing nss with certpath: sql:/etc/pki/nssdb* Cafile: /etc/pki/tls/certs/ca-bundle.crt capath: none* sslconnection using tls_rsa_with_aes_128_cbc_sha*server certificate:* subject: cn=*.aliyun.com,o= "Alibaba (China) technology co., ltd.", l=hangzhou,st=zhejiang,c=cn* start date: 12 Month 14 10:47:07 2015 gmt* expire date: 12 Month 14 10:39:17 2016 gmt* common name: *.aliyun.com* issuer: cn= globalsign organizationvalidation ca - g2,o=globalsign nv-sa,c=be>options / HTTP/1.1>User-Agent: curl/7.19.7 (X86_64-REDHAT-LINUX-GNU) libcurl/7.19.7 nss/ 3.19.1basic ecc zlib/1.2.3 libidn/1.18 libssh2/1.4.2>host: www.aliyun.com> accept: */*>
See also:Windows under install using the Curl command
This article is from the "personal blog" blog, please be sure to keep this source http://9410445.blog.51cto.com/9400445/1763891
Windows installation using the Curl command