I was reading information that I found in this link
http://www.motronic.ws/which I found here:
http://www.tunerpro.net/links.htmI use a binary editor called "hexedit" which I downloaded from someplace many years ago, and I run it on my linux box. The hexedit is great for interactive editting. It is a static executable with ncurses and works great on my terminal. If anyone wants it, just let me know.
The problem with searching for patterns with that software is that you cannot automate the process. So, I decided that I need to start putting a hex-viewer like plugin to my organic visualization tools. In the process I realized that many would benefit from a simple utility that could dump a binary file in HEX form on a window. Cheap windows are web browsers and HTML making is a piece of cake, so those were my choices for convenience. The code that is attached is essentially universal in terms of OS. You can compile it under all unix systems with a standard ANSI C compiler (GCC will do), or Mac OS X, or Windows using the free Cygwin tools -- which I also use.
I did not bother making the driver main() any elegant. Things are hardwired in there in terms of names, etc, and the output is thrown on stdout, so you can capture it in any way you like. The result is a primitive HTML with a single table in it. It displays the contents of a binary file as the hexedit binary editor that i use.
It is not meant to be used with large files, although it can be done given enough memory. Your browser may not like the large table that a 1MB file will generate, but it works for my machines. You are encouraged to modify the code so that certain segments are printed only, etc. You can also modify it to do some pattern matching and print only relevant pieces. I will make some modifications to it so that it becomes more general, with search patterns that use colour-highlighting within the HTML table that is generated. Stay tuned.
If you have any questions or find it useful, let me know.