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

Get reference from entry #89

Open
hba opened this issue Sep 7, 2022 · 4 comments
Open

Get reference from entry #89

hba opened this issue Sep 7, 2022 · 4 comments

Comments

@hba
Copy link

hba commented Sep 7, 2022

Hello,

I use the Reference in my keepass and I can't display the content.

Is there a way to follow, and display the reference directly ?

fmt.Println(entry.GetTitle())

return :

fmt.Println({REF:P@I:BE8116351FDF544E8BC5708C777E3E73})

thanks

@tobischo
Copy link
Owner

tobischo commented Sep 7, 2022

Hi @hba,
I am not entirely sure which reference you are referring to.
If this is what your example returns, then that is what is defined as title and what is visible as entry title.

The value itself is stored in the values list

Values []ValueData `xml:"String,omitempty"`
in the entry:
type ValueData struct {

What specific keepass implementation are you using that returns this reference?

gokeepasslib is just a library which allows reading and writing keepass files. The goal is explicitly not to provide the convenience functions that a UI application would offer. That is up to the implementer to define how they would like their tool to behave.

@hba
Copy link
Author

hba commented Sep 8, 2022

Hi @tobischo,

Thank you for the quick reply.

I migrate a python application, in python I used this function:

https://github.com/libkeepass/pykeepass/blob/e0d86b6880bf96ff6873889c453cb3d2168c999a/pykeepass/pykeepass.py#L657

@tobischo
Copy link
Owner

tobischo commented Sep 8, 2022

As of right now, that is not supported and you would have to parse and look the value behind it up yourself

I think I never used that feature in keepass itself, so in order to implement that I would need an example keepass file

@hba
Copy link
Author

hba commented Sep 8, 2022

here is an example with a keepass file with an entry "foo" which refers to a password "bar". I put the python example and the golang example:

https://github.com/hba/keepass_test/

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