Using external libraries with mitmdump
See original GitHub issueSteps to reproduce the problem:
- Develop a need to use an external package in your mitmdump script, e.g BeautifulSoup.
- Realize it’s not documented. 😛
Any other comments? What have you tried so far?
The only reference I was able to find online to this issue was on Discourse. Although the solution presented there did end up helping me solve the issue - the fact that this is not documented anywhere (as far as I could tell) in the official docs is not great.
I would be happy to submit a PR in the Scripts part of the docs, but I don’t think the solution I ended up using is very good - I just ran /path/to/mitmproxy/libexec/bin/pip3 install <libname>
.
System information
Using version 2.0.1 on OSX, installed via homebrew.
Issue Analytics
- State:
- Created 6 years ago
- Comments:22 (7 by maintainers)
Top Results From Across the Web
Error while using external Python module in mitmproxy project
Mitmproxy and mitmdump functionalities are awesome. But I got some strange error behavior. I want to use some external module in my custom...
Read more >Developers - Using external libraries with mitmdump - - Bountysource
Steps to reproduce the problem: Develop a need to use an external package in your mitmdump script, e.g BeautifulSoup. Realize it's not documented....
Read more >mitmproxy docs - Read the Docs
libmproxy is the library that mitmproxy and mitmdump are built on. ... traffic, you should use an external host to run mitmproxy.
Read more >You can do that using MiTM Proxy as well, as explained here
libmproxy is not recommended for external projects. Instead you should use "inline scripts" (embedding functionality in mitmproxy).
Read more >Debian -- Details of package mitmproxy in buster
mitmproxy is an SSL-capable man-in-the-middle HTTP proxy. ... scripted changes to HTTP traffic using Python - SSL interception certs generated on the fly ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
At the end of the day - none of this is documented in the docs, which is the biggest problem IMO.
I’m not particularly happy with that, especially since this already works by using:
$(brew --prefix mitmproxy)/libexec/bin/pip install my-dependency
The main problem is that packages will vanish when upgrading mitmproxy via homebrew-upgrade.