Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
github.com/zhang-jianqiang/go-qrcode
Package qrcode implements skip2/go-qrcode
A QR Code is a matrix (two-dimensional) barcode. Arbitrary content may be encoded, with URLs being a popular choice :)
Each QR Code contains error recovery information to aid reading damaged or obscured codes. There are four levels of error recovery: Low, medium, high and highest. QR Codes with a higher recovery level are more robust to damage, at the cost of being physically larger.
go get github.com/zhang-jianqiang/go-qrcode
package main
import (
"fmt"
"github.com/zhang-jianqiang/go-qrcode"
)
func main() {
// Create png 100*100
var img []byte
img, _ = qrcode.Encode("https://cn.bing.com", qrcode.High, 100)
fmt.Println(img)
// Create png and write a file
err := qrcode.WriteFile("https://cn.bing.com", qrcode.High, 100, "qrcode.png")
fmt.Println(err)
// Custom border blank
img, _ = qrcode.Encode("https://cn.bing.com", qrcode.High, 100, qrcode.WithBorderSize(1))
// Or
err = qrcode.WriteFile("https://cn.bing.com", qrcode.High, 100, "qrcode.png", qrcode.WithBorderSize(1))
fmt.Println(err)
// Add logo
logo, _ := os.Open("logo.png")
img, _ = qrcode.Encode("https://cn.bing.com", qrcode.High, 100, qrcode.WithLogo(&qrcode.Logo{
File: logo,
Size: 40,
}))
// Or
err = qrcode.WriteFile("https://cn.bing.com", qrcode.High, 100, "qrcode.png", qrcode.WithLogo(&qrcode.Logo{
File: logo,
Size: 40,
}))
fmt.Println(err)
}
FAQs
Unknown package
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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.