
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
github.com/ghp3000/screenshot
sample program main.go
package main
import (
"fmt"
"image"
"image/png"
"os"
"runtime"
"screenshot"
"strconv"
"time"
)
// save *image.RGBA to filePath with PNG format.
func save(img *image.RGBA, filePath string) {
file, err := os.Create(filePath)
if err != nil {
panic(err)
}
defer file.Close()
png.Encode(file, img)
}
func main() {
runtime.LockOSThread()
var err error
shot := screenshot.NewScreenShot(1)
if err != nil {
fmt.Println(err)
return
}
shot.DrawCursor(1)
fmt.Println(shot.GetCaptureName())
err = shot.Init(0)
if err != nil {
fmt.Println(err)
return
}
defer shot.Release()
start := time.Now()
for i := 0; i < 10; i++ {
start = time.Now()
img, err := shot.Capture()
//_, err := screenshot.Capture(0, 0, 1920, 1080)
if err != nil {
fmt.Println(err)
//return
} else {
fmt.Println(time.Since(start))
save(img, strconv.FormatInt(time.Now().UnixNano(), 10)+".png")
}
//time.Sleep(time.Millisecond * 30)
}
fmt.Println(time.Since(start))
}
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.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.