Package winvault provides primitives for accessing the undocumented Windows Vault API.
go get github.com/danieljoos/winvault
The following example prints the credentials stored by Internet Explorer:
package main
import (
"fmt"
"github.com/danieljoos/winvault"
)
func main() {
vault, err := winvault.OpenWebCredentials()
if err != nil {
panic(err)
}
defer vault.Close()
items, err := vault.Items()
if err != nil {
panic(err)
}
for _, item := range items {
fmt.Println("---")
fmt.Println("Application:", item.Name)
fmt.Println("Resource:", item.Resource.AsString())
fmt.Println("Username:", item.Identity.AsString())
fmt.Println("Password:", item.Authenticator.AsString())
}
}