Giter Club home page Giter Club logo

Comments (27)

nmaupu avatar nmaupu commented on July 30, 2024 1

I am gonna check with my linux machine on monday.

from enpass-cli.

sajben94 avatar sajben94 commented on July 30, 2024 1

Install libsqlcipher-dev

sudo apt update
sudo apt install libsqlcipher-dev

then build pysqlcipher3 from source

git clone https://github.com/rigglemania/pysqlcipher3
cd pysqlcipher3
python setup.py build_amalgamation
python setup.py install

Done!

from enpass-cli.

nmaupu avatar nmaupu commented on July 30, 2024

I have the exact same problem on Linux and on Mac OS.
I tried the lib pysqlcipher3 alone (under mac os) and it does work :

#!/usr/bin/env python3

from pysqlcipher3 import dbapi2 as sqlite

conn = sqlite.connect('walletx.db')
c = conn.cursor()
c.execute("PRAGMA key = 'mypass'")
c.execute("PRAGMA kdf_iter = 24000")
c.execute("""SELECT name FROM sqlite_master WHERE type='table';""")

print(c.fetchall())

c.close()

Result :

[('Identity',), ('sqlite_sequence',), ('Cards',), ('Favorites',), ('Folders',), ('Folder_Cards',), ('Pool',), ('Password_History',), ('SecuritySettings',), ('Attachment',)]

from enpass-cli.

nmaupu avatar nmaupu commented on July 30, 2024

I fixed my own issue on this PR : #7

from enpass-cli.

heywoodlh avatar heywoodlh commented on July 30, 2024

Hmm. Tried running the code on Linux didn't see a difference. Also, the repo currently works just fine for me on OS X. So I'm not sure what the difference is there.

The import statement that you used in that code is exactly the same as the current repo:

if sys.platform == 'darwin':

    from pysqlcipher3 import dbapi2 as sqlite

    def copyToClip(message):

        p = subprocess.Popen(['pbcopy'],

                            stdin=subprocess.PIPE, close_fds=True)

        p.communicate(input=message.encode('utf-8'))

from enpass-cli.

heywoodlh avatar heywoodlh commented on July 30, 2024

Hopefully that didn't come off rude. I think your pull request is awesome! Hadn't even thought of making 'Y' the default response on the prompt to save the master password in the keychain.

I just don't know how this relates to this issue of enpass-cli not working on Linux. If you have additional insight that would help fix the Linux issue, that would be awesome. I totally would love to get this working under Linux.

from enpass-cli.

heywoodlh avatar heywoodlh commented on July 30, 2024

Thank you!

from enpass-cli.

nmaupu avatar nmaupu commented on July 30, 2024

When I changed the linux import to :

from pysqlcipher3 import dbapi2 as sqlite

It works.

from enpass-cli.

heywoodlh avatar heywoodlh commented on July 30, 2024

What Linux distro are you using? I have tried it on Kali Linux and Ubuntu and neither work. I'll have to stand up a new Linux VM and see if it is just my instances of Linux that are the problem.

from enpass-cli.

nmaupu avatar nmaupu commented on July 30, 2024

Debian testing
Try with my sample code copied above, it's reduced to the strict minimum.

from enpass-cli.

heywoodlh avatar heywoodlh commented on July 30, 2024

Interesting. Let me test on a new VM and I'll report back.

from enpass-cli.

heywoodlh avatar heywoodlh commented on July 30, 2024

Still not working correctly. I changed the import statement for Linux back to

from pysqlcipher3 import dbapi2 as sqlite

The error I get is still:

ModuleNotFoundError: No module named 'pysqlcipher3'

Not only did I install the dependencies in requirements.txt which includes pysqlcipher3==1.0.2 but I tried pip install pysqlcipher3. I have tried this in both Ubuntu 16.04, and Kali Linux.

I typically use virtual environments to keep all the repos separate, but I also tried installing the requirements globally outside of the virtualenv and running outside of the virtualenv.

from enpass-cli.

heywoodlh avatar heywoodlh commented on July 30, 2024

Any suggestions on getting around this would be appreciated! :)

from enpass-cli.

TheReptile avatar TheReptile commented on July 30, 2024

I tried installing this on Linux Mint and it failed as well, the pysqlcipher3 module wouldn't install.
I needed to install python3-dev before pysqlcipher3 would install. But with the recent changes I always get the error 'Invalid Password'

from enpass-cli.

nmaupu avatar nmaupu commented on July 30, 2024
pip3 install pysqlcipher3

?

from enpass-cli.

heywoodlh avatar heywoodlh commented on July 30, 2024

Yeah I installed via pip3, not working.

from enpass-cli.

TheReptile avatar TheReptile commented on July 30, 2024

the pip3 method wouldn't work until I installed python3-dev first.

from enpass-cli.

heywoodlh avatar heywoodlh commented on July 30, 2024

@TheReptile are you able to import pyslqcipher3 from a python3 interpreter?

from enpass-cli.

TheReptile avatar TheReptile commented on July 30, 2024

@heywoodlh Yes that seems to work here.

from enpass-cli.

heywoodlh avatar heywoodlh commented on July 30, 2024

Weird. I can't seem to import it. And I've got python3-dev installed.

from enpass-cli.

TheReptile avatar TheReptile commented on July 30, 2024

I just looked through my history and I also installed libsqlcipher-dev not sure if that was also needed.

from enpass-cli.

heywoodlh avatar heywoodlh commented on July 30, 2024

Interesting. Still not working for me for some reason.

from enpass-cli.

heywoodlh avatar heywoodlh commented on July 30, 2024

Also, can you successfully use the past versions of the repo?

https://github.com/HazCod/enpass-cli/tree/d984e7a0d2e99b637ceb4d10a8d1dd876aa8e058

from enpass-cli.

TheReptile avatar TheReptile commented on July 30, 2024

Yes, the older version works for me, after I remove the hardcoded path for niels in the script
I'll check later how I managed to get this working, it caused me some pain as well.

from enpass-cli.

heywoodlh avatar heywoodlh commented on July 30, 2024

Awesome. Thanks! Please submit a pull request when you figure out what the difference is that allows it to work on the old version vs the new version.

If you look at the history of the repo, the code I added to pass.py included a whole bunch of changes in order to optimize its usage on OS X. However, I tried to make separate the Linux code from OS X so it should have remained the same. Except for the import statement that uses this line from sqlite3 import dbapi2 as sqlite instead of from pysqlcipher3 import dbapi2 as sqlite because I couldn't get pysqlcipher3 to import on any of my Linux machines.

So I still need to figure out why I can't get pysqlcipher3 to import on my Linux machines.

from enpass-cli.

heywoodlh avatar heywoodlh commented on July 30, 2024

Fresh install of Arch Linux, still having the problem of not being able to import pysqlcipher3. Trying to build pysqlcipher3 manually to see if that will fix the problem.

from enpass-cli.

heywoodlh avatar heywoodlh commented on July 30, 2024

I was able to fix the issue by building pysqlcipher3 manually.

Everything works for me now. I am also going to build the option to store the master password in the keychain for Linux and submit a pull request when that is complete.

from enpass-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.