Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve entries after association #1

Closed
mvrk69 opened this issue May 9, 2016 · 2 comments
Closed

Retrieve entries after association #1

mvrk69 opened this issue May 9, 2016 · 2 comments

Comments

@mvrk69
Copy link

mvrk69 commented May 9, 2016

Hi,

If i run like this, it makes the association and retrieves the logins ok:

kp = KeePassHTTP();
kp.key = "**********************";
kp.associate();

kp.is_running();

kp.is_associate();

kp.get_logins("https://xxxxxxxxxxxxxxxxxxxxxxxx.xxx");

But i shouldn't run associate every time right?

So, now after the 1st association, i run like this:

kp = KeePassHTTP();
kp.key = "**********************";
kp.is_running();
kp.is_associate();
kp.get_logins("https://xxxxxxxxxxxxxxxxxxxxxxxx.xxx");

and i get this error:

Traceback (most recent call last):
File "./keepasshttp.py", line 130, in
kp.get_logins("https://xxxxxxxxxxxxxxxxxxxxxxxx.xxx")
File "./keepasshttp.py", line 74, in get_logins
self._response_verfier(response)
File "./keepasshttp.py", line 46, in _response_verfier
generate_nonce = self._decrypt_data(base64.b64decode(response['Verifier']),
KeyError: 'Verifier'

Any ideas? Am i doing anything wrong?

@daynt
Copy link
Owner

daynt commented May 13, 2016

mhhh. ya, you dont save the key identifier.

register key


kp = KeePassHTTP()
# check if keepass is open
while not kp.is_running():
    time.sleep(1)

#register key
kp.associate()

# key name
id = kp.id
# key
key = kp.key

check key and get login

kp.id = "example name"
kp.key = "randomaeskey"


#check key
if not kp.is_associate():
    print 'key could not found in keepass'

login = kp.get_logins('https://example.com')

I hope this will help you.

@mvrk69
Copy link
Author

mvrk69 commented May 17, 2016

yes, i saved the ID and the KEY to a file after the association and now i read it from that file and works. Thanks for the help.

@daynt daynt closed this as completed May 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants