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/mxssl/topn
topn finds top N numbers in a file
Write a program, topN, that given an arbitrarily large file and a number, N, containing individual numbers on each line (e.g. 200Gb file), will output the largest N numbers, highest first.
make build
topn generate --lines N --name filename
- generate file
with N
lines of random numbers.
topn run --file filename --top N
numbers.txt
with 1000
lines of random numbers./topn generate --name numbers.txt --lines 1000
File numbers.txt with 1000 lines of random numbers was successfully generated!
numbers.txt
./topn run --file numbers.txt --top 5
[9219151525891662339 9215619702456294450 9207997407084704522 9207450753580197605 9173624551887931713]
go test -cover -v ./...
? github.com/mxssl/topn [no test files]
=== RUN TestCase1
expected: [100 90 80 70 60]
output: [100 90 80 70 60]
--- PASS: TestCase1 (0.00s)
PASS
coverage: 42.3% of statements
ok github.com/mxssl/topn/cmd 0.260s coverage: 42.3% of statements
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.