Created
February 18, 2024 16:25
-
-
Save lukeross/6023658c54f88dee790ad3c65dbec1d9 to your computer and use it in GitHub Desktop.
Extract stored passwords from libsecret
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 | |
""" | |
# extract_secret_storage.py | |
Dumps out the contents of your libsecret storage (eg. gnome-keyring). | |
Requires: | |
- <https://www.python.org/> | |
- <https://pypi.org/project/SecretStorage/> | |
""" | |
import secretstorage | |
connection = secretstorage.dbus_init() | |
collection = secretstorage.get_default_collection(connection) | |
for item in collection.get_all_items(): | |
print(repr([item.get_label(), item.get_secret(), item.get_attributes()])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment