Pages: [1]
Author Topic: Any bin to HTML table converter  (Read 6604 times)
iznogoud
Full Member
***

Karma: +13/-0
Offline Offline

Posts: 104

Learning junkie


« on: November 05, 2010, 08:45:21 AM »

I was reading information that I found in this link

http://www.motronic.ws/

which I found here:

http://www.tunerpro.net/links.htm

I 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.
« Last Edit: November 05, 2010, 12:22:27 PM by iznogoud » Logged

Audi S4 B5 2000 6sp Cactus Green
Audi A4 B6 Avant 1.8T 2001.5 5sp Santorin Blue
spen
Full Member
***

Karma: +43/-0
Offline Offline

Posts: 112


« Reply #1 on: November 05, 2010, 12:40:03 PM »

Nice idea.  Do you think you'll put overlays in colour for data etc taken from xdf or damos?
Logged
iznogoud
Full Member
***

Karma: +13/-0
Offline Offline

Posts: 104

Learning junkie


« Reply #2 on: November 05, 2010, 12:56:44 PM »

Nice idea.  Do you think you'll put overlays in colour for data etc taken from xdf or damos?


I can. I mean, it is easy given an XDF file and a bin file to colour address ranges and data ranges. I do have an XDF parser that takes into account the relevant information already (posted here linky clicky)  that I can combine.

Again, the resulting files are large and even fast machines with a lot of memory will have trouble displaying them at times.

OK, it is a good idea, so I will author it ASAP.
« Last Edit: November 05, 2010, 12:59:02 PM by iznogoud » Logged

Audi S4 B5 2000 6sp Cactus Green
Audi A4 B6 Avant 1.8T 2001.5 5sp Santorin Blue
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 0.024 seconds with 17 queries. (Pretty URLs adds 0s, 0q)