braille – hex dump with braille characters

submited by
Style Pass
2021-07-02 19:00:08

braille dump is a drop in replacement for hexdump -C that uses unicode braille characters to display hex codes 0x81..0xff thereby improving the readibility of binary.

Braille Dump will work on Linux 2.6.16+, Windows Vista+, MacOS XNU 15.6+, FreeBSD 12+, OpenBSD 6.4+, or NetBSD 9.1+. $ curl https://justine.lol/braille/bd.com >bd.com $ chmod +x bd.com $ echo 'hello→world→' | ./bd.com 00000000 68 65 6c 6c 6f e2 86 92 77 6f 72 6c 64 e2 86 92 │hello⢚⢠⢁world⢚⢠⢁│ 00000010 0a │◙│ 00000011

Here's a concrete example of why braille dump is better at presenting binary data than the old hexdump command. Let's say we wanted to view the binary header to the bd.com program itself. hexdump will show us: $ hexdump -C bd.com | head -n10 00000000 4d 5a 71 46 70 44 3d 27 0a 00 00 10 00 f8 00 00 |MZqFpD='........| 00000010 00 00 00 00 00 01 00 08 40 00 00 00 00 00 00 00 |........@.......| 00000020 00 00 00 00 4a 54 00 00 00 00 00 00 00 00 00 00 |....JT..........| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 08 0b 00 00 |................| 00000040 b2 40 eb 00 eb 14 90 90 eb 06 48 83 ec 08 31 d2 |.@........H...1.| 00000050 bd 00 00 eb 05 e9 a6 10 00 00 fc 0f 1f 87 3e e0 |..............>.| 00000060 bf 00 70 31 c9 8e c1 fa 8e d7 89 cc fb 0e 1f e8 |..p1............| 00000070 00 00 5e 81 ee 72 00 b8 00 02 50 50 07 31 ff b9 |..^..r....PP.1..| 00000080 00 02 f3 a4 0f 1f 87 d2 ff ea 8e 20 00 00 8e d9 |........... ....| 00000090 b9 00 1b b8 50 00 8e c0 31 c0 31 ff f3 aa 80 fa |....P...1.1.....|

Let's say we're reading 64-bit little endian words. This is a good example of how braille dump does a much better job intuitively revealing the structure of the binary. The old hexdump command does this: $ hexdump -C bd.com | tail -n10 0000a050 ce 9a 00 00 00 00 00 00 ee 9a 00 00 00 00 00 00 |................| 0000a060 fc 9a 00 00 00 00 00 00 18 9b 00 00 00 00 00 00 |................| 0000a070 28 9b 00 00 00 00 00 00 38 9b 00 00 00 00 00 00 |(.......8.......| 0000a080 48 9b 00 00 00 00 00 00 5e 9b 00 00 00 00 00 00 |H.......^.......| 0000a090 6a 9b 00 00 00 00 00 00 7a 9b 00 00 00 00 00 00 |j.......z.......| 0000a0a0 8c 9b 00 00 00 00 00 00 a2 9b 00 00 00 00 00 00 |................| 0000a0b0 bc 9b 00 00 00 00 00 00 ce 9b 00 00 00 00 00 00 |................| 0000a0c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 0000b000

Leave a Comment