问题描述
我想捕获iPhone上的净流量.因此,我在官方网站上遵循了Guid.
I want to capture the net traffic on my iPhone. So I followed the guid on the official site.
- 通过USB将iOS设备连接到Mac.
-
$ rvictl -s UDID
- Connect iOS device to the Mac via USB.
$ rvictl -s UDID
我通过ifconfig -l看到了rvi0接口.我使用tcpdump捕获数据包:$ sudo tcpdump -i rvi0 -ntcpdump:警告:rvi0:该设备不支持混杂模式(BIOCPROMISC:套接字不支持该操作)tcpdump:警告:rvi0:未分配IPv4地址tcpdump:禁止详细输出,请使用-v或-vv进行完整协议解码在rvi0上侦听,链接类型RAW(原始IP),捕获大小为65535字节
I saw the interface rvi0 via ifconfig -l. I used tcpdump to capture the packet:$ sudo tcpdump -i rvi0 -ntcpdump: WARNING: rvi0: That device doesn't support promiscuous mode(BIOCPROMISC: Operation not supported on socket)tcpdump: WARNING: rvi0: no IPv4 address assignedtcpdump: verbose output suppressed, use -v or -vv for full protocol decodelistening on rvi0, link-type RAW (Raw IP), capture size 65535 bytes
然后,我使用iphone5(ios:7.0.2)浏览了一个正常工作的网页.但是还有tcpdump不会捕获任何pakect.
Then I used my iphone5(ios:7.0.2) browse a web page, which worked as normal. But there isno pakect captured by the tcpdump.
推荐答案
请查看远程虚拟接口文档. rvictl -s <<UDID>>
随设备一起运行该工具.输出行应显示类似Starting device <<UDID>> [SUCCEEDED] with interface <<INTERFACE>>
的内容.要查看数据包,请输入sudo tcpdump -i <<INTERFACE>> -w trace.pcap
完成捕获后,使用rvictl -x <<UDID>>
删除RVI
并使用数据包分析器工具(即WireShark,可可数据包分析器等)打开trace.pcap
(位于当前工作目录中).
Please look at the Remote Virtual Interface docs. rvictl -s <<UDID>>
just runs the tool with your device. An output line should read something like Starting device <<UDID>> [SUCCEEDED] with interface <<INTERFACE>>
To view the packets, enter sudo tcpdump -i <<INTERFACE>> -w trace.pcap
When finished with your capture, remove the RVI
using rvictl -x <<UDID>>
and open trace.pcap
(located in your current working directory) using a packet analyzer tool (i.e. WireShark, Cocoa Packet Analyzer, etc.).
这篇关于iOS远程虚拟界面不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!