
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@impactdk/barcode-scanner
Advanced tools
A barcode scanner module, using a webassembly module built on [ZBar](https://github.com/ZBar/ZBar), which supports a variety of different barcodes.
A barcode scanner module, using a webassembly module built on ZBar, which supports a variety of different barcodes.
npm install --save @impactdk/barcode-scanner
As the default decoder for the scanner is dependant on a wasm module running in a worker, some assets need to be installed from the module and into the public assets of your own. It is advised to do this as part of your build:
install-wasm-decoder ./path/to/your/assets
This path is then later needed in the configuration of the decoder.
import { WasmDecoder, Scanner, IBarcode } from "@impactdk/barcode-scanner";
const videoElement: HTMLVideoElement = document.getElementById("scanner-video");
const decoder = WasmDecoder.getInstance("/public/path"); // A directory where the installed wasm decoder assets are made publicly available.
const scanner = new Scanner(videoElement, decoder, handleBarcode);
scanner.start();
function handleBarcode(barcode: IBarcode): void {
// Do something with the barcode...
}
// Scanner and decoder (when using included wasm decoder) must be disposed of properly to stop underlying running processes.
function teardown(): void {
scanner.stop();
WasmDecoder.removeInstance();
}
Include the submodule that checks the user's client for support, then lazily import a module using the scanner.
// lazy.ts
import { isBarcodeScannerSupported } from "@impactdk/barcode-scanner/lazy";
if (isBarcodeScannerSupported) {
const videoElement: HTMLVideoElement = document.getElementById("scanner-video");
import("./scanner-module")
.then(mod => ...);
} else {
console.log("Barcode scanner is not supported...");
}
// scanner-module.ts
import { WasmDecoder, Scanner, IBarcode } from "@impactdk/barcode-scanner";
...
FAQs
A barcode scanner module, using a webassembly module built on [ZBar](https://github.com/ZBar/ZBar), which supports a variety of different barcodes.
We found that @impactdk/barcode-scanner demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.