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.
Database for bcoin (leveldown backend).
const bdb = require('bdb');
const db = bdb.create('/path/to/my.db');
await db.open();
const myPrefix = bdb.key('r');
const myKey = bdb.key('t', ['hash160', 'uint32']);
const bucket = db.bucket(myPrefix.encode());
const batch = bucket.batch();
const hash = Buffer.alloc(20, 0x11);
// Write `foo` to `rt[1111111111111111111111111111111111111111][00000000]`.
batch.put(myKey.encode(hash, 0), Buffer.from('foo'));
await batch.write();
// Iterate:
// From: `rt[0000000000000000000000000000000000000000][00000000]`
// To: `rt[ffffffffffffffffffffffffffffffffffffffff][ffffffff]`
const iter = bucket.iterator({
gte: myKey.min(),
lte: myKey.max(),
values: true
});
await iter.each((key, value) => {
// Parse each key.
const [hash, index] = myKey.decode(key);
console.log('Hash: %s', hash);
console.log('Index: %d', index);
console.log('Value: %s', value.toString());
});
await db.close();
If you contribute code to this project, you are implicitly allowing your code
to be distributed under the MIT license. You are also implicitly verifying that
all code is your original work. </legalese>
Parts of this software are based on leveldown:
See LICENSE for more info.
FAQs
Database for bcoin
The npm package bdb receives a total of 305 weekly downloads. As such, bdb popularity was classified as not popular.
We found that bdb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
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.