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/libdns/godaddy
libdns
This package implements the libdns interfaces for the Godaddy API
Here's a minimal example of how to get all your DNS records using this libdns
provider (see _example/main.go
)
package main
import (
"context"
"fmt"
"log"
"os"
"time"
godaddy "github.com/libdns/godaddy"
"github.com/libdns/libdns"
)
func main() {
token := os.Getenv("GODADDY_TOKEN")
if token == "" {
fmt.Printf("GODADDY_TOKEN not set\n")
return
}
zone := os.Getenv("ZONE")
if zone == "" {
fmt.Printf("ZONE not set\n")
return
}
provider := godaddy.Provider{
APIToken: token,
}
records, err := provider.GetRecords(context.TODO(), zone)
if err != nil {
log.Fatalln("ERROR: %s\n", err.Error())
}
testName := "libdns-test"
hasTestName := false
for _, record := range records {
fmt.Printf("%s (.%s): %s, %s\n", record.Name, zone, record.Value, record.Type)
if record.Name == testName {
hasTestName = true
}
}
if !hasTestName {
appendedRecords, err := provider.AppendRecords(context.TODO(), zone, []libdns.Record{
libdns.Record{
Type: "TXT",
Name: testName,
TTL: time.Duration(600) * time.Second,
},
})
if err != nil {
log.Fatalln("ERROR: %s\n", err.Error())
}
fmt.Println("appendedRecords")
fmt.Println(appendedRecords)
} else {
deleteRecords, err := provider.DeleteRecords(context.TODO(), zone, []libdns.Record{
libdns.Record{
Type: "TXT",
Name: testName,
},
})
if err != nil {
log.Fatalln("ERROR: %s\n", err.Error())
}
fmt.Println("deleteRecords")
fmt.Println(deleteRecords)
}
}
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.