Hello, I installed Whisperfish, was able to log in and now it does not start. What can I do? have the latest version.
What is your SailfishOS version? Can you get a log of you trying to start Whisperfish? When did you last register; was there a period between the last time you used it and now?
Van harte bedankt voor jouw fantastische werk. Ik ben heugekijk verwachtend op 1.0.
Ikzelf ook in blijde verwachting van 1.0
Bedankt voor de steun!
Hello 4.2 ist installed
Did you just upgrade to the latest Whisperfish? If you have daemon mode enabled, you may want to reboot your phone after the upgrade.
Installation and registration were close together. Two hours ago
My Device is a Volla Phone
Hmm, could you come on Matrix (#whisperfish:rubdos.be) or Libera.chat? The latter is probably the quickest to come online: Kiwi IRC
That way, we donāt have to get the chatter on the forum
Issue already solved actually, since I edited AddDevice.qml (line 40) according to your previous commit in gitlab:
validator: RegExpValidator{ regExp: /tsdevice|sgnl://?.*/;}
Hmm, my commit used
validator: RegExpValidator{ regExp: /(tsdevice|sgnl):\/\/?.*/;}
But I assume both should work.
Is there any way to dump the conversation database?
Yesterday, I accidentally tried out axolotl on another Linux device and used the same mobile number for registration that I use with whisperfish. So I ended up with a disconnected state for whisperfish.
I was able to revive and re-register whisperfish by removing the config files in ~/.local/share/harbour-whisperfish and ~/.conf/harbour-whisperfish, though. Now, all my messages and attachments are unavailable, but I have a backup.
So I was wondering, whether there is any possibility to either dump my old conversations to a textfile, or to merge both databases, the old and the new one.
Any hints pointing me to the right directions are appreciated
Thereās an open issue about importing such a raw back-up:
Other than that, to export your messages, you need to get hold of your sqlcipher key and use sqlcipher to decrypt the database. Youāll find your messages in there. Itās currently undocumented how to do this. Maybe I should add a whisperfish-util
executable that does these things. I know @mjtorn has done some manual work in the database before; maybe Markus can shed some light on how he did this.
Thanks a lot! Iāll look into that and get back with my results (or more questions)
Awesome! Feel free to come and talk on Matrix for quicker feedback.
Heya!
#!/usr/bin/env python3.7
import hashlib
import sys
SALT_FILE = 'salt'
def main():
with open(SALT_FILE, 'rb') as f:
salt = f.read() # .strip()
assert len(salt) == 8, len(salt)
n, r, p, dklen = 16384, 8, 1, 32
# n, r, p, dklen = 16384, 8, 1, 64
password = b'PASSWORD_HERE'
crypt = hashlib.scrypt(password, salt=salt, n=n, r=r, p=p, maxmem=0, dklen=dklen)
chars = []
for c in crypt:
chars.append(b'%X' % c)
print(b''.join(chars))
with open('crypt', 'wb') as f:
f.write(crypt)
return 0
if __name__ == '__main__':
sys.exit(main())
Thatās the old ātemplateā I got for a script containing my password, which outputs what SQLCipher requires.
I built sqlitebrowser a year and a half ago or whenever to dig around the database file.
It needs āRaw keyā, āSQLCipher 4 defaultsā and the quoted content from that python thing prepended with 0x. Like 0x123ā¦ format.
Or it did last I tried
Hope this helps and that things havenāt changed!
Thanks for this script. I did something similar using the scrypt package.
print(scrypt.hash(pw, salt, buflen = 32).hex())
At least I now know, that both ways to generate the key, mine and yours, produce the same hex key in the end.
Nevertheless, I still canāt access the database using sqlcipher. I always get an error
Error: file is not a database
Doing the same on my Jolla Phone (sqlcipher 3.15), I get something similar:
Error: file is encrypted or is not a database
Iām tempted to revert to my non-working whisperfish config to see whether whisperfish can still read the database or if the database file is broken.
Thanks for pointing to sqlitebrowser
! I just installed that in ArchLinux but opening the file also tells me that it doesnāt seem to be a database. But maybe, Iām just too stupid to find out how to open an encrypted databaseā¦
Soā¦ Iāve been building sqlitebrowser
from source with -Dsqlcipher=1
and it is working now!
Yippieh!
I wonder, why it didnāt work from the command line using sqlcipher
ā¦
Anyhow, I will now play around a little, maybe I find a neat way to merge my old and new databases.
Thanks again for all effort!
UPDATE: The correct settings for the latest sqlcipher
command line tools are:
PRAGMA key = "x'1234...'"
PRAGMA cipher_page_size = 4096;
PRAGMA cipher_hmac_algorithm = HMAC_SHA1;
PRAGMA cipher_kdf_algorithm = PBKDF2_HMAC_SHA1;
Great job and thanks for sharing the details!
Now that you mentioned rebuilding sqlbrowser, I think thereāre two binaries in the Windows build; one for sqlcipher and one for sqliteā¦ Faint memories, could have been sqlitestudio, too, I tried them both at one timeā¦
If I may give you a hint here: make sure that all the conversations (session table) already exist before you start merging. Only merge messages and all sub-tables (i.e., attachments/reactions/ā¦), donāt introduce new sessions. Sessions are linked via a session state too, and thatās in a file that needs to exist before you merge stuff.
If you create some logic that does the merging, please do dump your scripts and tools in the merging issue! That way we already have a head start if weāre to implement it in WF itself