You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installing gcc, "pip3 install pykeepass" succeeded.
Unfortunaty, importing it causes the following assertion error:
Python 3.7.4 (default, Jul 24 2019, 06:55:16)
[GCC 7.3.0] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import pykeepass
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.7/site-packages/pykeepass/__init__.py", line 2, in <module>
from .pykeepass import PyKeePass, create_database
File "/usr/lib/python3.7/site-packages/pykeepass/pykeepass.py", line 23, in <module>
from pykeepass.kdbx_parsing.kdbx import KDBX
File "/usr/lib/python3.7/site-packages/pykeepass/kdbx_parsing/__init__.py", line 1, in <module>
from .kdbx import KDBX
File "/usr/lib/python3.7/site-packages/pykeepass/kdbx_parsing/kdbx.py", line 2, in <module>
from .kdbx3 import DynamicHeader as DynamicHeader3
File "/usr/lib/python3.7/site-packages/pykeepass/kdbx_parsing/kdbx3.py", line 10, in <module>
from .common import (
File "/usr/lib/python3.7/site-packages/pykeepass/kdbx_parsing/common.py", line 2, in <module>
from .twofish import Twofish
File "/usr/lib/python3.7/site-packages/pykeepass/kdbx_parsing/twofish.py", line 27, in <module>
from . import pytwofish
File "/usr/lib/python3.7/site-packages/pykeepass/kdbx_parsing/pytwofish.py", line 395, in <module>
assert b'l\xb4V\x1c@\xbf\n\x97\x05\x93\x1c\xb6\xd4\x08\xe7\xfa' == Twofish(__testkey).encrypt(__testdat)
AssertionError
The text was updated successfully, but these errors were encountered:
I took a quick look at the source of pytwofish.py, and it seems that WORD_BIGENDIAN is set to 1 on Solaris, which is correct in principle, but not in practice, at least not for the self-test code that now takes a different execution path for pure python data depending on endianness, which seemed wrong. So by commenting out lines 143-144:
# if sys.byteorder == 'big':
# WORD_BIGENDIAN = 1
it starts to work. It also seems to be working fine reading a keepass created on Windows (Intel little endian).
Is the endianness present in the KeePass database? So if I were to create one on Solaris KeePassX (assuming one exists), would that not be usable on Windows?
To me it looks like all branches where WORD_BIGENDIAN is true could be cleaned up from the code in pytwofish.py, or the self test would need to have a different data set for BIGENDIAN machines, assuming that the KeePass data really could be big-endian.
Hi,
After installing gcc, "pip3 install pykeepass" succeeded.
Unfortunaty, importing it causes the following assertion error:
The text was updated successfully, but these errors were encountered: