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.
0.0.5 - more acceptance test, using should on the tests. 0.0.4 - more acceptance test and new functions such as fetchAndRemove. 0.0.3 - update release and readme (June 14, 2014) 0.0.2 - bug fix - ttl now is optional. (June 14, 2014) 0.0.1 - First version :) (June 14, 2014)
SmartHash is a utility module which provides straight-forward, powerful hash tool
that able you to:
a. insert data.
b. fetch data.
c. check if data exist.
d. generate dynamic index.
e. set TTL to each of the value.
f. set TTL ms
, s
- seconds, m
- minutes, h
- hour, d
- days, w
- week
g. fetch and remove by an index, after fetching the object it will be deleted.
var SmartHash = require('smarthash').SmartHash;
var h = new SmartHash();
h.insert({index: 'doron', value: {phone_num: '1'}, ttl: 32, time: 's'}); //index doron, ttl 32 second
h.insert({index: 'doron', value: {phone_num: '2'}, ttl: 1, time: 'h'}); //index doron is taken generate new one, ttl 1 hour
h.insert({index: 'doron', value: {phone_num: '3'}, ttl: 33000}); //index doron is taken generate new one
h.insert({index: 'doron', value: {phone_num: '4'}, ttl: 23000}); //index doron is taken generate new one
h.insert({index: 'rachel', value: {phone_num: '5'}, ttl: 32200}); //index rachel - ttl 32200 ms
h.insert({index: 'rachel', value: {phone_num: '6'}, ttl: 53000}); //index rachel is taken generate new one ttl 53000ms
var recursive = function () {
console.log("It has been one second!");
console.log(h.Data);
h.fetch({index: 'doron'}, function(err, result){
if (err)
console.log(err);
if (result)
console.log(result);
});
setTimeout(recursive,400);
}
recursive();
The source is available for download from GitHub. NPM.
you can install it using npm i smarthash
a. Moment.js b. async
FAQs
smart hash table
The npm package smarthash receives a total of 0 weekly downloads. As such, smarthash popularity was classified as not popular.
We found that smarthash demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.