
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.
rustpotter-worklet
Advanced tools
Run Rustpotter (an open source wake word spotter forged in rust) in the browser as an AudioWorkletProcessor.
This package exposed a RustpotterService class that you can use to create and communicate with a worklet that runs rustpotter on its thread.
The RustpotterService should be able to download the code for the worklet and the rustpotter wasm module, by default it assumes the files "/rustpotter-worker.js", "/rustpotter-worklet.js" and "/rustpotter_wasm_bg.wasm" are available for download.
import { RustpotterService } from "rustpotter-worklet";
// Urls to the requires sources
const wasmModuleUrl = new URL('../node_modules/rustpotter-worklet/dist/rustpotter_wasm_bg.wasm', import.meta.url);
const workletUrl = new URL('../node_modules/rustpotter-worklet/dist/rustpotter-worklet.js', import.meta.url);
const workerUrl = new URL('../node_modules/rustpotter-worklet/dist/rustpotter-worker.js', import.meta.url);
// Init audio context
const audioContext = new AudioContext();
const rustpotter = await RustpotterService.new({
workletPath: workletUrl.href,
workerPath: workerUrl.href,
wasmPath: wasmModuleUrl.href,
averagedThreshold: 0.25,
threshold: 0.5,
sampleRate: audioContext.sampleRate
});
rustpotter.onDetection(d => console.log(d));
rustpotter.addWakewordByPath("/static/wakeword.rpw");
let rustpotterWorklet = rustpotter.getNodeProcessor();
// get media stream source node (requires user interaction event)
const stream = await navigator.mediaDevices.getUserMedia({
audio: {
autoGainControl: true,
echoCancellation: true,
noiseSuppression: true,
},
video: false,
});
const sourceNode = audioContext.createMediaStreamSource(stream);
// chain rustpotter audio processor
sourceNode.connect(rustpotterWorklet);
...
// If you need to recreate the worklet because the audio streaming was interrupted
rustpotter.disposeNodeProcessor();
rustpotterWorklet = rustpotter.getNodeProcessor();
...
// If you want to dispose rustpotter
rustpotter.close();
FAQs
An open source wakeword spotter forged in rust
The npm package rustpotter-worklet receives a total of 0 weekly downloads. As such, rustpotter-worklet popularity was classified as not popular.
We found that rustpotter-worklet 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.