mitmproxy / mitmproxy/mitmproxy
Console: Make it easier to edit binary contents
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 45.1k
- Forks
- 4.7k
- Avg merge
- 21h 12m
- Merged PRs (30d)
- 16
Description
Problem Description
Right now, editing a request or response body opens the default text editor.
This is a bad choice for binary formats, which should much rather be opened in a hex editor.
Steps to reproduce the behavior:
- Make an HTTP request to a binary file, e.g.
https://www.google.com/favicon.ico - Edit the response body in mitmproxy.
Proposed Fix
- Assemble a list of console-based hex editors and order them by usefulness.
- Adjust
ConsoleMaster.spawn_editorto detect binary contents and then spawn a hex editor instead.
We already have a function to detect if contents are binary in mitmproxy.utils.strutils.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ConsoleMaster.spawn_editor in mitmproxy/tools/console/master.py and the binary-content detection function in mitmproxy/utils/strutils.py. Review the proposed console-based hex-editor choices and verify the behavior with the binary favicon response described in the issue, while ensuring ordinary text contents still use the default editor.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100