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/giter/captcha
Download and install it:
go get github.com/afocus/captcha
必须设置font
cap = captcha.New()
// 设置字体
cap.SetFont("comic.ttf")
// 创建验证码 4个字符 captcha.NUM 字符模式数字类型
// 返回验证码图像对象以及验证码字符串 后期可以对字符串进行对比 判断验证
img,str := cap.Create(4,captcha.NUM)
cap = captcha.New()
// 可以设置多个字体 或使用cap.AddFont("xx.ttf")追加
cap.SetFont("comic.ttf", "xxx.ttf")
// 设置验证码大小
cap.SetSize(128, 64)
// 设置干扰强度
cap.SetDisturbance(captcha.MEDIUM)
// 设置前景色 可以多个 随机替换文字颜色 默认黑色
cap.SetFrontColor(color.RGBA{255, 255, 255, 255})
// 设置背景色 可以多个 随机替换背景色 默认白色
cap.SetBkgColor(color.RGBA{255, 0, 0, 255}, color.RGBA{0, 0, 255, 255}, color.RGBA{0, 153, 0, 255})
img,str := cap.Create(4,captcha.NUM)
img1,str1 := cap.Create(6,captcha.ALL)
cap = captcha.New()
// 设置字体
cap.SetFont("comic.ttf")
img := cap.CreateCustom("hello")
look examples/main.go
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.