Last active
March 14, 2023 20:00
-
-
Save frigginglorious/9d92339aa433405afd3f457c4ae0fe1b to your computer and use it in GitHub Desktop.
AndroidReqHackMitmProxy
This file contains hidden or 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
AndroidReqHackMitmProxy | |
Note: without a rooted phone, YMMV | |
Steps - | |
brew install mitmproxy | |
set wifi proxy | |
(install certs) | |
npm install -g apk-mitm | |
brew install scrcpy | |
mitmproxy -s jpgReplacer.py |
This file contains hidden or 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
from mitmproxy import http | |
import logging | |
def response(flow): | |
pic = flow.request.pretty_url[-4:] | |
if pic == ".jpg": | |
logging.info(flow.request.pretty_url) | |
img = open("me.jpg", "rb").read() | |
flow.response.content = img |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment