Autocommit of file /home/julien/scripts/list-gnome-keyring-pwd.py changed on host...
authorJulien Valroff <julien@kirya.net>
Tue, 3 Jan 2012 19:13:29 +0000 (20:13 +0100)
committerJulien Valroff <julien@kirya.net>
Tue, 3 Jan 2012 19:13:29 +0000 (20:13 +0100)
list-gnome-keyring-pwd.py [new file with mode: 0755]

diff --git a/list-gnome-keyring-pwd.py b/list-gnome-keyring-pwd.py
new file mode 100755 (executable)
index 0000000..d5a1ffb
--- /dev/null
@@ -0,0 +1,21 @@
+#!/usr/bin/python
+
+# source: http://blog.schmichael.com/2008/10/30/listing-all-passwords-stored-in-gnome-keyring/
+
+import pygtk
+pygtk.require('2.0')
+import gtk # sets app name
+import gnomekeyring
+def hack():
+    for keyring in gnomekeyring.list_keyring_names_sync():
+        for id in gnomekeyring.list_item_ids_sync(keyring):
+            item = gnomekeyring.item_get_info_sync(keyring, id)
+            print '[%s] %s = %s' % (
+                    keyring, item.get_display_name(), item.get_secret())
+        else:
+            if len(gnomekeyring.list_item_ids_sync(keyring)) == 0:
+                print '[%s] --empty--' % keyring
+if __name__ == '__main__':
+    hack()