Created
October 14, 2021 13:18
-
-
Save antoninkriz/4471105ee23543b118f15e2c495f7ad1 to your computer and use it in GitHub Desktop.
Prints all saved secrets in Gnome Keyring using Python 2
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
#!/usr/bin/env python | |
import gnomekeyring as gk | |
for keyring in gk.list_keyring_names_sync(): | |
print('=== KEYRING ' + keyring + ' ===') | |
for keyItem in gk.list_item_ids_sync(keyring): | |
try: | |
key = gk.item_get_info_sync(keyring, keyItem) | |
except: | |
print 'Error fetching key ' + keyItem + ' from keyring ' + keyring | |
continue | |
print key.get_display_name() + ' : ' + key.get_secret() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment