[ubuntu-uk] Reverse engineering data files

James Tait james.tait at wyrddreams.org
Mon Nov 24 16:20:57 UTC 2014

Hash: SHA1

On 23/11/14 19:23, Gareth France wrote:
> It is readable, but no more so than if you just load it into perl
> using binmode. I'm currently struggling with identifying the
> different fields within the data. I've been plucking them out
> manually which is fine for the first half then I find some of them
> are variable length and I have no way of identifying where they
> start.

Variable length fields are often prefixed with a field length, so the
software knows how many bytes to read, or null-terminated, so the
software reads until it reaches a 0x00 byte.

On 23/11/14 23:19, Gareth France wrote:> The time and date is whenever
the test was performed. I should imagine
> there will be a lot of 'flags' Earth bond 25A yes, earth bond 10A
> no, earth bond 100ma no, insulation test yes, visual pass, etc,
> etc.

And binary flags may well be encoded into a bit field, i.e. one or
more bytes where each bit represents a yes or a no.

I'm assuming the files you're currently working with are for your
customers, and so can't reasonably be made public. Do you have access
to some test files that could be shared? Many eyes on the problem may
aid quicker progress. Also, the make and model of the device might help.

- -- 
- ---------------------------------------+--------------------------------
James Tait, BSc                        |    xmpp:jayteeuk at wyrddreams.org
Programmer and Free Software advocate  |        Tel: +44 (0)870 490 2407
- ---------------------------------------+--------------------------------
Version: GnuPG v1


More information about the ubuntu-uk mailing list