Add Linux cookie/token decryption for Slack and Discord#35
Merged
Conversation
Linux Chromium uses a hardcoded 'peanuts' password for cookie encryption. The Teams extractor already had this but Slack was missing it, causing all Linux users to get empty cookies and auth failures.
Same missing Linux decryption as Slack — encrypted tokens on Linux use the Chromium hardcoded 'peanuts' password but Discord had no Linux path, returning null for all encrypted tokens.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
peanutspassword viapbkdf2('peanuts', 'saltysalt', 1, 16, 'sha1'). The Teams extractor already had this, but Slack and Discord were missing it entirely — all Linux users got empty cookies/null tokens and auth failures.Changes
src/platforms/slack/token-extractor.tsdecryptV10CookieLinux()method using thepeanuts-derived key for AES-128-CBC decryption.linuxplatform to the new method intryDecryptCookie()before falling through to the macOS Keychain path.src/platforms/discord/token-extractor.tsdecryptLinuxToken()method using the samepeanuts-derived key, delegating to existingdecryptAESCBC().linuxplatform to the new method indecryptToken().Tests
decryptToken()returns the plaintext.Verified
bun test— 51 pass, 0 fail (across both test files).bun typecheck— clean.bun lint— clean, 166 files checked.Summary by cubic
Adds Linux decryption for Slack cookies and Discord tokens using Chromium’s hardcoded “peanuts” key to fix null cookies/tokens and auth failures for Linux users.
Written for commit ba35dff. Summary will update on new commits.