Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Customisable javascript video stream QR Code scanner
npm install scannqr
// ES6 import
import {QRScanner} from "/your-path-to-scanner/dist/scannqr.js";
// CommonJS require
const {QRScanner} = require("/your-path-to-scanner/dist/scannqr.js");
<script src="/your-path-to-scannqr/dist/scannqr.js"></script>
<form class="qrscanner__wrapper">
<button class="qrscanner__startBtn" type="button">Scan</button>
<input class="qrscanner__input"/>
<button class="qrscanner__submitBtn">Submit</button>
</form>
</div>
<link rel="stylesheet" href="/your-path-to-scannqr/dist/css/scannqr.css"/>
const qrscanner = new QRScanner({
wrapper: document.querySelector('.qrscanner__wrapper'),
startBtn: document.querySelector('.qrscanner__startBtn'),
output: document.querySelector('.qrscanner__input'),
submitBtn: document.querySelector('.qrscanner__submitBtn'),
//See list of all possible options below
});
wrapper
Type: HTMLElement
Element to append scanner
startElement
Type: HTMLElement
Element to commence scanning and calculate starting position
output
Type: String
Input element to output QR code message
submitBtn
Type: String
Submit button to click on successful QR code extraction
backBtnHTML
Type: string
Default:Go Back
HTML used for scanner background prior/instead of video display
handleSuccess
Type: Function
Default:
function() {
await this.outlineQRCode();
await this.stop();
if (this.output) this.output.value = this.QRCode.data;
if (this.submitBtn) this.submitBtn.click();
}
Customisable callback for successful QR code detection - default outlines QR code, populates input and submits form
primaryColor
Type: String
Default: #03a803
Primary color used for scanner e.g. used to draw on canvas
FAQs
Customisable javascript video scanner with the ability to scan QR codes
The npm package scannqr receives a total of 0 weekly downloads. As such, scannqr popularity was classified as not popular.
We found that scannqr 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
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.