-
-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't decrypt 'v11' cookies (v10 cookies are fine) #64
Comments
Have you looked through this thread by chance? #12 v11 cookies have been working. Are you using something like the gnome secret store? What is your DE? |
Thanks for the quick reply !
After re-reading the code, I get it now : In case it could help, I printed the
I redacted If I understand #12 correctly, I should replace the 'saltysalt' value by 'salt', right ? It's 'saltysalt' for v10 and 'salt' for v11 ? Further checks inspired from other issues :
So I have no idea of what to do now. |
I don't think so -- you might be looking at |
For the record : I was editing my previous comment while you were answering : |
To clarify after your last post, is your issue resolved? Or are you still having issues with the v11 cookies? The UTF8 errors usually mean that the encryption key (password) is incorrect. |
I still have the issue with v11 cookies but I gave up, I use now the |
No worries. I'm having a hard time reproducing because my Chromium (123, archlinux) is only producing v10 cookies. It sounds like yours is producing both v10 and v11 -- do you know if it is specific websites that are making the v11 ones? |
Out of 17 cookies I have for github.com , 3 are 'v10-encrypted' ' (their data begin with 76h 31h 30h), the 14 remaining are 'v11-encrypted' (their data begin with 76h 31h 31h) Idea : maybe you did not installed a gnome or kde keyring, and that's why your chromium has no access to a 'keyring key' (that is used for v11 encrypting) ? |
Thank you. Only showing v10 for GitHub.com -- must be the absence of a gnome / kde keyring (I use i3 as my DE). I'll tinker around some more and see if I can reproduce. |
It took me a while to set up an environment to try to replicate, but I finally have something workable. I did discover an issue related to enums not giving me the string that I expected when coerced to a string (there's a fair change this is due to a homebrew StrEnum and may not be an issue once my MSPV is >= 3.11). That issue should be resolved with 14001b8 However, that was giving me a totally different error, so I'm not sure whether or not it would help with your issue here. Otherwise, for my future reference, my process to get gnome keyring working on my Arch machine (on i3) was:
With all that done, I can verify that I have v11 keys, and that pycookiecheat seems to find them without issue, as long as it's installed in a way to give it access to the system gobject library. Specifically, my first $ /usr/bin/python -m venv --system-site-packages .venv
$ source .venv/bin/activate
$ python -m pip install pycookiecheat
$ python -m pycookiecheat --url https://github.com --browser chromium | jq -r keys[]
__Host-user_session_same_site
_device_id
_octo
disabled_global_site_banners
dotcom_user
has_recent_activity
logged_in
saved_user_sessions
user_session I can confirm that
I'm happy to see if we can sort out your issue, but since it sounds like you've moved on to another project, I'm going to close this as "cannot reproduce" -- thank you for your time and input! |
Thanks for taking the time to analyse this |
Hi! Different user here, seeing the same issue once I manually patch the source so it can find my Chromium cookies file (#65). For me the cause seem to be a failure to access they key material from libsecret. If I add a debug print at the end of Also,
which is strange, given that the gir1.2-secret-1 package is installed and /usr/lib/x86_64-linux-gnu/girepository-1.0/Secret-1.typelib exists, and that this succeeds from a REPL:
I wonder if the virtualenv that pipx set up for me is missing some pacakges, like pygobject? Yup, that was it
|
Unfortunately this would be problematic because when pycookiecheat/src/pycookiecheat/chrome.py Line 173 in cbfe5a6
|
My Issue
According to my tests, I can decrypt 'v10' cookies, but not 'v11'
For v11 cookies, I have the classic error :
WHYT
I did many tests to reproduce the problem with cookies from different websites.
The text was updated successfully, but these errors were encountered: