Note that there are some explanatory texts on larger screens.

plurals
  1. POAny Generic Utilities or Libraries for Converting Hex Dumps into Human-readable Form?
    text
    copied!<p>I work a lot with serial communications with a variety of devices, and so I often have to analyze hex dumps in log files. Currently, I do this manually by looking at the dumps, looking at the protocol spec, and writing down the results. However, this is tedious and error-prone, especially whem messages contain hundreds of bytes and contain mixtures of big-endian and little-endian data, ASCII, Unicode, compression, CRCs, . . . .</p> <p>I have written a few Python scripts to assist with the more common cases. But there are lots of protocols to deal with, and it doesn't make sense to spend the time writing a custom script unless I know I'll have a lot of dumps to analyze.</p> <p>What I'd like is some sort of utility that can automate this activity. So, for example, if I have a textual hex dump like this:</p> <pre><code>7e ff 00 7b 00 13 86 04 00 41 42 43 44 56 ef 7e </code></pre> <p>and some sort of description of the message format, like this:</p> <pre><code># Field Size Byte Order Output Format Flag 1 hex Address 1 hex Control 1 hex DataType 1 decimal LineIndex 1 decimal PollAddress 2 msb hex DataSize 2 lsb decimal Data (DataSize) ascii CRC 2 lsb hex Flag 1 hex </code></pre> <p>I'd get output like this:</p> <pre><code>Flag 0x7e Address 0xff Control 0x00 DataType 123 LineIndex 0 PollAddress 0x1386 DataSize 4 Data "ABCD" CRC 0xef56 Flag 0x7e </code></pre> <p>Hardware-based protocol analyzers often have fancy features for doing this kind of thing, but I need to work with textual log files.</p> <p>Does any such utility or library exist?</p> <hr> <p>Some good answers have come up since I set up the bounty. I guess bounties work!</p> <p>Wireshark and HexEdit both look promising; I'll take a look at those, and will proabably award the bounty to whichever one suits my needs. But I'm still open to other ideas.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload