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/miihael/pb
Please use v3 version go get github.com/cheggaaa/v3
- it's a continuation of the v2, but in the master branch and with the support of go modules
This is proposal for the second version of progress bar
go get gopkg.in/cheggaaa/pb.v2
package main
import (
"gopkg.in/cheggaaa/pb.v2"
"time"
)
func main() {
simple()
fromPreset()
customTemplate(`Custom template: {{counters . }}`)
customTemplate(`{{ red "With colors:" }} {{bar . | green}} {{speed . | blue }}`)
customTemplate(`{{ red "With funcs:" }} {{ bar . "<" "-" (cycle . "↖" "↗" "↘" "↙" ) "." ">"}} {{speed . | rndcolor }}`)
customTemplate(`{{ bar . "[<" "·····•·····" (rnd "ᗧ" "◔" "◕" "◷" ) "•" ">]"}}`)
}
func simple() {
count := 1000
bar := pb.StartNew(count)
for i := 0; i < count; i++ {
bar.Increment()
time.Sleep(time.Millisecond * 2)
}
bar.Finish()
}
func fromPreset() {
count := 1000
//bar := pb.Default.Start(total)
//bar := pb.Simple.Start(total)
bar := pb.Full.Start(count)
defer bar.Finish()
bar.Set("prefix", "fromPreset(): ")
for i := 0; i < count/2; i++ {
bar.Add(2)
time.Sleep(time.Millisecond * 4)
}
}
func customTemplate(tmpl string) {
count := 1000
bar := pb.ProgressBarTemplate(tmpl).Start(count)
defer bar.Finish()
for i := 0; i < count/2; i++ {
bar.Add(2)
time.Sleep(time.Millisecond * 4)
}
}
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.