Hi
Please can you help me to write a python code to pull all sqlite databases in mobiles then reading them. I tried a lot but I didn't succeed. thank you in advance
You want to point the script at an extracted file system, identify ALL of the SQLite databases, and then dump the contents? Or are you targeting a few specific databases?
Seems quite inefficient to do them all. There will be many with data that is irrelevant to your investigation.
thanks for your reply.
I want to extract all sqlite databases in the device to get as much as possible of information. I am thinking to use sqlite file signature because there are different file extensions for sqlite.
Dear logan
We can try your suggestion then we can try the other scenario
You would want to use the file header for identifying the databases, sure. Chrome for example stores many of it's databases without a file extension.
You can script something up as follows
1) Write the initial part of the script to query all files in a file system; crawling through it and checking the first 8 bytes for the file header.
2) If you come across one, you can use the SQLite library in Python to open the database.
3) Query the database to obtain a list of all table names.
4) Dump all tables into a format of your choosing - completely up to you how you would like to do this.
5) Close the database and move on.
You could of course also crawl the whole file system for all files, obtain a list of all databases you find, then recursively dump them all after the fact.
Good luck!
I will say however that this is, again, a very inefficient way of doing this…a file system can contain MANY databases and include THOUSANDS of records. Without context to the data you are viewing, it is pretty useless…
I plan the same logic as you said in your reply but I faced a problem in Python code if you have some examples I will be thankful to be
Best way of learning Alabri is to keep trying! You have the logic.
To compare the results of your script, you can use our Demo ADR512.
Please, Logon can you at less to share some materials which related to my topic so I can read and learn. I am requesting for some guidance from you as master and student it seems you are farther ahead from my experience.