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/tiagomelo/go-clipboard
A cross-platform clipboard utility for Go.
It offers abilities for copying and pasting plain text.
go get github.com/tiagomelo/go-clipboard
https://pkg.go.dev/github.com/tiagomelo/go-clipboard
OS | Supported copy tools | Supported paste tools |
---|---|---|
Darwin | pbcopy | pbpaste |
Windows | clip.exe | powershell |
Linux/FreeBSD/NetBSD/OpenBSD/Dragonfly | X11: xsel , xclip Wayland: wl-copy | X11: xsel , xclip Wayland: wl-paste |
Solaris | X11: xsel , xclip | X11: xsel , xclip |
Android (via Termux) | termux-clipboard-set | termux-clipboard-get |
package main
import (
"fmt"
"os"
clipboard "github.com/tiagomelo/go-clipboard/clipboard"
)
func main() {
text := "some text"
c := clipboard.New()
if err := c.CopyText(text); err != nil {
fmt.Println(err)
os.Exit(1)
}
fmt.Printf("text \"%s\" was copied into clipboard. Paste it elsewhere.\n", text)
}
package main
import (
"fmt"
"os"
clipboard "github.com/tiagomelo/go-clipboard/clipboard"
)
func main() {
c := clipboard.New()
text, err := c.PasteText()
if err != nil {
fmt.Println(err)
os.Exit(1)
}
fmt.Printf("text from clipboard: %v\n", text)
}
make test
run-tasks.bat test
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.