Skip to content

Conversation

@twiggler
Copy link
Contributor

No description provided.

$ rdump services.rec -w services.rec.out
If no ``-w`` argument is provided, ``rdump`` writes the records to standard output in its default line-based format.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If no ``-w`` argument is provided, ``rdump`` writes the records to standard output in its default line-based format.
If no ``-w`` argument is provided, ``rdump`` writes the records to standard output. If standard output is a TTY, ``rdump`` will output in its default line-based format. If standard output is a pipe (``rdump | xxd``), it will be in its default serialized format.

Or something like that.

Copy link
Member

@yunzheng yunzheng Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually not true anymore. We have changed this behavior in rdump as we found that people wanted to grep the line based output which otherwise you would grep on the binary serialized data.

The default of rdump is always text based if -w is not specified. If you want the serialized output (pipe it to another rdump process for example) you have to use -w -.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes I remember, my bad 😄

@twiggler twiggler requested a review from Schamper January 14, 2026 09:45
@Schamper Schamper requested a review from yunzheng January 14, 2026 10:14
Comment on lines +19 to +22
.. code-block:: console
$ rdump <source> -w output.rec.gz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. code-block:: console
$ rdump <source> -w output.rec.gz
.. code-block:: console
$ rdump <source> -w output.rec.gz
This will write the records to ``output.rec.gz`` in the default record stream format, compressed with gzip.

Comment on lines 143 to 144
When the ``-w`` argument is omitted, ``rdump`` sends records to standard output.
The output format adapts to the destination: a human-readable, line-based format for terminals (TTYs), and a serialized format when piped to another command (e.g., ``rdump | xxd``).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When the ``-w`` argument is omitted, ``rdump`` sends records to standard output.
The output format adapts to the destination: a human-readable, line-based format for terminals (TTYs), and a serialized format when piped to another command (e.g., ``rdump | xxd``).
When the ``-w`` argument is omitted, ``rdump`` prints the string representation of the records to standard output, which is useful for piping to tools like ``grep`` or ``less``.
If you want to output the record output to another ``rdump`` process you need to use ``-w -``, which will write the records in binary stream format to standard output.
For example, you can chain ``rdump`` with common Linux command-line tools to analyze records. In this example, we extract image paths from a record source, sort them, count occurrences, and display the top 5 most common paths:
.. code-block:: console
$ rdump services.rec -w - | rdump -f "{imagepath}" | sort | uniq -c | sort -rn | head -n 5
[reading from stdin]
104 %SystemRoot%\system32\svchost.exe
71 %SystemRoot%\System32\svchost.exe
28 %systemroot%\system32\svchost.exe
12 None
3 %SystemRoot%\system32\lsass.exe

Comment on lines +68 to +69
You can get a full list of available adapters by running ``rdump --list-adapters``.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can get a full list of available adapters by running ``rdump --list-adapters``.
You can get a full list of available adapters by running ``rdump --list-adapters``.
Some adapters require extra dependencies, which will be shown in this output as well.

@twiggler twiggler requested a review from yunzheng January 20, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants