如何配置 Wireshark 以查看 HTTPS 流量?
我正在测试一个 iOS 应用程序,我只想查看何时发送 HTTPS 流量。我对流量的内容不感兴趣。 如何配置 Wireshark 来执行此操作?
这只是为了验证分析包正在运行。我对我的应用程序正在与之通信的服务器没有任何控制权。
谢谢!
编辑 #1:我当前的 Wireshark 配置可以看到 http://www.duckduckgo.com< 的流量< /a> 但不是 https://www.duckduckgo.com
I'm testing an iOS application and I just want to see when HTTPS traffic is sent. I'm not interested in the contents of the traffic. How can I configure Wireshark to do this?
This is just to verify that an analytics package is working. I don't have any control over the servers that my app is talking to.
Thanks!
Edit #1: My current Wireshark configuration can see traffic to http://www.duckduckgo.com but not https://www.duckduckgo.com
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
另一种方法是使用 Mac 作为 Wi-Fi 接入点并使用 TCPDump 嗅探流量。步骤如下:
创建网络
。为其指定一个随机名称,选择安全性并设置密码。系统偏好设置>共享
设置使用:Wi-Fi的计算机
。在Wi-Fi 选项...
中选择您之前创建的网络。在共享您的连接来源:
中,选择您获取 Internet 的接口,通常是以太网。互联网共享
,并从您的 iPhone 连接到这个新的 Wi-Fi 网络。Settings > 断开 iPhone 上的 3G 连接一般>网络
并使用 Safari 检查您的互联网。有时需要几秒钟。ifconfig
。生成的日志也可以通过 WireShark(这是 tcpdump 的 GUI 版本)导入。TCPDump 包含在所有版本的 OS X 中。有关其他选项,请参阅技术问答 QA1176 获取数据包跟踪。
An alternative is using your Mac as a Wi-Fi access point and sniffing the traffic with TCPDump. Here are the steps:
Create Network
. Give it a random name, select security, and set a password.System Preferences > Sharing
setTo computers using: Wi-Fi
. InWi-Fi Options...
choose the network you created before. InShare your connection from:
, choose the interface you are getting Internet from, usually Ethernet.Internet Sharing
, and connect to this new Wi-Fi network from your iPhone.Settings > General > Network
and check your Internet with Safari. Sometimes it takes a few seconds.sudo tcpdump -s 0 -A -i en1 port 443 > log.txt
. Useifconfig
if you have a network interface other than en1. The log generated can also be imported by WireShark (which is a GUI version of tcpdump).TCPDump is included with all versions of OS X. For other options, see Technical Q&A QA1176 Getting a Packet Trace.
开始捕获适当的网络接口后,将以下内容设置为过滤器:
这将确保仅显示 http 和 http 的数据。您可以进一步检查的 https 连接。
Set following as a filter after you've started capturing the appropriate network interface:
This will ensure display of data for only http & https connections that you can further inspect.
如果您想解密 SSL 流量以便监听它,请查看 Wireshark Wiki。解释有点长,但使您能够解密 SSL 流量。
您可能还想监听端口 443 而不是 80..:-)
If you want to decrypt the SSL traffic in order to listen in on it, have a look at the Wireshark Wiki. The explanation is a bit longer, but enables you to decrypt SSL traffic.
You also might want to listen on port 443 instead of 80.. :-)
是的。 Wireshark 可以监视可用的任何和所有以太网流量。要解决的问题是运行 Wireshark 的计算机是否会看到您有兴趣检测其存在的所有以太网流量。
Yes. Wireshark can watch any and all ethernet traffic made available to it. The issue to solve is whether the machine running Wireshark will see all of the ethernet traffic you are interested in detecting the presence of.