Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
chrome-cookies-secure-promise
Advanced tools
Extract encrypted Google Chrome cookies for a url on a Mac or Linux
Extract encrypted Google Chrome cookies for a url on Mac OS X or Linux
This is a fork of https://github.com/bertrandom/chrome-cookies-secure which is promise based.
yarn add chrome-cookies-secure-promise
url
should be a fully qualified url, e.g. http://www.example.com/path/
format
is optional and can be one of the following values:
format | description |
---|---|
curl | Netscape HTTP Cookie File contents usable by curl and wget |
jar | cookie jar compatible with request |
set-cookie | Array of Set-Cookie header values |
header | cookie header string, similar to what a browser would send |
object | (default) Object where key is the cookie name and value is the cookie value. These are written in order so it's possible that duplicate cookie names will be overriden by later values |
If format
is not specified, object
will be used as the format by default.
Cookie order tries to follow RFC 6265 - Section 5.4, step 2 as best as possible.
import * as chrome from 'chrome-cookies-secure-promise';
chrome.getCookies('http://www.example.com/path/')
.then(cookies => console.log(cookies));
import request from 'request';
import * as chrome from 'chrome-cookies-secure-promise';
chrome.getCookies('http://www.example.com/', 'jar')
.then(jar => request({url: 'http://www.example.com/', jar: jar}))
.then(body => console.log(body));
On OS X, this module requires Keychain Access to read the Google Chrome encryption key. The first time you use it, it will popup this dialog:
The SQLite database that Google Chrome stores its cookies is only persisted to every 30 seconds or so, so this can explain while you'll see a delay between which cookies your browser has access to and this module.
After checking out the repo, run yarn test
to run the tests.
To release a new version:
This will run the tests, update the version, create a git tag for the version, push git commits and tags. Publish the module file to npmjs.com.
Bug reports and pull requests are welcome on GitHub at https://github.com/johnf/chromecast-discover-node. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
This software is free to use under the MIT license. See the LICENSE file for license text and copyright information.
FAQs
Extract encrypted Google Chrome cookies for a url on a Mac or Linux
We found that chrome-cookies-secure-promise demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.