I’m new to mitmproxy, and I’m having some difficulty figuring out how to add arguments to scripts. It looks like in some previous commits of the documentation and examples folder, there was an example for adding arguments to scripts , but the documentation hasn’t had anything to say about handling arguments for at least the last 8 months. I’ve got a few questions.
Has something change significantly in the API so that arguments are no longer easily added to scripts?
If this is just a case of the documentation lagging behind development, would someone be able to provide a minimal example of a modification of this script, but where example. com is instead an argument?
Gotcha - I now realize that I was having two separate problems.
I had the 3.0 mitmproxy binaries installed on my system, but I had 2.0.2 installed in a virtual environment which I’m using to develop something around mitmproxy. This is because I used pip to install mitmproxy in the virtual environment without directing it to the Git repository.
There’s possibly a small mistake in the documentation. readme.md should include custom_option.py, and it should not include script_argument.py, which is not in the folder. I missed custom_option.py since it wasn’t in the table.
Just made one. For some reason discourse won’t let me put the link here, but it’s pull request 2820. Also, not sure why my above posts just got flagged as spam.