diff options
| author | srdusr <[email protected]> | 2026-05-19 22:15:00 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2026-05-19 22:15:00 +0200 |
| commit | 3f2c38c4b62f3502dcb64e7b050f3de049518542 (patch) | |
| tree | 6d698821ae24a83bba2ec27396edecbac7b47eb7 /go.sum | |
| parent | 4fa511ac5f2aa422456c49610a2cf29dfee46dfd (diff) | |
| download | mitmux-3f2c38c4b62f3502dcb64e7b050f3de049518542.tar.gz mitmux-3f2c38c4b62f3502dcb64e7b050f3de049518542.zip | |
Export a history entry to a plain-text file
No way existed to get data out of mitmux at all short of querying the
SQLite file directly. 'e' from Detail view exports the selected entry's
raw request and response bytes to a file - a modal path-prompt (same
pattern as Intruder's grep-match/extract edit buffers: enter writes and
confirms, esc cancels), prefilled with a sensible default filename
(mitmux-entry-<id>.txt).
Deliberately plain text, not a structured format: for "attach this to a
report" or "grep it later" - the actual use case - the raw bytes as
text are the whole point, matching this tool's own raw-bytes-first
philosophy rather than reformatting them into something else first.
Detail-view-only (like pretty-print), not also from the history list:
exporting needs the full EntryDetail with raw bytes, which is already
loaded there, so this avoids adding a second load-then-prompt path for
one keystroke of convenience.
Each side is annotated when it isn't a wire-exact capture - "(truncated
- hit capture size limit)" or "(reconstructed, not wire-exact)",
matching the same distinction Detail view's own labels already make -
so the exported file carries the same trust information the UI shows,
not a blanker claim that could mislead whoever reads the export later
without the tool's own context.
cmd/mitmux/export.go: exportEntryText (pure formatting, unit tested
including the non-exact annotation paths) and writeExportFile (a
thin os.WriteFile wrapper - a relative path resolves against the
process's CWD, same as any other command-line tool; no ~ expansion,
that's shell behavior, not something a bare file write should
reimplement).
Verified live in tmux: exported a real captured entry, confirmed the
written file byte-for-byte via cat - correct header, exact request and
response bytes including chunked body - and confirmed esc correctly
cancels without writing anything.
go build/vet/gofmt/test/mod tidy all clean.
Diffstat (limited to 'go.sum')
0 files changed, 0 insertions, 0 deletions