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/mohamedelhefni/ar-trie
BenchmarkInsert-12 2260291 523.4 ns/op 2 B/op 0 allocs/op
BenchmarkFind-12 152889574 7.304 ns/op 0 B/op 0 allocs/op
BenchmarkPut-12 2127642 561.2 ns/op 10 B/op 1 allocs/op
BenchmarkGet-12 169333138 7.154 ns/op 0 B/op 0 allocs/op
BenchmarkKeys-12 117835408 9.887 ns/op 0 B/op 0 allocs/op
BenchmarkSearch-12 28626381 102.2 ns/op 16 B/op 1 allocs/op
tr := InitTrie()
tr.Insert("mohamed")
tr.Insert("mohmed")
tr.Insert("modaser")
tr.Insert("monzer")
tr.Insert("momen")
tr.Insert("mohsen")
tr.Keys("mo") // [mohamed mohmed mohsen modaser monzer momen]
tr.Insert("محمد")
tr.Insert("محمود")
tr.Keys("مح") // [محمد محمود]
tr.Put("hello", "world")
tr.Put("here", "is a trie search")
tr.Search("he") // ["world", "is a trie search"]
tr.Find("mohamed") // true
tr.Delete("mohamed")
tr.Find("mohamed") // false
tr.Find("محمد") // true
tr.Delete("محمد")
tr.Find("محمد") // false
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.