raymontag / kppy

A Python-module to provide an API to KeePass 1.x files commonly used by KeePassX.
http://raymontag.github.com/kppy
ISC License
28 stars 4 forks source link

pycryptodome or pycryptodomex? #14

Closed ilovezfs closed 6 years ago

ilovezfs commented 6 years ago
iMac-TMP:mykeepassc180 joe$ virtualenv -ppython3 v
Running virtualenv with interpreter /usr/local/bin/python3
Using base prefix '/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/joe/Developer/mykeepassc180/v/bin/python3.6
Also creating executable in /Users/joe/Developer/mykeepassc180/v/bin/python
Installing setuptools, pip, wheel...done.
iMac-TMP:mykeepassc180 joe$ . v/bin/activate
(v) iMac-TMP:mykeepassc180 joe$ pip3 install keepassc
Collecting keepassc
Collecting kppy (from keepassc)
Collecting PyCryptodome (from keepassc)
  Using cached https://files.pythonhosted.org/packages/9c/83/8f8a9e94d3cc495dd49082ac79e366b368cd10c8d25734fbcea59de93e5a/pycryptodome-3.6.1-cp36-cp36m-macosx_10_6_intel.whl
Installing collected packages: PyCryptodome, kppy, keepassc
Successfully installed PyCryptodome-3.6.1 keepassc-1.8.0 kppy-1.5.1
(v) iMac-TMP:mykeepassc180 joe$ ./v/bin/keepassc --help
Traceback (most recent call last):
  File "./v/bin/keepassc", line 13, in <module>
    from kppy.database import KPDBv1
  File "/Users/joe/Developer/mykeepassc180/v/lib/python3.6/site-packages/kppy/database.py", line 11, in <module>
    from Cryptodome import Random
ModuleNotFoundError: No module named 'Cryptodome'
(v) iMac-TMP:mykeepassc180 joe$ pip3 install pycryptodomex
Collecting pycryptodomex
  Using cached https://files.pythonhosted.org/packages/11/8d/05bcf8e039e989c0dd4a645a66e5fcda873718b2ff8350c7d77c3b1f2a20/pycryptodomex-3.6.1-cp36-cp36m-macosx_10_6_intel.whl
Installing collected packages: pycryptodomex
Successfully installed pycryptodomex-3.6.1
(v) iMac-TMP:mykeepassc180 joe$ ./v/bin/keepassc --help
usage: keepassc [-h] [--asroot] [-d DATABASE] [-k KEYFILE] [-c]
                [-as ADDRESS_SERVER] [-ps PORT_SERVER] [-pa PORT_AGENT] [-a]
                [-dc] [-s] [-e ENTRY] [-l]

optional arguments:
  -h, --help            show this help message and exit
  --asroot              parse option to execute keepassc as root user
  -d DATABASE, --database DATABASE
                        Path to database file.
  -k KEYFILE, --keyfile KEYFILE
                        Path to keyfile.
  -c, --curses          Use curses interface while using a remote connection.
  -as ADDRESS_SERVER, --address_server ADDRESS_SERVER
                        Server address (not required if using agent)
  -ps PORT_SERVER, --port_server PORT_SERVER
                        Server port (not required if using agent)
  -pa PORT_AGENT, --port_agent PORT_AGENT
                        Agent port
  -a, --agent           Use agent for remote connection
  -dc, --direct_conn    Connect directly to server
  -s, --ssl             Use SSL/TLS
  -e ENTRY, --entry ENTRY
                        Print entry with parsed title You will see a password
                        prompt; leave it blank if you only want to use a key-
                        file Just type a part of the entry title lower-case,
                        it's case-insensitive and will search for matching
                        string parts WARNING: Your passwords will be displayed
                        directly on your command line!
  -l, --log_level       Set logging level for network use. Default is ERROR
                        but for analyzing network flow INFO could be useful.
                        Set it with keepassc [...] -l [...] to INFO
(v) iMac-TMP:mykeepassc180 joe$ 
raymontag commented 6 years ago

It seems there was a problem in testing PyCryptodome. I experienced similar issues today while it worked during testing the change. Will look into that.

raymontag commented 6 years ago

@ilovezfs I uploaded keepassc 1.8.1 and kppy 1.5.2, could you please confirm that it works now?

ilovezfs commented 6 years ago

@raymontag yes, it works! See https://github.com/Homebrew/homebrew-core/pull/27931 which is now ✅

raymontag commented 6 years ago

Perfect, thanks for reporting!

ilovezfs commented 6 years ago

You're welcome!