Last active
December 1, 2022 10:54
-
-
Save takahirom/e96938e5edbf17f1872d5fe9bbff3ede to your computer and use it in GitHub Desktop.
Setup mitm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You will need to take full responsibility for your action. | |
# only once | |
brew install mitmproxy | |
ifconfig|grep 192.168 |awk '{print $2}'|xargs -IIPADDRESS adb shell settings put global http_proxy IPADDRESS:8083 | |
mitmweb -p 8083 | |
adb shell am start -a android.intent.action.VIEW -d "http://mitm.it" | |
# download and install pem | |
# each time you want to do mitm | |
ifconfig|grep 192.168 |awk '{print $2}'|xargs -IIPADDRESS adb shell settings put global http_proxy IPADDRESS:8083 | |
mitmweb -p 8083 | |
# reset | |
adb shell settings delete global http_proxy | |
adb shell settings delete global global_http_proxy_host | |
adb shell settings delete global global_http_proxy_port | |
# it looks like applying this configuration needs reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment