Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
A small javascript file for creating qr codes on the fly using the HTML5 Canvas element. By default VanillaQR.js will output a canvas element as it's domElement. If the canvas element and 2d context is not supported, it will create a table instead. Tables will not be able to output images so be sure to check that the image element exists.
<script src="VanillaQR.min.js"></script>
<script>
//Create qr object
//Minus the url, these are the defaults
var qr = new VanillaQR({
url: "https://github.com/chuckfairy/VanillQR.js",
size: 280,
colorLight: "#ffffff",
colorDark: "#000000",
//output to table or canvas
toTable: false,
//Ecc correction level 1-4
ecclevel: 1,
//Use a border or not
noBorder: false,
//Border size to output at
borderSize: 4
});
//Canvas or table is stored in domElement property
document.body.appendChild(qr.domElement);
//Alternatively you can create an image from the canvas
//png, jpg, jpeg, webp, gif, bmp, tiff, x-icon, svg+xml, xxx
//Currently canvas dataURL mime types are not the same
var imageElement = qr.toImage("png");
if(imageElement) {
document.body.appendChild(imageElement);
}
//You can recreate the qr code to a new url like so
//If you have appended the domElement it will change
qr.url = "https://github.com/chuckfairy";
qr.colorLight = "#0000000";
qr.colorDark = "#ffffff";
qr.init();
</script>
Through module
import VanillaQR from "VanillaQR"
//See above for more
var qr = new VanillaQR({
url: "https://github.com/chuckfairy/VanillQR.js",
});
All browsers with canvas and canvas 2d context support
Table support fallback
Vanilla QR is based on a port of a java qr code library that I can no longer find. When I do find it I'll be sure to give it proper credit. Thank you and have a nice day!
FAQs
Client Side QR Code Generator
We found that vanillaqr 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.