Skip to content

过滤特定 App 流量配方 ​

🔍 一次抓多个 App,只想看某一个的流量。

场景 ​

设备上多个 App 同时联网,r0capture 只 attach 一个进程,理论上只抓该进程。但若想进一步过滤,有以下方法。

方法 ​

1. 只 attach 目标 App ​

r0capture 只 hook 被 attach 进程的 SSL 调用,其他 App 流量天然不会被抓。选对进程即可。

2. 按 IP/端口过滤(Wireshark) ​

wireshark-filter
ip.addr == 93.184.216.34
tcp.port == 443

3. 按内容过滤 ​

抓包后 grep:

bash
grep "api.target.com" out.txt

或在 Wireshark:

wireshark-filter
tcp contains "api.target.com"

4. 重定向 + grep ​

bash
python3 r0capture.py -U -f com.app -v >> out.txt
grep -A 20 "POST /api/login" out.txt

相关文档 ​

基于 VitePress 构建 · 教学用途