MoonPoint Support Logo

Geeks.com - Free Shipping



Advanced Search
February
Sun Mon Tue Wed Thu Fri Sat
     
8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29      
2012
Months
FebMar
Apr May Jun
Jul Aug Sep
Oct Nov Dec


Sun, Feb 15, 2009 11:41 am

Hod - Octal and Hexadecimal Dump Program for Windows

Hex and Octal dumper (hod) is a small (36,864 bytes for version 1.6) program, written by Muhammad A Muquit, that can display the contents of a file in hexadecimal and octal. It is available for Linux/Unix, Microsoft Windows, and SimpleTech SimpleShare NAS systems. For the Microsoft Windows version, simply extract hod.exe from the zip file available on the author's website.

If you just type hod file the contents of file will be displayed in both hexadecimal and ASCII.

C:\>"C:\Program Files\Utilities\hod.exe" temp.txt
          0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f   0123456789abcdef
       0: 0d 0a 21 20 52 45 47 2e 45 58 45 20 56 45 52 53  ..! REG.EXE VERS
      10: 49 4f 4e 20 33 2e 30 0d 0a 0d 0a 48 4b 45 59 5f  ION 3.0....HKEY_
      20: 43 55 52 52 45 4e 54 5f 55 53 45 52 5c 53 6f 66  CURRENT_USER\Sof
      30: 74 77 61 72 65 5c 4d 69 63 72 6f 73 6f 66 74 5c  tware\Microsoft\
      40: 57 69 6e 64 6f 77 73 5c 43 75 72 72 65 6e 74 56  Windows\CurrentV
      50: 65 72 73 69 6f 6e 5c 54 68 65 6d 65 73 5c 4c 61  ersion\Themes\La
      60: 73 74 54 68 65 6d 65 0d 0a 20 20 20 20 57 61 6c  stTheme..    Wal
      70: 6c 70 61 70 65 72 09 52 45 47 5f 45 58 50 41 4e  lpaper.REG_EXPAN
      80: 44 5f 53 5a 09 25 53 79 73 74 65 6d 52 6f 6f 74  D_SZ.%SystemRoot
      90: 25 5c 57 65 62 5c 57 61 6c 6c 70 61 70 65 72 5c  %\Web\Wallpaper\
      a0: 52 69 70 70 6c 65 2e 6a 70 67 0d 0a 0d 0a        Ripple.jpg....

For help on using the program, use the -h option.

C:\>"C:\Program Files\Utilities\hod.exe" -h
usage: C:\Program Files\Utilities\File\Analysis\hod.exe [options] 
Where the options are:
 -v      : show version information
 -h      : show this help
 -o      : dump in octal
 -8      : show as block of 8 bytes
 -x str  : convert a hex input to decimal
 -d      : show offsets in decimal
 -s      : show identical output lines
 -r      : reverse hod hexdump to binary
 -w      : reverse regular hex bytes to binary

If no filename specified, it will read from stdin

Example:
$ hod file
$ hod < file
$ cat file | hod
$ cat file | hod -
$ hod < file
$ hod -o file
$ echo "hello" | hod
$ echo -n "hello" | hod
$ hod -x 1c0
1c0 : 448
$ echo "0a 01 ff ef 0b" | hod -w > bin.bin
$ hod bin.bin | hod -r > bin_again.bin

Note: -r and -w works with hexadecimal only.

If you want to convert an ASCII string, such as the word hello, to its hexadecimal equivalent, you can use the echo command to pipe the word to hod, as below.

C:\>echo hello | "C:\Program Files\Utilities\hod.exe"
          0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f   0123456789abcdef
       0: 68 65 6c 6c 6f 20 0a                             hello .

From the above output, you can see that the letters in hello have the following hexadecimal equivalent representation.

ASCIIHexNote
h68 
e65 
l6c 
l6c 
o6f 
SP20space
LF0aline feed

A space (hex 20) is listed after hello, since there was a space between the word and the | pipe operator that feeds the output of the echo command to hod. If I had placed the | immediately after hello, i.e. echo hello|, it wouldn't have been listed. A line feed (hex 0a) is shown after the space.

Download hod

Author's website

[/software/utilities] permanent link

CompuVest - Notebooks

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo