sms247
sms247

Reputation: 4504

convert a binary file to SQLite database

i have a binary file of mobile, in this binary file msgs and contacts of phone-book are stored i have extracted msgs from it but now have to extract contacts saved in phone book.in this binary file the data is stored in sqlite format as i found this string 53514C69746520666F726D617420330000 in my binary file. now how to extract list of contacts saved in phone book.

Upvotes: 0

Views: 3683

Answers (1)

paxdiablo
paxdiablo

Reputation: 882136

You need to first work out the format of the file from which you are extracting information, then write code to extract it. A good starting point would be The SQLite Database File Format.

The first part of that string you give (53514C69746520666F726D6174203300) is ASCII hex for SQLite format 3<nul>, which matches the header shown in that link above, so that may go some way toward helping you figure out how best to process it.

Although, given the fact it appears to be just a normal SQLite database file, you may get lucky and be able to use it as-is with a normal SQLite instance. That would be the first thing I'd try since you can then use regular SQL queries to output the data in a more usable form.

For example, if the file is called pax.db, simply run:

sqlite pax.db

to open it, then you may find you can use all the regular investigative commands like .databases, .schema, .tables and so on.

Upvotes: 1

Related Questions