Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions keepasshttp/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def testAssociate(id_, key, requestor=None):
return requestor(key, input_data, id_)


def getLogins(url, id_, key, requestor=None):
def getLogins(url, id_, key, requestor=None, print_output=False):
"""Query keepass for entries that match `url`"""
requestor = requestor or DEFAULT_REQUESTOR
iv = crypto.getRandomIV()
Expand All @@ -50,7 +50,8 @@ def getLogins(url, id_, key, requestor=None):
'Url': crypto.encrypt(url, key, iv)
}
output = requestor(key, input_data, id_, iv=iv)
print output
if print_output:
print output
decrypted = [
crypto.decryptDict(entry, key, output['Nonce'])
for entry in output.get('Entries', [])
Expand Down