
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
github.com/go-gevent/gevent
gevent is a network library based on epoll, mainly designed to achieve high-performance network events.
go get -u github.com/go-gevent/gevent
package main
import (
"flag"
"fmt"
"github.com/go-gevent/gevent"
"log"
"strings"
"time"
"github.com/go-gevent/gevent/ringbuffer"
)
func main() {
var port int
var loops int
var udp bool
var trace bool
var reuseport bool
flag.IntVar(&port, "port", 5007, "server port")
flag.BoolVar(&udp, "udp", false, "listen on udp")
flag.BoolVar(&reuseport, "reuseport", false, "reuseport (SO_REUSEPORT)")
flag.BoolVar(&trace, "trace", false, "print packets to console")
flag.IntVar(&loops, "loops", 1, "num loops")
flag.Parse()
var events gevent.Events
events.NumLoops = loops
events.Serving = func(srv gevent.Server) (action gevent.Action) {
log.Printf("echo server started on port %d (loops: %d)", port, srv.NumLoops)
if reuseport {
log.Printf("reuseport")
}
return
}
events.Data = func(c *gevent.Conn, in *ringbuffer.RingBuffer) (out []byte, action gevent.Action) {
first, end := in.PeekAll()
if trace {
log.Printf("%s", strings.TrimSpace(string(first)+string(end)))
}
out = first
if len(end) > 0 {
out = append(out, end...)
}
in.RetrieveAll()
return
}
scheme := "tcp"
if udp {
scheme = "udp"
}
log.Fatal(gevent.Serve(events, time.Second*10, fmt.Sprintf("%s://:%d?reuseport=%t", scheme, port, reuseport)))
}
Apache License Version 2.0, http://www.apache.org/licenses/
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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.