carderne / signal-export

Export your Signal chats to markdown files with attachments
Other
436 stars 46 forks source link

running on Windows using cygwin #38

Closed R-Zwi closed 2 years ago

R-Zwi commented 2 years ago

I'm trying to get it working on windows using cygwin (less overhead than WSL2). I ran python setup.py install which seems to have done a good job.

But it seems that it can't decrypt the database:

$ sigexport -lv --source /cygdrive/c/Users/myname/AppData/Roaming/Signal/

Fetching data from /cygdrive/c/Users/myname/AppData/Roaming/Signal/sql/db.sqlite

Traceback (most recent call last):
  File "/usr/local/bin/sigexport", line 33, in <module>
    sys.exit(load_entry_point('signal-export==1.0.1', 'console_scripts', 'sigexport')())
  File "/usr/local/lib/python3.8/site-packages/signal_export-1.0.1-py3.8.egg/sigexport/main.py", line 612, in cli
    run(main)
  File "/usr/local/lib/python3.8/site-packages/typer/main.py", line 864, in run
    app()
  File "/usr/local/lib/python3.8/site-packages/typer/main.py", line 214, in __call__
    return get_command(self)(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/typer/main.py", line 500, in wrapper
    return callback(**use_params)  # type: ignore
  File "/usr/local/lib/python3.8/site-packages/signal_export-1.0.1-py3.8.egg/sigexport/main.py", line 577, in main
    convos, contacts = fetch_data(db_file, key, manual=manual, chats=chats)
  File "/usr/local/lib/python3.8/site-packages/signal_export-1.0.1-py3.8.egg/sigexport/main.py", line 226, in fetch_data
    c.execute(query)
pysqlcipher3.dbapi2.DatabaseError: file is encrypted or is not a database

Any ideas? Should I enter a password somewhere? But where? I also tried -m but with basically the same result.

carderne commented 2 years ago

I’d encourage you to try the Docker instructions that were recently added to the bottom of the README. I haven’t tried on Windows yet but if you can get it working I’d love to hear about it! Planning to spend some time on this in the next weeks and hopefully make it the default method with a maintained Docker image so you don’t need to build it yourself.

R-Zwi commented 2 years ago

Thanks for the reply! I might give it a try and do some further investigations for running in cygwin. As soon as I find some time for it...

carderne commented 2 years ago

Just so it's clear: the Docker instructions should work pretty painlessly, as they just rely on being able to install Docker and then run docker run ... from a command line. All the complicated pysqlcipher stuff happens inside the Docker container.

R-Zwi commented 2 years ago

I decided to go with signal-backup-decode as it better fits my needs. So feel free to close this issue if you don't need it anymore.

Though I should mention that the install was quite easy so it might be worth a little investigating... ;-)

carderne commented 2 years ago

Thanks @R-Zwi for the heads up. That solution unfortunately doesn't work on iOS (no backup option) as far as I know, but probably an easier solution for Android users. Will add it to the README.

I think the Android exports are protobufs, which makes getting stuff out (and installing libraries to do so) much easier.