Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/lucencytech/google-analytics
An easy-to-use Google Analytics API (v1) via Measurement Protocol with golang
go get github.com/PartnerFusionInc/google-analytics
package main
import (
"net/http"
"time"
"github.com/OzqurYalcin/google-analytics/src"
"github.com/google/uuid"
)
func main() {
http.HandleFunc("/", view)
server := http.Server{Addr: ":8080", ReadTimeout: 30 * time.Second, WriteTimeout: 30 * time.Second}
server.ListenAndServe()
}
func view(w http.ResponseWriter, r *http.Request) {
api := new(ga.API)
api.Lock()
defer api.Unlock()
api.UserAgent = r.UserAgent()
api.ContentType = "application/x-www-form-urlencoded"
client := new(ga.Client)
client.ProtocolVersion = "1"
client.ClientID = uuid.New().String()
client.TrackingID = "UA-xxxxxxxx-x"
client.HitType = "pageview"
client.DocumentLocationURL = "https://www.example.com/payment"
client.DocumentTitle = "Payment"
client.DocumentEncoding = "UTF-8"
product := new(ga.Product)
product.SKU = "P1234"
product.Name = "product name"
product.Brand = "product brand"
product.Price = "1.00"
product.Quantity = "1"
client.Products = append(client.Products, product)
client.ProductAction = "purchase"
client.TransactionID = "T1234"
client.TransactionRevenue = "1.00"
client.CurrencyCode = "TRY"
if r.URL.Path == "/" {
api.Send(client)
}
}
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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.