《Disney +》 迪士尼、Marvel、彼思、星球大戰…  像素版重製系列「最終幻想V」決定於11月11日發售!   DAEMON X MACHINA(機甲戰魔)登場Nintendo Switch試玩同樂會   ARPG 名作「伊蘇 VIII -丹娜的隕涕日-」於 Nintendo Switch 試玩同樂會隆重登場!   日本恐怖遊戲工作室Chilla’s Art最新作《The Night Way Home | 帰り道》將於8月7日發售   《Demon’s Souls》教會特技表演者的肢體動作二三事   在新的一年裡暢玩PS吧!PS Store「春季優惠」最低2折!   魔物獵人桌遊化?!桌遊版魔物獵人「魔物獵人 世界 The Board Game」隆重登場!   《熱血硬派》系列35週年紀念新企劃啟動! 

HTTPS 的 CLI (telnet) OpenSSL Client

商業

HTTP 於 CLI 的環境,想要連線測試,可以使用 telnet 來連線,例如下述:

  • $ telnet example.com 80
    GET / HTTP/1.1
    Host: example.com
  • $ telnet www.example.com 80
    GET / HTTP/1.1 Host: www.example.com
    User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)

於 HTTPS 的話要怎麼做呢?

HTTPS 的 CLI (telnet) OpenSSL Client

於 HTTPS 的話,telnet 使用如下:

  • $ telnet www.example.com 443
    GET / HTTP/1.1
  • 到此就會直接斷線,出 400 Bad Request

所以得改用 openssl + s_client 來執行

  • $ openssl s_client -connect example.com:443
    GET / HTTP/1.1
    Host: example.com
  • $ openssl s_client -connect example.com:443 # 加上 JWT 授權 Key 等等
    GET /index?a=b&format=json HTTP/1.1
    Host: example.com
    Authorization: Bearer 12345678-1234-1234-1234-123456789123
Tsung

隨機商業新聞

Disney+