display only script messages with mitmdump
See original GitHub issueIt would be nice if there is a built-in way to only display script messages with mitmdump.
Currently it looks like there is no feature like this, the --flow-detail 0
option displays other messages as well so a workaround is to use grep to display the message we want to catch from a script, for example mitmdump --flow-detail 0 -s script.py | grep MESSAGE
. The disadvantage is that it does filtering with unnecessary processing through a third-party tool like grep.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Examples
Add a custom message body pretty-printer for use inside mitmproxy. This example shows how one can add a custom contentview to mitmproxy, which...
Read more >Use mitmdump to Capture Refinitiv Real-Time - Optimized ...
In this article, we only focus on the mitmdump tool on Windows. ... After running, it will display the full request URL with...
Read more >Creating scripts for mitmproxy - Bad Gateway
As the best way to learn is often to see an example, here is a simple one. This script will change the HTTP...
Read more >Introduction to mitmdump | YoshiTech Blog - WordPress.com
Sample scripts are inside the folder. Taking the script to dump HTTP traffic in HAR file for example, we will see how the...
Read more >mitmdump - a man-in-the-middle proxy with a command- ...
Optional Arguments: -h, --help Show this help message and exit. ... -s script.py --bar , --script script.py --bar Run a script. Surround with...
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
Can you combine
--quiet
withprint()
inside your script? mitmdump itself should then not print anything and all you get is the output of your script. Worked well for me so far.@mhils Thanks. In a future version, would it be possible to have an option to use
ctx.log.info()
instead ofprint()
to display only script messages with mitmdump? This would be useful in case we have a script that is already usingctx.log.info()
but we don’t want to change the code to useprint()
or if we want to use the event log of mitmproxy also.