Linux/curl:修订间差异
来自康健生活
< Linux
创建页面,内容为“== 标题文字 == {{shc|<syntaxhighlight lang="bash"> curl -v IP地址</syntaxhighlight>|$|/home/kangkk}}” |
|||
| 第2行: | 第2行: | ||
{{shc|<syntaxhighlight lang="bash"> | {{shc|<syntaxhighlight lang="bash"> | ||
curl -v IP地址</syntaxhighlight>|$|/home/kangkk}} | curl -v IP地址</syntaxhighlight>|$|/home/kangkk}} | ||
== 命令 == | |||
{{Shc_out|<syntaxhighlight lang="bash"> | |||
curl -i -v https://www.baidu.com | |||
</syntaxhighlight>|<syntaxhighlight lang="bash">* Trying 220.181.38.149... | |||
* TCP_NODELAY set | |||
* Connected to www.baidu.com (220.181.38.149) port 443 (#0) | |||
* ALPN, offering h2 | |||
* ALPN, offering http/1.1 | |||
* successfully set certificate verify locations: | |||
* CAfile: /etc/ssl/cert.pem | |||
CApath: none | |||
* TLSv1.2 (OUT), TLS handshake, Client hello (1): | |||
* TLSv1.2 (IN), TLS handshake, Server hello (2): | |||
* TLSv1.2 (IN), TLS handshake, Certificate (11): | |||
* TLSv1.2 (IN), TLS handshake, Server key exchange (12): | |||
* TLSv1.2 (IN), TLS handshake, Server finished (14): | |||
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16): | |||
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1): | |||
* TLSv1.2 (OUT), TLS handshake, Finished (20): | |||
* TLSv1.2 (IN), TLS change cipher, Change cipher spec (1): | |||
* TLSv1.2 (IN), TLS handshake, Finished (20): | |||
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 | |||
* ALPN, server accepted to use http/1.1 | |||
* Server certificate: | |||
* subject: C=CN; ST=beijing; L=beijing; OU=service operation department; O=Beijing Baidu Netcom Science Technology Co., Ltd; CN=baidu.com | |||
* start date: Jul 1 01:16:03 2021 GMT | |||
* expire date: Aug 2 01:16:03 2022 GMT | |||
* subjectAltName: host "www.baidu.com" matched cert's "*.baidu.com" | |||
* issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign Organization Validation CA - SHA256 - G2 | |||
* SSL certificate verify ok. | |||
> GET / HTTP/1.1 | |||
> Host: www.baidu.com | |||
> User-Agent: curl/7.64.1 | |||
> Accept: */* | |||
> | |||
< HTTP/1.1 200 OK | |||
HTTP/1.1 200 OK | |||
< Accept-Ranges: bytes | |||
Accept-Ranges: bytes | |||
< Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform | |||
Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform | |||
< Connection: keep-alive | |||
Connection: keep-alive | |||
< Content-Length: 2443 | |||
Content-Length: 2443 | |||
< Content-Type: text/html | |||
Content-Type: text/html | |||
< Date: Thu, 02 Dec 2021 14:56:45 GMT | |||
Date: Thu, 02 Dec 2021 14:56:45 GMT | |||
< Etag: "588603eb-98b" | |||
Etag: "588603eb-98b" | |||
< Last-Modified: Mon, 23 Jan 2017 13:23:55 GMT | |||
Last-Modified: Mon, 23 Jan 2017 13:23:55 GMT | |||
< Pragma: no-cache | |||
Pragma: no-cache | |||
< Server: bfe/1.0.8.18 | |||
Server: bfe/1.0.8.18 | |||
< Set-Cookie: BDORZ=27315; max-age=86400; domain=.baidu.com; path=/ | |||
Set-Cookie: BDORZ=27315; max-age=86400; domain=.baidu.com; path=/ | |||
< | |||
<!DOCTYPE html> | |||
<!--STATUS OK--><html> <head><meta http-equiv=content-type content=text/html;charset=utf-8><meta http-equiv=X-UA-Compatible content=IE=Edge><meta content=always name=referrer><link rel=stylesheet type=text/css href=https://ss1.bdstatic.com/5eN1bjq8AAUYm2zgoY3K/r/www/cache/bdorz/baidu.min.css><title>百度一下,你就知道</title></head> <body link=#0000cc> <div id=wrapper> <div id=head> <div class=head_wrapper> <div class=s_form> <div class=s_form_wrapper> <div id=lg> <img hidefocus=true src=//www.baidu.com/img/bd_logo1.png width=270 height=129> </div> <form id=form name=f action=//www.baidu.com/s class=fm> <input type=hidden name=bdorz_come value=1> <input type=hidden name=ie value=utf-8> <input type=hidden name=f value=8> <input type=hidden name=rsv_bp value=1> <input type=hidden name=rsv_idx value=1> <input type=hidden name=tn value=baidu><span class="bg s_ipt_wr"><input id=kw name=wd class=s_ipt value maxlength=255 autocomplete=off autofocus=autofocus></span><span class="bg s_btn_wr"><input type=submit id=su value=百度一下 class="bg s_btn" autofocus></span> </form> </div> </div> <div id=u1> <a href=http://news.baidu.com name=tj_trnews class=mnav>新闻</a> <a href=https://www.hao123.com name=tj_trhao123 class=mnav>hao123</a> <a href=http://map.baidu.com name=tj_trmap class=mnav>地图</a> <a href=http://v.baidu.com name=tj_trvideo class=mnav>视频</a> <a href=http://tieba.baidu.com name=tj_trtieba class=mnav>贴吧</a> <noscript> <a href=http://www.baidu.com/bdorz/login.gif?login&tpl=mn&u=http%3A%2F%2Fwww.baidu.com%2f%3fbdorz_come%3d1 name=tj_login class=lb>登录</a> </noscript> <script>document.write('<a href="http://www.baidu.com/bdorz/login.gif?login&tpl=mn&u='+ encodeURIComponent(window.location.href+ (window.location.search === "" ? "?" : "&")+ "bdorz_come=1")+ '" name="tj_login" class="lb">登录</a>'); | |||
</script> <a href=//www.baidu.com/more/ name=tj_briicon class=bri style="display: block;">更多产品</a> </div> </div> </div> <div id=ftCon> <div id=ftConw> <p id=lh> <a href=http://home.baidu.com>关于百度</a> <a href=http://ir.baidu.com>About Baidu</a> </p> <p id=cp>©2017 Baidu <a href=http://www.baidu.com/duty/>使用百度前必读</a> <a href=http://jianyi.baidu.com/ class=cp-feedback>意见反馈</a> 京ICP证030173号 <img src=//www.baidu.com/img/gs.gif> </p> </div> </div> </div> </body> </html> | |||
* Connection #0 to host www.baidu.com left intact | |||
* Closing connection 0</syntaxhighlight>|$|/home/kangkk}} | |||
2021年12月2日 (四) 16:00的版本
标题文字
/home/kangkk
curl -v IP地址
命令
[jian@kang /home/kangkk]$
curl -i -v https://www.baidu.com
* Trying 220.181.38.149...
* TCP_NODELAY set
* Connected to www.baidu.com (220.181.38.149) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: C=CN; ST=beijing; L=beijing; OU=service operation department; O=Beijing Baidu Netcom Science Technology Co., Ltd; CN=baidu.com
* start date: Jul 1 01:16:03 2021 GMT
* expire date: Aug 2 01:16:03 2022 GMT
* subjectAltName: host "www.baidu.com" matched cert's "*.baidu.com"
* issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign Organization Validation CA - SHA256 - G2
* SSL certificate verify ok.
> GET / HTTP/1.1
> Host: www.baidu.com
> User-Agent: curl/7.64.1
> Accept: */*
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Accept-Ranges: bytes
Accept-Ranges: bytes
< Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform
Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform
< Connection: keep-alive
Connection: keep-alive
< Content-Length: 2443
Content-Length: 2443
< Content-Type: text/html
Content-Type: text/html
< Date: Thu, 02 Dec 2021 14:56:45 GMT
Date: Thu, 02 Dec 2021 14:56:45 GMT
< Etag: "588603eb-98b"
Etag: "588603eb-98b"
< Last-Modified: Mon, 23 Jan 2017 13:23:55 GMT
Last-Modified: Mon, 23 Jan 2017 13:23:55 GMT
< Pragma: no-cache
Pragma: no-cache
< Server: bfe/1.0.8.18
Server: bfe/1.0.8.18
< Set-Cookie: BDORZ=27315; max-age=86400; domain=.baidu.com; path=/
Set-Cookie: BDORZ=27315; max-age=86400; domain=.baidu.com; path=/
<
<!DOCTYPE html>
<!--STATUS OK--><html> <head><meta http-equiv=content-type content=text/html;charset=utf-8><meta http-equiv=X-UA-Compatible content=IE=Edge><meta content=always name=referrer><link rel=stylesheet type=text/css href=https://ss1.bdstatic.com/5eN1bjq8AAUYm2zgoY3K/r/www/cache/bdorz/baidu.min.css><title>百度一下,你就知道</title></head> <body link=#0000cc> <div id=wrapper> <div id=head> <div class=head_wrapper> <div class=s_form> <div class=s_form_wrapper> <div id=lg> <img hidefocus=true src=//www.baidu.com/img/bd_logo1.png width=270 height=129> </div> <form id=form name=f action=//www.baidu.com/s class=fm> <input type=hidden name=bdorz_come value=1> <input type=hidden name=ie value=utf-8> <input type=hidden name=f value=8> <input type=hidden name=rsv_bp value=1> <input type=hidden name=rsv_idx value=1> <input type=hidden name=tn value=baidu><span class="bg s_ipt_wr"><input id=kw name=wd class=s_ipt value maxlength=255 autocomplete=off autofocus=autofocus></span><span class="bg s_btn_wr"><input type=submit id=su value=百度一下 class="bg s_btn" autofocus></span> </form> </div> </div> <div id=u1> <a href=http://news.baidu.com name=tj_trnews class=mnav>新闻</a> <a href=https://www.hao123.com name=tj_trhao123 class=mnav>hao123</a> <a href=http://map.baidu.com name=tj_trmap class=mnav>地图</a> <a href=http://v.baidu.com name=tj_trvideo class=mnav>视频</a> <a href=http://tieba.baidu.com name=tj_trtieba class=mnav>贴吧</a> <noscript> <a href=http://www.baidu.com/bdorz/login.gif?login&tpl=mn&u=http%3A%2F%2Fwww.baidu.com%2f%3fbdorz_come%3d1 name=tj_login class=lb>登录</a> </noscript> <script>document.write('<a href="http://www.baidu.com/bdorz/login.gif?login&tpl=mn&u='+ encodeURIComponent(window.location.href+ (window.location.search === "" ? "?" : "&")+ "bdorz_come=1")+ '" name="tj_login" class="lb">登录</a>');
</script> <a href=//www.baidu.com/more/ name=tj_briicon class=bri style="display: block;">更多产品</a> </div> </div> </div> <div id=ftCon> <div id=ftConw> <p id=lh> <a href=http://home.baidu.com>关于百度</a> <a href=http://ir.baidu.com>About Baidu</a> </p> <p id=cp>©2017 Baidu <a href=http://www.baidu.com/duty/>使用百度前必读</a> <a href=http://jianyi.baidu.com/ class=cp-feedback>意见反馈</a> 京ICP证030173号 <img src=//www.baidu.com/img/gs.gif> </p> </div> </div> </div> </body> </html>
* Connection #0 to host www.baidu.com left intact
* Closing connection 0
No categories