Sfoglia il codice sorgente

First Checkin of Contacts Export

git-svn-id: svn://svn.siningsoft.de/Sailfish_Contacts_Restore@1 9ea9dde1-eeb2-4aae-9f27-8a0df3aa35ee
devnull 4 anni fa
commit
316e37975c
39 ha cambiato i file con 59 aggiunte e 0 eliminazioni
  1. 2 0
      SQL/Abfragen.sql
  2. BIN
      Testdata/system/Contacts/qtcontacts-sqlite/contacts.db
  3. BIN
      Testdata/system/Contacts/qtcontacts-sqlite/contacts.db-shm
  4. 0 0
      Testdata/system/Contacts/qtcontacts-sqlite/contacts.db-wal
  5. BIN
      Testdata/system/privileged/Ambienced/ambienced.sqlite
  6. BIN
      Testdata/system/privileged/Ambienced/ambienced.sqlite-shm
  7. BIN
      Testdata/system/privileged/Ambienced/ambienced.sqlite-wal
  8. BIN
      Testdata/system/privileged/Calendar/mkcal/db
  9. 0 0
      Testdata/system/privileged/Calendar/mkcal/db.changed
  10. 1 0
      Testdata/system/privileged/Contacts/calendar.stamp
  11. BIN
      Testdata/system/privileged/Contacts/qtcontacts-sqlite/contacts.db
  12. BIN
      Testdata/system/privileged/Contacts/qtcontacts-sqlite/contacts.db-shm
  13. BIN
      Testdata/system/privileged/Contacts/qtcontacts-sqlite/contacts.db-wal
  14. BIN
      Testdata/system/privileged/Images/dropbox.db
  15. BIN
      Testdata/system/privileged/Images/facebook.db
  16. BIN
      Testdata/system/privileged/Images/onedrive.db
  17. BIN
      Testdata/system/privileged/Images/vk.db
  18. 9 0
      Testdata/system/privileged/Keys/storedkeys.ini
  19. BIN
      Testdata/system/privileged/Notifications/notifications.db
  20. BIN
      Testdata/system/privileged/Notifications/notifications.db-shm
  21. BIN
      Testdata/system/privileged/Notifications/notifications.db-wal
  22. BIN
      Testdata/system/privileged/Secrets/initialsalt/518327c7-a7d1-4952-b75d-d2ebf971f2bb/file0
  23. BIN
      Testdata/system/privileged/Secrets/initialsalt/518327c7-a7d1-4952-b75d-d2ebf971f2bb/file1
  24. BIN
      Testdata/system/privileged/Secrets/initialsalt/518327c7-a7d1-4952-b75d-d2ebf971f2bb/file2
  25. 3 0
      Testdata/system/privileged/Secrets/lockcodecheck/202adee0-eab6-477e-9858-28b6e9983c3c/file0
  26. 3 0
      Testdata/system/privileged/Secrets/lockcodecheck/202adee0-eab6-477e-9858-28b6e9983c3c/file1
  27. 3 0
      Testdata/system/privileged/Secrets/lockcodecheck/202adee0-eab6-477e-9858-28b6e9983c3c/file2
  28. BIN
      Testdata/system/privileged/Secrets/org.sailfishos.crypto.plugin.gnupg.openpgp/metadata.db
  29. BIN
      Testdata/system/privileged/Secrets/org.sailfishos.crypto.plugin.gnupg.openpgp/metadata.db-shm
  30. BIN
      Testdata/system/privileged/Secrets/org.sailfishos.crypto.plugin.gnupg.openpgp/metadata.db-wal
  31. BIN
      Testdata/system/privileged/Secrets/org.sailfishos.crypto.plugin.gnupg.smime/metadata.db
  32. BIN
      Testdata/system/privileged/Secrets/org.sailfishos.crypto.plugin.gnupg.smime/metadata.db-shm
  33. BIN
      Testdata/system/privileged/Secrets/org.sailfishos.crypto.plugin.gnupg.smime/metadata.db-wal
  34. BIN
      Testdata/system/privileged/Secrets/org.sailfishos.secrets.plugin.encryptedstorage.sqlcipher/metadata.db
  35. BIN
      Testdata/system/privileged/Secrets/org.sailfishos.secrets.plugin.encryptedstorage.sqlcipher/metadata.db-shm
  36. BIN
      Testdata/system/privileged/Secrets/org.sailfishos.secrets.plugin.encryptedstorage.sqlcipher/metadata.db-wal
  37. BIN
      doc/Contacts_OS3-2_Shema.png
  38. 0 0
      test/ContactRescue_1.py
  39. 38 0
      test/vcfExport_1.py

+ 2 - 0
SQL/Abfragen.sql

@@ -0,0 +1,2 @@
+SELECT * FROM Contacts;
+SELECT * FROM Contacts JOIN EmailAddresses ON Contacts.contactId = EmailAddresses.contactId;

BIN
Testdata/system/Contacts/qtcontacts-sqlite/contacts.db


BIN
Testdata/system/Contacts/qtcontacts-sqlite/contacts.db-shm


+ 0 - 0
Testdata/system/Contacts/qtcontacts-sqlite/contacts.db-wal


BIN
Testdata/system/privileged/Ambienced/ambienced.sqlite


BIN
Testdata/system/privileged/Ambienced/ambienced.sqlite-shm


BIN
Testdata/system/privileged/Ambienced/ambienced.sqlite-wal


BIN
Testdata/system/privileged/Calendar/mkcal/db


+ 0 - 0
Testdata/system/privileged/Calendar/mkcal/db.changed


+ 1 - 0
Testdata/system/privileged/Contacts/calendar.stamp

@@ -0,0 +1 @@
+1

BIN
Testdata/system/privileged/Contacts/qtcontacts-sqlite/contacts.db


BIN
Testdata/system/privileged/Contacts/qtcontacts-sqlite/contacts.db-shm


BIN
Testdata/system/privileged/Contacts/qtcontacts-sqlite/contacts.db-wal


BIN
Testdata/system/privileged/Images/dropbox.db


BIN
Testdata/system/privileged/Images/facebook.db


BIN
Testdata/system/privileged/Images/onedrive.db


BIN
Testdata/system/privileged/Images/vk.db


+ 9 - 0
Testdata/system/privileged/Keys/storedkeys.ini

@@ -0,0 +1,9 @@
+[encoding]
+jolla/jolla-store/scheme=xor
+jolla/jolla-store/key=xor_key
+
+[encodedkeys]
+jolla/jolla-store/application_name=SVwXbVNcHE5CEz5fVFRMXkBnRl1BTF5fPAoGGhsMSmdbXUEe
+jolla/jolla-store/client_id=PSEEEjwfDk0bSygAUz4JX0pqEwc9FxdKbTE1CCsXFzYlPRIOBygFUw==
+jolla/jolla-store/client_secret=MiMmGgguDBwaBy8TNz8OX0ILXCAOHwoLEj0UNgFXJAkMJAotCR9qOBJJNzoBBwQXHDMtHRAKLhUZKBwQBxwcKgI5PBsRFDsgJCsOC0AfKhMzEwcISDsAOTMECTkJATsOKQ8sJkYzGjwrLT1GNBNdNR89EDQeEBQRFjE+BjBLMj8=
+

BIN
Testdata/system/privileged/Notifications/notifications.db


BIN
Testdata/system/privileged/Notifications/notifications.db-shm


BIN
Testdata/system/privileged/Notifications/notifications.db-wal


BIN
Testdata/system/privileged/Secrets/initialsalt/518327c7-a7d1-4952-b75d-d2ebf971f2bb/file0


BIN
Testdata/system/privileged/Secrets/initialsalt/518327c7-a7d1-4952-b75d-d2ebf971f2bb/file1


BIN
Testdata/system/privileged/Secrets/initialsalt/518327c7-a7d1-4952-b75d-d2ebf971f2bb/file2


+ 3 - 0
Testdata/system/privileged/Secrets/lockcodecheck/202adee0-eab6-477e-9858-28b6e9983c3c/file0

@@ -0,0 +1,3 @@
+org.sailfishos.secrets.plugin.encryptedstorage.sqlcipher
+¶dº™áØ„y©„yaׯÈ\ʼn<Óbâ
+ICI÷	›ÕÖÁo?‡Ä³‡™R

+ 3 - 0
Testdata/system/privileged/Secrets/lockcodecheck/202adee0-eab6-477e-9858-28b6e9983c3c/file1

@@ -0,0 +1,3 @@
+org.sailfishos.secrets.plugin.encryptedstorage.sqlcipher
+¶dº™áØ„y©„yaׯÈ\ʼn<Óbâ
+ICI÷	›ÕÖÁo?‡Ä³‡™R

+ 3 - 0
Testdata/system/privileged/Secrets/lockcodecheck/202adee0-eab6-477e-9858-28b6e9983c3c/file2

@@ -0,0 +1,3 @@
+org.sailfishos.secrets.plugin.encryptedstorage.sqlcipher
+¶dº™áØ„y©„yaׯÈ\ʼn<Óbâ
+ICI÷	›ÕÖÁo?‡Ä³‡™R

BIN
Testdata/system/privileged/Secrets/org.sailfishos.crypto.plugin.gnupg.openpgp/metadata.db


BIN
Testdata/system/privileged/Secrets/org.sailfishos.crypto.plugin.gnupg.openpgp/metadata.db-shm


BIN
Testdata/system/privileged/Secrets/org.sailfishos.crypto.plugin.gnupg.openpgp/metadata.db-wal


BIN
Testdata/system/privileged/Secrets/org.sailfishos.crypto.plugin.gnupg.smime/metadata.db


BIN
Testdata/system/privileged/Secrets/org.sailfishos.crypto.plugin.gnupg.smime/metadata.db-shm


BIN
Testdata/system/privileged/Secrets/org.sailfishos.crypto.plugin.gnupg.smime/metadata.db-wal


BIN
Testdata/system/privileged/Secrets/org.sailfishos.secrets.plugin.encryptedstorage.sqlcipher/metadata.db


BIN
Testdata/system/privileged/Secrets/org.sailfishos.secrets.plugin.encryptedstorage.sqlcipher/metadata.db-shm


BIN
Testdata/system/privileged/Secrets/org.sailfishos.secrets.plugin.encryptedstorage.sqlcipher/metadata.db-wal


BIN
doc/Contacts_OS3-2_Shema.png


+ 0 - 0
test/ContactRescue_1.py


+ 38 - 0
test/vcfExport_1.py

@@ -0,0 +1,38 @@
+# Doc
+#  Script to extract Contacts from Sailfish Contact SQLite DB located at 
+# ChangeLog
+
+import sqlite3
+import vobject
+
+SQLconn = sqlite3.connect('../Testdata/system/Contacts/qtcontacts-sqlite/contacts.db')
+
+
+try:
+    SQLContCur = SQLconn.cursor()
+    for row in SQLContCur.execute('SELECT * FROM Contacts'):
+            print(row[4] + ' ' + row[6])
+        
+            # contactID abfragen
+            contactID=row[0]
+            
+            vcf = vobject.vCard()
+            vcf.add('n')
+            vcf.n.value = vobject.vcard.Name( family=row[6], given=row[4] )
+            vcf.add('fn')
+            vcf.fn.value =row[1]
+            
+            SQLEmailCur = SQLconn.cursor()
+            ## Abfragen E-Mail-Adressen
+            for Emailrow in SQLEmailCur.execute('SELECT * from EmailAddresses JOIN Details on Details.detailId= EmailAddresses.detailId where EmailAddresses.contactId = ' + str(contactID)):
+                vcf.add('email')
+                vcf.email.value = Emailrow[2]
+                vcf.email.type_param = Emailrow[9]
+
+
+            vcf.prettyPrint()
+        
+            
+           
+except:
+    print("Error in executing SQL")