windows - 在 Windows 上抑制 schannel 输出
问题描述
我已经使用 cURL 有一段时间了,虽然不经常升级可执行文件。我注意到在 v7.60 中,当-v
用于获取标题时,我会* schannel:
在提示符中收到少量消息,因此它是这样的:
$ curl -vs "https://example.com"
* Rebuilt URL to: https://example.com/
* Trying 93.184.216.34...
* TCP_NODELAY set
* Connected to example.com (93.184.216.34) port 443 (#0)
* schannel: SSL/TLS connection with example.com port 443 (step 1/3)
* schannel: checking server certificate revocation
* schannel: sending initial handshake data: sending 176 bytes...
* schannel: sent initial handshake data: sent 176 bytes
* schannel: SSL/TLS connection with example.com port 443 (step 2/3)
* schannel: failed to receive handshake, need more data
* schannel: SSL/TLS connection with example.com port 443 (step 2/3)
* schannel: encrypted data got 4096
* schannel: encrypted data buffer: offset 4096 length 4096
* schannel: encrypted data length: 14
* schannel: encrypted data buffer: offset 14 length 4096
* schannel: received incomplete message, need more data
* schannel: SSL/TLS connection with example.com port 443 (step 2/3)
* schannel: encrypted data got 817
* schannel: encrypted data buffer: offset 831 length 4096
* schannel: sending next handshake data: sending 126 bytes...
* schannel: SSL/TLS connection with example.com port 443 (step 2/3)
* schannel: encrypted data got 242
* schannel: encrypted data buffer: offset 242 length 4096
* schannel: SSL/TLS handshake complete
* schannel: SSL/TLS connection with example.com port 443 (step 3/3)
* schannel: stored credential handle in session cache
> GET / HTTP/1.1
> Host: example.com
> User-Agent: curl/7.60.0
> Accept: */*
>
* schannel: client wants to read 102400 bytes
* schannel: encdata_buffer resized 103424
* schannel: encrypted data buffer: offset 0 length 103424
* schannel: encrypted data got 1666
* schannel: encrypted data buffer: offset 1666 length 103424
* schannel: decrypted data length: 338
* schannel: decrypted data added: 338
* schannel: decrypted data cached: offset 338 length 102400
* schannel: encrypted data length: 1299
* schannel: encrypted data cached: offset 1299 length 103424
* schannel: decrypted data length: 1270
* schannel: decrypted data added: 1270
* schannel: decrypted data cached: offset 1608 length 102400
* schannel: encrypted data buffer: offset 0 length 103424
* schannel: decrypted data buffer: offset 1608 length 102400
* schannel: schannel_recv cleanup
* schannel: decrypted data returned 1608
* schannel: decrypted data buffer: offset 0 length 102400
< HTTP/1.1 200 OK
< Accept-Ranges: bytes
< Cache-Control: max-age=604800
< Content-Type: text/html; charset=UTF-8
< Date: Tue, 05 Feb 2019 08:08:57 GMT
< Etag: "1541025663"
< Expires: Tue, 12 Feb 2019 08:08:57 GMT
< Last-Modified: Fri, 09 Aug 2013 23:54:35 GMT
< Server: ECS (dca/24C1)
< Vary: Accept-Encoding
< X-Cache: HIT
< Content-Length: 1270
<
[HTML here]
有没有办法抑制这些消息,以便-v
仍然产生标题,并且我可以> NUL
用来丢弃响应正文,所有这些都没有 SChannel 噪音?
为了避免明显的建议,-I
对我不起作用:我需要能够以这种方式发送和其他请求,因为我的工作涉及调查可以(并且已知)以不同GET
方式响应的第三方服务器。HEAD
解决方案
推荐阅读
- xamarin.forms - VS2019 Xamarin Forms Remote IOS模拟器黑屏 - 如何修复?
- sql - Oracle -- 根据 varchar 时间戳提取月度数据
- django - Unity Facebook SDK 登录,使用 Django 服务在 Chrome 上遇到 CORS/CORB 问题
- compilation - 如何为 GDB 的 JIT 代码生成 ELF 文件格式?
- javascript - setItems Acrobat Pro 的分层命名
- linux - 为什么 dlsym 为非 pie 可执行文件返回 PLT 条目?
- kubernetes - kube-prometheus-stack - Grafana 中的新仪表板
- android - 有没有办法在android studio中隐藏项目视图的一些模块
- django - Django Rest FrameWork 使用 group by 减少查询次数
- reactjs - 如何使用 JEST 模拟 Axios 服务包装器