
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.
chrome-remote-debug-protocol
Advanced tools
Auto generated crdp.d.ts typings from protocol.json files used by Chrome Remote Debugging Protocol
This package is purely a typings typescript d.ts interface that is automatically generated.
It has scripts to download the latest protocol.json files from the Chromium repo, verify structural integrity based on protocol.d.ts and generate a crdp.d.ts typescript interface.
Travis CI runs a nightly job to check that protocol.json from google doesn't have structural breaks. Thanks to this project, a few have already been detected and fixed.
crdp.d.ts is a JsonRpc2 compliant interface. It is meant to be used with noice-json-rpc package.
Rather than callbacks, noice-json-rpc returns Promises. This means it can be used async-await style.
noice-json-rpc also provides a .api()
to return an ES6 proxy which provides a clean api.Domain.function() calls.
Checkout this project. Install the dependencies (see .travis.yml) and run
npm run download-protocols
npm run generate-crdp
import fs from 'fs'
import Crdp from 'chrome-remote-debug-protocol'
import {Client} from 'noice-json-rpc'
// run connects to `node --inspect --debug-brk` process, and profiles the execution of a script
async function run() {
try {
// We want the api to be a CrdpClient
const api:Crdp.CrdpClient = new Client(new WebSocket("ws://localhost:8080"), {logConsole: true}).api()
// Initialize debugging
await Promise.all([
api.Runtime.enable(),
api.Debugger.enable(),
api.Profiler.enable(),
api.Runtime.run(),
])
// Wait until the script finishes
await new Promise((resolve) => api.Runtime.onExecutionContextDestroyed(resolve))
// Get the cpuProfile back
const cpuProfile = await api.Profiler.stop()
// Save it to a file
fs.writeFileSync("profile.cpuProfile", JSON.stringify(cpuProfile), 'utf-8')
} catch (e) {
console.error(e)
}
}
run()
FAQs
Auto generated crdp.d.ts typings from protocol.json files used by Chrome Remote Debugging Protocol
We found that chrome-remote-debug-protocol 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
/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.