binaryfiles - Format/encoding of this binary data file -


I am trying to write a program that integrates with Adventure Axis, software for financial planners and so on. The site of the product is here:

I need to write new entries in the price files, but most of them are binary. I looked around online and did not get much, and I emailed their support, But I suspect that this will help.

I have a small dummy file and printout, which the program said to the file. I ran the file through a ruby ​​script that prints the character if it is a word or symbol and ASCIIL is not otherwise here is the Ruby script:

  pri = file.read '062109_dummy .pri 'pri.each_byte do | Char | Print char.chr = ~ / [\ w! @ # \ $% \ ^ & Amp; \\\\\\\\\\\\\\\\ /? Char.chr: '' + char.to_s + '' end  

and output:

  pri1.001 254 250 251 252 29 0 2 adusnok 0 0 0 0 0 0 0 0 0 33333s7 @ 1 254 250 251 252 29 0 2 2 csusxom 0 0 0 0 0 0 0 0 H225 Jade 20 174 GA @ 1 254 250 251 252 29 0 2 etusvv 0 0 0 0 0 0 0 0 0 0 246 (\ 143 194 213F @ 1 254 250 251 252 29 0 2 fdusoakbx 0 0 0 0 0 0 174g 225 Z20 174 (@ 1 254 250 251 252 29 0 2 oousfidde09 0 0 0 0 0 154 153 153 153 153 185 S @ 1 254 250251 252 29 0 2 qpusfid_eqix 0 0 0 0 164 p 61 10 215 cl @ 1 254 250 251 252 29 0 2 2 vausvg_sc 0 0 0 0 0 0) 143 194 245 248 p @ 1   

Note that if the numbers are empty around the number, then this means that it is a byte value, and if it is not, So its price was the ASCII representation of that number.

I know that the string of letters (such as "Edsonok") are representations of stocks like ND are 0-ed bits because the location of the symbols is fixed- Is the size (which is why it is less than the long symbol). Sequence @ 1 254 250 251 252 29 0 2 2 indicates the end of a record, come in front of a new symbol Alternatively, some of this is something Rsha can which is the same for all these, but do not think too much of it then, I do not know anything basically. I have a printout of this program, which thinks to do maps. 3 spaces, with the separation of each column:

  adus NOK 23.45 Nokia Corp. ADR 0.393 2008/05/30 csus xom 34.56 Exxon Mobil Corporation com 1.68 2009/10/10 etus Vv 45.67 Vanguard LRG CAP ETF US Printer MKT 750 1.04 3/31/2009  

There is a lot more, but this should give you a very good idea. I think it is quite possible that the description, and potentially other things, are stored in other files and just looked up but I know that the prices are in that file because these are the prices and this is the whole thing: < / P>

33333s7 => 23.45 H225 Jade 20 174 GA => 34.56 246 (\ 143 194 213f => 45.67

Note that in the first one, save all numbers 3 and 7 The values ​​of bytes are not ASCII representations of values, also keep in mind that these are Prices can represent only a little more than the price, but they definitely represent the value.

Any thoughts? I am not familiar with common binary encoding, but I would not be surprised that they Normal method is used.

"post-text" itemprop = "text">

Reverse engineering is a binary format dangerous if you ship your reverse engineer codec going to do They can change the file format w / o warning. However, if you are bound to do it and determine:

One thing you can do is to see the IEEE floating point number format Is:

And then, when starting with the first byte in the file, read 4 or 8 bytes of data. Change the two sets (4 bytes and 8 bytes) to float. Uble Values ​​Check to check whether they match the values ​​in the file. If so, then you probably got offset of the value print it out, and offset too. If not, then increase your byte by one byte and try again.

If you can find all the values ​​in that way, then you can securely batch the binary files in sequence by doing the same operation: For the prices you know are those, and then the correct values In the values ​​of prices are revised.

This is not easy at all, because random sequences of data will sometimes match. If you see a certain distance between the offset, or some Sigil that is always present, or even better, if you can get the back offset value in the file, then you may have some minor frozen.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -