Quantcast
Channel: How can I view the binary contents of a file natively in Windows 7? (Is it possible.) - Super User
Viewing all articles
Browse latest Browse all 14

Answer by Scott - СлаваУкраїні for How can I view the binary contents of a file natively in Windows 7? (Is it possible.)

$
0
0

Copy the file to a name with a .COM extension, where the base name is no longer than eight characters.  Run

DEBUGyour_filename

It will give a '-' prompt.  Type

DEnter

repeatedly to display the file 128 bytes at a time.  Type

DaddressEnter

to display 128 bytes starting at address, which must be typed in hex, where the beginning of the file is address 100.  Type

Daddress1 address2Enter

to display from address1 to address2.  Type

DaddressLnumEnter

to display num bytes (length) starting at addressnum is also entered in hex.  Use Q to quit.

For example,

C:\Users\scott\Documents> debug thispost.com-d0BE4:0100  43 6F 70 79 20 74 68 65-20 66 69 6C 65 20 74 6F   Copy the file to0BE4:0110  20 61 20 6E 61 6D 65 20-77 69 74 68 20 61 20 2E    a name with a .0BE4:0120  43 4F 4D 20 65 78 74 65-6E 73 69 6F 6E 2C 20 77   COM extension, w0BE4:0130  68 65 72 65 20 74 68 65-20 62 61 73 65 20 6E 61   here the base na0BE4:0140  6D 65 20 69 73 20 6E 6F-20 6C 6F 6E 67 65 72 20   me is no longer0BE4:0150  74 68 61 6E 20 65 69 67-68 74 20 63 68 61 72 61   than eight chara0BE4:0160  63 74 65 72 73 2E 0D 0A-52 75 6E 20 44 45 42 55   cters...Run DEBU0BE4:0170  47 20 2A 79 6F 75 72 5F-66 69 6C 65 6E 61 6D 65   G *your_filename-d0BE4:0180  2A 0D 0A 49 74 20 77 69-6C 6C 20 67 69 76 65 20   *..It will give0BE4:0190  61 20 27 2D 27 20 70 72-6F 6D 70 74 2E 0D 0A 54   a '-' prompt...T0BE4:01A0  79 70 65 20 44 20 45 6E-74 65 72 20 72 65 70 65   ype D Enter repe0BE4:01B0  61 74 65 64 6C 79 20 74-6F 20 2A 2A 64 2A 2A 69   atedly to **d**i0BE4:01C0  73 70 6C 61 79 20 74 68-65 20 66 69 6C 65 20 31   splay the file 10BE4:01D0  32 38 20 62 79 74 65 73-20 61 74 20 61 20 74 69   28 bytes at a ti0BE4:01E0  6D 65 2E 0D 0A 54 79 70-65 20 44 20 5F 61 64 64   me...Type D _add0BE4:01F0  72 65 73 73 5F 20 74 6F-20 64 69 73 70 6C 61 79   ress_ to display-d 200 L160BE4:0200  20 31 32 38 20 62 79 74-65 73 20 73 74 61 72 74    128 bytes start0BE4:0210  69 6E 67 20 61 74                                 ing at-

Viewing all articles
Browse latest Browse all 14

Trending Articles