Automatically saving files

I’m guessing the best place to do this is in a script, but I’m feeling the newbie crunch and can’t figure it out.

What I’m looking for simply is to transparently save all intercepted files (images, zips, etc) to the local filesystem.

As a nice bonus, I’d like to be able to save them to folders based on the device that requested it.

Thanks in advance, mitmproxy has leapfrogged my knowledge more than a few times.

Hi @jackandjohn,

I built something like this a loooong time ago: https://github.com/mhils/mitmproxy/blob/integrate_honeyproxy/scripts/core/dirdumper.py
There’s probably some dust that needs to be removed, but other than that this should match your needs. If you’re going to make this work again, I’d be happy to see a Pull Request that adds it to our official examples! :slight_smile: