Created
December 12, 2024 19:40
-
-
Save meeuw/3e02a8f284bc2d5aa516a5ae2ef0ae1c to your computer and use it in GitHub Desktop.
List all secrets in gnome-keyring. Somewhat like secret-tool search --all where you don't have to specify any attributes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gi | |
gi.require_version('Secret', '1') | |
from gi.repository import Secret | |
for item in Secret.password_search_sync(None, {}, Secret.SearchFlags.ALL, None): | |
print(f'attributes {item.get_attributes()}') | |
print(f'label {item.get_label()}') | |
print(f'secret {item.retrieve_secret_sync().get()}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment