evtx_dump: support reading EVTX from stdin#271
Merged
omerbenamram merged 2 commits intomasterfrom Dec 21, 2025
Merged
Conversation
- Accept '-' and common stdin aliases (/dev/stdin, /dev/fd/0) - Buffer stdin into a temp file to satisfy the parser's Read+Seek requirements - Add a regression test for stdin parity (file vs stdin) - Fix --events clap value type mismatch that could panic \nFixes #236
Rexpect/pty-based tests are flaky when run concurrently under the default Rust test harness; lock them to run one-at-a-time.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #236
Problem
evtx_dump -o jsonl /dev/stdinfails withIllegal seekbecause EVTX parsing requiresRead + Seek(header/chunk offsets, stream length).Solution
-(and common Unix stdin aliases like/dev/stdin,/dev/fd/0) as input.Extras
--eventsthat could panic.Usage
Note
Add stdin support to evtx_dump by buffering to a tempfile, fix --events parser, and add tests/docs.
-and common stdin paths; buffer stdin to a tempfile and parse viaEvtxParser::from_read_seek(open_parser,is_stdin_input).--eventshandling: parse into typedRangesvia a value parser to prevent panics.INPUTarg help and minor logging/messages.tests/test_cli.rs).Mutexand separate module (tests/test_cli_interactive.rs).-o jsonl -.tempfiledep and include it inevtx_dumpfeature.rexpectfor interactive tests.Written by Cursor Bugbot for commit 6feddae. This will update automatically on new commits. Configure here.