I am currently trying to create a program that will extract information from an 'index.dat' file used by Internet Explorer to store internet history.
Currently the problem arises when attempting to find the file offsets for various HASH tables within the file (these tables are where the history entries are stored).
The hex values containing these offsets are at known locations within the file, so finding them is not a problem, however when attempting to extract these values my program seems to collapse. After much 'googling' and messing around I think I've identified where the problem lies.
When looking at the file in a hex editor I can see that the hex values of 0x01 and 0x00 are both given the symbol of '.', ultimately meaning my program treats the 0x01 values as 0x00 messing up any calculation I attempt to carry out.
Below is an extract of code to show my calculations to extract the values:

I dont't believe the problem lies in my calculations as they work perfectly for previous values. None of these values however contain 0x01. Possibly lies in the way the file is read?
If anyone could offer any advice as how to get round this, it would be greatly appreciated.

Thanks in advance,
David.

April 1st, 2010, 07:01 AM

Freaky Chris

Re: Hex to Integer Problem

I'm not sure as a Random Access File opens file sin binary mode, which is very much required for this. If you open a file in binary mode you will distinguish between 0x00 and 0x01.