
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
cookie-management-js
Advanced tools
Package with some methods to simplify cookies management in javascript. Contains methods to add, get, delete, and update your cookies
npm i cookie-management-js
import { getItem, removeItem, setItem } from "cookie-management-js";
// Will store a cookie at the key "testKey", with the value "testValue", that will expires in 3 days, at the path "/testPath"
setItem("testKey", "testValue", 3, "/testPath");
// >> "testValue"
console.log(getItem("testKey"));
// The cookie will be cleared, and expired
deleteItem("testKey", "/testPath");
// >> ""
console.log(getItem("testKey"));
import { setItem } from "cookie-management-js";
setItem("key1", "a string expiring in 3 days at the path /path", 3, "/path");
setItem("key2", {"name": "an object expiring in 7 days at the path /"});
setItem("key3", [1, 2, 3]);
void
// Use the values stored in the example of the setItem method
import { getItem } from "cookie-management-js";
// >> "a string expiring in 3 days at the path /path"
console.log("key1")
// >> {name: "an object expiring in 7 days at the path /"}
console.log("key2")
// >> [1, 2, 3]
console.log("key3")
// >> -1
console.log("key4")
The content of the cookie, JSON parsed if possible. If no content is found at this key, return -1
// Use the values stored in the example of the setItem method
import { removeItem, getItem } from "cookie-management-js";
// >> true
console.log(removeItem("key1"));
// After remove
// >> ""
console.log(getItem("key1"));
// >> false
console.log(removeItem("key4"))
If the cookie is deleted, returns true. If the key or path is wrong, returns false
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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.