Popular recipes tagged "hex"http://code.activestate.com/recipes/tags/hex/2016-09-19T13:24:37-07:00ActiveState Code RecipesA simple raw hexdumper. (Python)
2016-09-19T13:24:37-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/580697-a-simple-raw-hexdumper/
<p style="color: grey">
Python
recipe 580697
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/fs_uae/">fs_uae</a>, <a href="/recipes/tags/hex/">hex</a>, <a href="/recipes/tags/hexdump/">hexdump</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/raw_hexdump/">raw_hexdump</a>, <a href="/recipes/tags/unix/">unix</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>This is not a hexreader. This code creates a raw hexdump of a binary file that is whitespace, optional, delimited. The dump is saved into the current directory with a ".hex" extension.</p>
<p>It works on just about any current platform but is designed around a stock Amiga A1200(HD) with Python 1.4.0. It also works on the current stable version 3.5.2.</p>
<p>I needed a hexdump some years ago for banging the Amiga hardware, and decided to modify recently for another usage but it had to still work on version 1.4.0 for the classic A1200.</p>
<p>Enjoy...</p>
Hex Dump (Python)
2015-05-29T10:44:47-07:00Wenlong Liuhttp://code.activestate.com/recipes/users/4192273/http://code.activestate.com/recipes/579064-hex-dump/
<p style="color: grey">
Python
recipe 579064
by <a href="/recipes/users/4192273/">Wenlong Liu</a>
(<a href="/recipes/tags/dump/">dump</a>, <a href="/recipes/tags/hex/">hex</a>, <a href="/recipes/tags/python/">python</a>).
Revision 4.
</p>
<p>Hex dump a sequence of bytes.</p>
<p>Sample output:</p>
<pre class="prettyprint"><code> 0000000000: 33 C0 8E D0 BC 00 7C 8E C0 8E D8 BE 00 7C BF 00 3.....|. .....|..
0000000010: 06 B9 00 02 FC F3 A4 50 68 1C 06 CB FB B9 04 00 .......P h.......
0000000020: BD BE 07 80 7E 00 00 7C 0B 0F 85 0E 01 83 C5 10 ....~..| ........
0000000030: E2 F1 CD 18 88 56 00 55 C6 46 11 05 C6 46 10 00 .....V.U .F...F..
0000000040: B4 41 BB AA 55 CD 13 5D 72 0F 81 FB 55 AA 75 09 .A..U..] r...U.u.
0000000050: F7 C1 01 00 74 03 FE 46 10 66 60 80 7E 10 00 74 ....t..F .f`.~..t
0000000060: 26 66 68 00 00 00 00 66 FF 76 08 68 00 00 68 00 &fh....f .v.h..h.
0000000070: 7C 68 01 |h.
</code></pre>
Hex Dump 2 (Python)
2009-11-03T05:25:21-08:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/576945-hex-dump-2/
<p style="color: grey">
Python
recipe 576945
by <a href="/recipes/users/2608421/">Stephen Chappell</a>
(<a href="/recipes/tags/dump/">dump</a>, <a href="/recipes/tags/hex/">hex</a>).
</p>
<p>This is a fast hex-dumping utility written for Python 3.1 and later.</p>
<p>Written for the command line with usage information printed as needed.</p>
Hex Dumper (Python)
2012-07-04T01:07:49-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/502203-hex-dumper/
<p style="color: grey">
Python
recipe 502203
by <a href="/recipes/users/2608421/">Stephen Chappell</a>
(<a href="/recipes/tags/dump/">dump</a>, <a href="/recipes/tags/dumper/">dumper</a>, <a href="/recipes/tags/hex/">hex</a>, <a href="/recipes/tags/programs/">programs</a>).
Revision 2.
</p>
<p>Just another hex dumper written in one of our favorite languages ...</p>