0

I'm working on writing a program that can read SMS information from the iTunes generated backup file of an iPhone.

At the moment I'm just playing around with some techniques, and have managed to put together a Python script that actually works. The entire program works fine under Mac OS, but when I take the script to Windows 7 and execute it, the following line throws an error;

Traceback (most recent call last):
  File "C:\Users\Nat\Desktop\MessageExtract.py", line 12, in <module>
    cur1.execute("SELECT handle_ID, text, is_from_me FROM message")
DatabaseError: file is encrypted or is not a database

Now, the file itself has no extension by default, and as far as I'm aware it isn't encrypted because the exact same script executes without error on my Mac OS side of things.

Does anybody have any ideas as to why this problem exists, and any possible solutions?

  • According to http://stackoverflow.com/questions/1516508/sqlite3-in-python the error message will also be thrown, when the database path is invalid. Perhaps there is something wrong with path handling. – flubba Oct 11 '12 at 14:59
  • I don't think the path is the issue. Like I say; I've written the Python on Mac OS and it runs perfectly. Copying the exact script over to Windows 7 and executing it using the IDLE GUI throws that error. – Nathan Millwater Oct 15 '12 at 19:57
  • Could you post your code you use to open the database? – flubba Oct 16 '12 at 09:21
  • Here's the code; db = sqlite3.connect('3d0d7e5fb2ce288813306e4d4636395e047a3d28') – Nathan Millwater Oct 17 '12 at 13:02
  • The file has an extension of .mddata on my (not so regulary used) windows computer. It could also have the extension .mdbackup. Did you try that? – flubba Oct 19 '12 at 12:28

1 Answers1

0

Trying to do the same thing.

Tried updating the sqlite3 dll as suggested here and it seems to work better.

Community
  • 1
  • 1
higstar
  • 31
  • 2