Skip to content

Simple tool for printing string-containing sectors in a binary disk image

License

Notifications You must be signed in to change notification settings

johnwfinigan/printdisk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

printdisk

Simple tool for printing string-containing sectors in a binary disk image

purpose

Given a binary input file, this program:

  * reads it in, 128 bytes (here, one line) at a time
  * replaces non-printable characters in each line with spaces
  * prints the line plus an offset in decimal if and only if the line contains 8 or more contiguous letters
  *	prints a blank line between non-contiguous printed lines 

This is useful if you want to visualize printable content in a binary file and filter out likely junk. Each line is 128 bytes long so as to fit on a reasonable xterm without wrapping, while being a multiple of the common 512 byte sector size.

build

gcc -Wall -O3 -o printdisk printdisk.c

run

./printdisk my-disk-image > outfile

Then open outfile with a text editor to view strings.

bugs

* minimal testing (I am satisfied that it works for my purpose)
* lack of configurability

About

Simple tool for printing string-containing sectors in a binary disk image

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages