Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
chrome-debugging-client
Advanced tools
An async/await friendly Chrome debugging client with TypeScript support
An async/await friendly Chrome debugging client with TypeScript support, designed with automation in mind.
Features:
Example:
import { createSession } from "chrome-debugging-client";
// import protocol domains "1-2", "tot", or "v8"
import { HeapProfiler } from "chrome-debugging-client/dist/protocol/tot";
createSession(async (session) => {
// spawns a chrome instance with a tmp user data
// and the debugger open to an ephemeral port
const process = await session.spawn("canary", {
additionalArguments: ['--headless'],
windowSize: { width: 640, height: 320 }
});
// open the REST API for tabs
const client = session.createAPIClient("localhost", process.remoteDebuggingPort);
const tabs = await client.listTabs();
const tab = tabs[0];
await client.activateTab(tab.id);
// open the debugger protocol
// https://chromedevtools.github.io/devtools-protocol/
const debuggerClient = await session.openDebuggingProtocol(tab.webSocketDebuggerUrl);
// create the HeapProfiler domain with the debugger protocol client
const heapProfiler = new HeapProfiler(debuggerClient);
await heapProfiler.enable();
// The domains are optional, this can also be
// await debuggerClient.send("HeapProfiler.enable", {})
let buffer = "";
heapProfiler.addHeapSnapshotChunk = (evt) => {
buffer += evt.chunk;
});
await heapProfiler.takeHeapSnapshot({ reportProgress: false });
await heapProfiler.disable();
return JSON.parse(buffer);
}).then((data) => {
console.log(data.snapshot.meta);
}).catch((err) => {
console.error(err);
});
By default, this tool launches Chrome Canary. It may error if it cannot find the executable. For this and other reasons, you can configure the executable path like so:
// example for macOS
let browser = await session.spawnBrowser('exact', {
executablePath: '/Users/someone/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary'
});
FAQs
An async/await friendly Chrome debugging client with TypeScript support
The npm package chrome-debugging-client receives a total of 740 weekly downloads. As such, chrome-debugging-client popularity was classified as not popular.
We found that chrome-debugging-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.