Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save mitmproxy capture #436

Open
Pfuenzle opened this issue May 12, 2024 · 1 comment
Open

Save mitmproxy capture #436

Pfuenzle opened this issue May 12, 2024 · 1 comment
Labels
question User is asking a question

Comments

@Pfuenzle
Copy link

Hi,
I wanted to save the capture I got from my traffic as a mitmproxy capture file instead of a pcap file, so I can use https://github.com/alufers/mitmproxy2swagger to create a swagger file from it. From what I've seen this is not natively possible in the app? I tried to use the additional command line arguments for mitmdump to save it with e.G. -w test.cap -w /sdcard/test.cap -w /data/data/com.emanuelef.remote_capture/files/test.cap, but every time I start the capture via the app, it fails to start and tells me to look at the logs, but mitmdump is just not starting and not throwing any errors.
Is there a way to get the capture file here? If that was already asked, im sorry, I looked through the issues and didn't find anything.
Thanks :)

@emanuele-f
Copy link
Owner

emanuele-f commented May 13, 2024

Hello,
In Android apps need specific permissions to access basically any public folder (e.g. /sdcard). The mitm addon does not request these, so writing is limited to the app private dir, which requires root privileges in order to be read from outside the app (or the use of run-as if the app is built in debug mode).

The simpler way to achieve what you need is to use an external mitmproxy, running on your pc. Otherwise you will need to either rebuild the mitm addon in debug mode or modify it to request write access to the /sdcard folder.

@emanuele-f emanuele-f added the question User is asking a question label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question User is asking a question
Projects
None yet
Development

No branches or pull requests

2 participants