Ubuntu使用Charles监控Android手机网络请求

来源:互联网 发布:2d游戏美工 编辑:程序博客网 时间:2024/06/05 12:00
核心思想是Android手机使用ubuntu pc中的网络代理Charles,然后手机的网络数据都会先到Charles, 然后使用Charles的网络数据分析工具分析网络

安装Charles

下面代码来源https://gist.github.com/heyalexej/,并做了精简

#!/usr/bin/env shset -e# install charles proxy from deb sources.# http://www.charlesproxy.comsudo sh -c 'echo "deb http://www.charlesproxy.com/packages/apt/ charles-proxy main" > /etc/apt/sources.list.d/charles-proxy.list'wget -q http://www.charlesproxy.com/packages/apt/PublicKey -O - | sudo apt-key add -sudo apt-get updatesudo apt-get upgradesudo apt-get install -y charles-proxy# or for the brave#sudo apt-get install -y charles-proxy-beta 

运行charles

执行./charles即可

配置手机代理

1)连接一个wifi网络 (比如 ‘itleaks’)
2)进入setting,选择wifi选项
3)长按已经连接的wifi网络 ‘itleaks’
4) Modify network config-> Show advanced options.
Set proxy settings.
ip: 设置为pc的ip
port:8888

0 0
原创粉丝点击