![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
github.com/tobischo/gokeepasslib/v2
gokeepasslib is a library which allows reading Keepass 2 files (kdbx).
Note: only Keepass v2.30 or higher is properly supported since earlier versions do not allow empty XML tags but expected self-closing tags (which is valid XML but not really supported by Golang on XML marshaling) Basically: this lib can probably read most Keepass2 files, but only Keepass v2.30 can be expected to read files created in this lib.
Use go get
to retrieve the latest version:
go get -u github.com/tobischo/gokeepasslib
Include it in an application (modulized):
import "github.com/tobischo/gokeepasslib/v2"
For non-modulized applications use:
import "github.com/tobischo/gokeepasslib"
Note that this may cause breaking changes when updating from a previous version.
package main
import (
"fmt"
"github.com/tobischo/gokeepasslib/v2"
"os"
)
func main() {
file, _ := os.Open("examples/example.kdbx")
db := gokeepasslib.NewDatabase()
db.Credentials = gokeepasslib.NewPasswordCredentials("abcdefg12345678")
_ = gokeepasslib.NewDecoder(file).Decode(db)
db.UnlockProtectedEntries()
entry := db.Content.Root.Groups[0].Groups[0].Entries[0]
fmt.Println(entry.GetTitle())
fmt.Println(entry.GetPassword())
}
Note the db.UnlockProtectedEntries()
call: you have to unlock protected entries before using the database
and call db.LockProtectedEntries()
before saving it to ensure that the passwords are not stored in plaintext in the xml.
In kdbx files, which are encrypted using the file credentials, fields are protected with another stream cipher.
See examples/example-writing.go
See examples/example-deleting.go
Copyright © 2019 Tobias Schoknecht. All rights reserved.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.