
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
cookiestorage
Advanced tools
Browserify-compatible module to get and set cookies in the browser using Storage API
Manage document.cookie
using the Storage API.
NOTE: originally a fork of cookie-monster, itself a fork of cookie-cutter.
npm install cookiestorage
var cookieStorage = require('cookiestorage');
var cookie = cookieStorage(document);
Return a new cookie object with .getItem()
and .setItem()
operating on document
.
The provided document
should have a non-referentially transparent cookie
property
like the DOM's variant where assignment with optional path and expiry creates a
new cookie in the getter as a key=value pair.
If document is not provided, uses the global document
if it exists. Otherwise, creates a new plain object {cookie:''}
.
If given a string, uses { cookie: givenString }
.
Returns number of key/value pairs present in document.cookie
Returns the cookie value for key
.
Sets the cookie at key
to value
with additional options:
expires
: Will be parsed by new Date(expires)
which accepts String
formatted per RFC 2822 or ISO-8601, Number
of milliseconds since 1 January 1970 00:00:00 UTC (Unix Epoch), or literal Date
objects.domain
: see cookie documentationpath
: see cookie documentationsecure
: see cookie documentationReturns the key (name) of the nth key/value pair in document.cookie
. Order is dependent on browser implementation. May not be alphabetical, or even consistent. Use this with caution. (It is added solely for consistency with the Storage API.)
Removes the given key from document.cookie
.
Clears document.cookie
of all key/value pairs.
FAQs
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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.