OpenBSD 기본 도구를 사용하여 웹사이트에서 HTTPS 응답을 얻는 방법은 무엇입니까?

OpenBSD 기본 도구를 사용하여 웹사이트에서 HTTPS 응답을 얻는 방법은 무엇입니까?

curlwgetSuperior 와 같은 도구를 사용하면

나는 서버 응답을 얻는 "안전한" 방법을 원합니다(예:wikipedia.org) 도구를 사용하여 내 터미널에기본적으로 설치됩니다. 보안이란 응답이 일반 텍스트가 아니어야 하지만 HTTP/2 및 TLS 1.3/TLS 1.2(물론 서버가 지원하는 경우)와 같은 현재 표준을 사용하여 내 컴퓨터로 전송될 때 암호화되어야 함을 의미합니다.

답변1

헤더, 응답 코드 또는 TLS 프로토콜에 대한 세부 정보가 필요한지 여부를 지정할 필요가 없습니다.

이미 답변했듯이 스위치를 켜면 HTTP(S) 수준에 대한 많은 정보를 얻을 수 ftp있습니다 .-dftp

$ ftp -d -o /dev/null https://en.wikipedia.org
host en.wikipedia.org, port https, path , save as /dev/null, auth none.
Trying 91.198.174.192...
Requesting https://en.wikipedia.org
GET / HTTP/1.1
Connection: close
Host: en.wikipedia.org
User-Agent: OpenBSD ftp

received 'HTTP/1.1 301 Moved Permanently'
received 'Date: Thu, 03 Mar 2022 10:42:56 GMT'
received 'Server: mw1324.eqiad.wmnet'
received 'X-Content-Type-Options: nosniff'
received 'P3p: CP="See https://en.wikipedia.org/wiki/Special:CentralAutoLogin/P3P for more info."'
received 'Vary: Accept-Encoding,X-Forwarded-Proto,Cookie,Authorization'
received 'Cache-Control: s-maxage=1200, must-revalidate, max-age=0'
received 'Last-Modified: Thu, 03 Mar 2022 10:42:56 GMT'
received 'Location: https://en.wikipedia.org/wiki/Main_Page'
Redirected to https://en.wikipedia.org/wiki/Main_Page
host en.wikipedia.org, port https, path wiki/Main_Page, save as /dev/null, auth none.
Trying 91.198.174.192...
Requesting https://en.wikipedia.org/wiki/Main_Page
GET /wiki/Main_Page HTTP/1.1
Connection: close
Host: en.wikipedia.org
User-Agent: OpenBSD ftp

received 'HTTP/1.1 200 OK'
received 'Date: Thu, 03 Mar 2022 07:48:57 GMT'
received 'Server: mw1393.eqiad.wmnet'
received 'X-Content-Type-Options: nosniff'
received 'P3p: CP="See https://en.wikipedia.org/wiki/Special:CentralAutoLogin/P3P for more info."'
received 'Content-Language: en'
received 'Vary: Accept-Encoding,Cookie,Authorization'
received 'Last-Modified: Thu, 03 Mar 2022 07:48:56 GMT'
received 'Content-Type: text/html; charset=UTF-8'
received 'Age: 11005'
received 'X-Cache: cp3052 hit, cp3058 hit/120231'
received 'X-Cache-Status: hit-front'
received 'Server-Timing: cache;desc="hit-front", host;desc="cp3058"'
received 'Strict-Transport-Security: max-age=106384710; includeSubDomains; preload'
received 'Report-To: { "group": "wm_nel", "max_age": 86400, "endpoints": [{ "url": "https://intake-logging.wikimedia.org/v1/events?stream=w3c.reportingapi.network_error&schema_uri=/w3c/reportingapi/network_error/1.0.0" }] }'
received 'NEL: { "report_to": "wm_nel", "max_age": 86400, "failure_fraction": 0.05, "success_fraction": 0.0}'
received 'Permissions-Policy: interest-cohort=()'
received 'Set-Cookie: WMF-Last-Access=03-Mar-2022;Path=/;HttpOnly;secure;Expires=Mon, 04 Apr 2022 00:00:00 GMT'
received 'Set-Cookie: WMF-Last-Access-Global=03-Mar-2022;Path=/;Domain=.wikipedia.org;HttpOnly;secure;Expires=Mon, 04 Apr 2022 00:00:00 GMT'
received 'X-Client-IP: 148.69.164.57'
received 'Cache-Control: private, s-maxage=0, max-age=0, must-revalidate'
received 'Set-Cookie: GeoIP=PT:06:Coimbra:40.21:-8.42:v4; Path=/; secure; Domain=.wikipedia.org'
received 'Accept-Ranges: bytes'
received 'Content-Length: 84542'
received 'Connection: close'
100% |*******************************************************************************************************************************************************| 84542       00:00
84542 bytes received in 0.22 seconds (368.47 KB/s)

opensslTLS에 대한 더 구체적인 정보를 보려면 기본 시스템에도 있는 TLS를 사용하겠습니다 .

$ openssl s_client -connect en.wikipedia.org:443 < /dev/null

(...)

New, TLSv1/SSLv3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 256 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.3
    Cipher    : TLS_AES_256_GCM_SHA384
    Session-ID:
    Session-ID-ctx:
    Master-Key:
    Start Time: 1646305125
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
---
DONE

답변2

기본 도구는 ftpHTTP 및 HTTPS를 수행할 수 있습니다.

파일 전송 프로토콜https://ftp.openbsd.org/pub/OpenBSD/songs/song70.mp3

관련 정보