如何从linux下的命令行转储和解密HTTPS流量?

sor*_*rin 5 https wireshark

我有一个我需要调试的Web应用程序,因为我怀疑请求发送在到服务器的途中被更改.

我想转储在端口localhost:443上收到的HTTPS流量并解密它,以便我可以检查包.

显然我确实从服务器私下嘿.

有没有办法从命令行执行此操作?

HAL*_*HAL 3

您可以使用ssldump。(它在 libpcap 之上工作)。

ssldump -r <File_Name>.pcap -k <Key_File>.key -d host <IP_Address>
Run Code Online (Sandbox Code Playgroud)

您可以使用该实用程序指定以下选项ssldump

-r: Read data from the <File_Name>.pcap file instead of from the network.
-k: Use <Key_File>.key file as the location for the SSL keyfile.
-d: Display the application data traffic.
Run Code Online (Sandbox Code Playgroud)

您可以参考这里的完整示例