๐ง Email: [email protected]
๐ Website: https://www.pagenotfound.de
Keepass HTTP implementation in Python to use with ChromeIPass
๐ง Email: [email protected]
๐ Website: https://www.pagenotfound.de
on the question "Should be the client accepted? [y/N]", when entering "N", "no", "No" or "n", the answer is interpreted as a "yes", and the followup "Give the client a name: " is prompted.
This isn't a show-stopper, but my DB was using a keyfile, and (unless I've missed something) it appears python-keepass-httpd doesn't have an option to use them.
The workaround is obviously to use a DB without a keyfile, but perhaps it'd be something nice to have in the future?
I have already been looking into the code and started working on it, just wanted to make sure nobody else tries to integrate this already ;)
This was tested on MacOS only.
On clicking "associate" in the browser, the UI-focus is kept on the browser. Instead, it should be set to the "Create new association with the browser?" dialogue.
This is necessary to prevent confusion, because after clicking "associate" in the browser, it seems like nothing happens even though the popup is opened in the background.
When associating, a python application is started on my desktop, but it freezes instantly. killing the python application also kills the server.
tested on MacOS 10.9
Installing on OS X worked like a charm.
But now
python-keepass-httpd --version
leads to
Traceback (most recent call last):
File "/usr/local/bin/python-keepass-httpd", line 11, in <module>
sys.exit(main())
File "/Library/Python/2.7/site-packages/keepass_http/scripts/python_keepass_httpd.py", line 69, in main
backend = backends.BaseBackend.get_by_filepath(database_path)
File "/Library/Python/2.7/site-packages/keepass_http/backends/__init__.py", line 73, in get_by_filepath
mimetype = mimetypes.guess_type(filepath)[0]
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/mimetypes.py", line 295, in guess_type
return _db.guess_type(url, strict)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/mimetypes.py", line 114, in guess_type
scheme, url = urllib.splittype(url)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 1071, in splittype
match = _typeprog.match(url)
TypeError: expected string or buffer
Any hints ideas?
It appears that the password cannot be read from a terminal (or even stdin). This is very insecure since the master password is available in the process list to other users on the same system, and also left in the shell's command history.
It would be really awesome if a prompt for the master password was presented on the terminal if one was not provided on the command line.
Not sure how both combined work together in keypass-http but I couldnt see any conditional to add the key to the password.
Using keeypassX 2.02
Here's an error I get when I use a database created in Windows on my Mac. It seems to occur when I go to a page with certain logins. I can try and create a test kdbx file if it is useful.
Andrew
[ERROR] 2014-05-02 12:46:37 keepass_http.httpd.server: Exception on / [POST]
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/Library/Python/2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Library/Python/2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Library/Python/2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/Library/Python/2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/Library/Python/2.7/site-packages/keepass_http-0.4.1-py2.7.egg/keepass_http/httpd/server.py", line 24, in handle
response = req_map[request_type](request.json)
File "/Library/Python/2.7/site-packages/keepass_http-0.4.1-py2.7.egg/keepass_http/httpd/requests.py", line 70, in __call__
self.process()
File "/Library/Python/2.7/site-packages/keepass_http-0.4.1-py2.7.egg/keepass_http/httpd/requests.py", line 160, in process
json_entry = entry.to_json_dict(self.response_kpc)
File "/Library/Python/2.7/site-packages/keepass_http-0.4.1-py2.7.egg/keepass_http/backends/__init__.py", line 25, in to_json_dict
return {"Name": kpc.encrypt(self.title),
File "/Library/Python/2.7/site-packages/keepass_http-0.4.1-py2.7.egg/keepass_http/crypto.py", line 16, in encrypt
encrypted_message = libkeepass_crypto.aes_cbc_encrypt(message, self.key, self.iv)
File "build/bdist.macosx-10.9-intel/egg/libkeepass/crypto.py", line 30, in aes_cbc_encrypt
return cipher.encrypt(data)
File "build/bdist.macosx-10.9-intel/egg/Crypto/Cipher/blockalgo.py", line 244, in encrypt
return self._cipher.encrypt(plaintext)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xb7' in position 8: ordinal not in range(128)
[INFO] 2014-05-02 12:46:37 werkzeug: 127.0.0.1 - - [02/May/2014 12:46:37] "POST / HTTP/1.1" 500 -
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.