1 Star 2 Fork 0

metmit / easyMitmproxy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
readme.md 1012 Bytes
一键复制 编辑 原始数据 按行查看 历史
ruesin 提交于 2021-03-04 18:08 . init

MitmProxy

使用MitmProxy截获网络请求的响应结果,将响应结果推送至服务端。

安装

$ sudo pip3 install mitmproxy

证书

生成证书,并信任该证书。

$ mitmdump
$ ls ~/.mitmproxy

IOS安卓7以下的手机:

手机设置代理为当前IP & Port,浏览器访问mitm.it下载对应系统的证书,安装证书并信任,即可拦截HTTPS请求。

安卓7以上的手机:

1、查看证书的hash值,第一行的8个16进制即是,比如:c8750f0d

$ openssl x509 -inform PEM -subject_hash_old -in  ~/.mitmproxy/mitmproxy-ca-cert.pem

2、将证书拷贝为c8750f0d.0(后缀是数字0)

$ cp ~/.mitmproxy/mitmproxy-ca-cert.pem c8750f0d.0

3、将证书文件写入到Android的系统证书列表

$ adb root 
$ adb remount
$ adb shell rm -f /system/etc/security/cacerts/c8750f0d.0
$ adb push c8750f0d.0 /system/etc/security/cacerts/c8750f0d.0

启动

$ mitmdump -s loader.py -p 18888 -q
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/metmit/easyMitmproxy.git
git@gitee.com:metmit/easyMitmproxy.git
metmit
easyMitmproxy
easyMitmproxy
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891