1

I'm trying to programmatically get the key which my Chrome browser uses to encrypt its cookies. But whatever tool I consider, it appears that I need to know a service and a username (or an 'attribute' and 'value'). How can I find discover these values?

(In Chrome v11, the key is stored in the gnome keyring (I think?), and indeed, when I fetch the key using the "Passwords and Keys" GUI, it decrypts the cookies accurately.)

enter image description here

I've tried my best guess, running keyring get 'Chromium Safe Storage' $(whoami), but that outputs nothing and returns an error code of 1. I've also tried keyring get keyring.backends.SecretService.Keyring chromium

Jellicle
  • 849

1 Answers1

0

I'm not sure about SERVICE or USERNAME still, but here is the usage for secret-tool:

secret-tool lookup application chromium

How would you know what attribute+value pair will match the Chromium Safe Storage entry?

# Python 3
import secretstorage
connection = secretstorage.dbus_init()
collection = secretstorage.Collection(connection)
for item in collection.get_all_items():
     print('%16s %s' % (item.get_label(), item.get_attributes()))
Jellicle
  • 849