1

I have a database file ending in .dat, which says nothing to me. Given that it uses a file per database, I assumed that it had to be some sort of sqlite, so tried to open with sqlite3 and has not been recognized as a database. Due to licensing issues, I'm unsure of how much information I can share about this, so I won't be able to upload the file. I know that it's not an encrypted file, and if I cat the file it looks like this:

<FE>^_(^@SR<89>^@^@^F^@^@^@Z^@^@^@XXX.Bin 6^RXXX.BankName s80^RXXX.CardType1 7^RXXX.CardType2 F^RXXX.Country Q^RXXX.BankPhone Q^R^T^F^D^C^C^X^@400094^R^@^@^@STAR_NETWORKS,_INCN/AN/AUNITED_STATES_OF_AMERICA^F^D^C^C^X^@400109^R^@^@^@EFUNDS_CORPORATIONN/AN/AUNITED_STATES_OF_AMERICA^F^D^C^C^X^@400110^P^@^@^@FIFTH_THIRD_BANKN/AN/AUNITED_STATES_OF_AMERICA^F^D^C^C^X^@

Any help on how I could export this to a sqlite database? If I only knew what type of database this is! I know that it's read by a program for windows and I'm trying to avoid making a script to read it character by character (there are no return lines) so any hints would be appreciated.

13
  • Do you know which programs use it? Can you include a "hex dump" of the first 15-20 characters? Commented Jun 30, 2011 at 20:26
  • 1
    the program that uses it is a standalone exe and I have no access to the source code Commented Jun 30, 2011 at 20:33
  • Do you know which language the program was written in? In many cases this can help to narrow down which database technology is probably being used. Commented Jun 30, 2011 at 20:34
  • I'm afraid that I don't, and the gui looks quite strange to me. Running strings on the binary doesn't return anything helpful and I can't post the hexdump of the binary because of the limit on the number of characters. I can tell, though, that it begins with a MZP Commented Jun 30, 2011 at 20:40
  • 1
    @omtinez: could you post the name of the file and program and the language (e.g. English) of it? I used xxd -r file > testfile to reconstruct the file from the hexdump (and verified the dump with xxd testfile), but unfortunately file testfile still says "data". Not really useful.
    – Lekensteyn
    Commented Jun 30, 2011 at 20:45

1 Answer 1

1

file can identify many file types by examining the file contents. Usage:

file filename

I tried to reconstruct a part of your file from the data you provided, by using:

printf '\xfe\x1F(\0SR\x89\0\0\6\0\0\0Z\0\0\0XXX.Bin 6\x12XXX.BankName s80\x12XXX.CardType1' > testfile

Unfortunately, file testfile does not give any (useful) results:

testfile: data

You might have more luck by using file on the whole file.

Programs have often an own format for storing data which is optimized for its tasks. If you cannot find the files format, try Google. Another useful tool for extracting information is the strings program, which can be run with strings filename.

3
  • This is an excellent suggestion (+1). Commented Jun 30, 2011 at 20:37
  • I don't know how I didn't think of this before! Unfortunately, it also returns data on the entire file Commented Jun 30, 2011 at 20:42
  • I did think of running strings, but it didn't return anything that could make sense Commented Jun 30, 2011 at 20:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .