
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
hapi-hiredis
Advanced tools
Hapi (^8.0) plugin for redis
with hiredis
parser.
hiredis
parser is way faster than the plain javascript parser that comes by default with the node redis
module.npm install --save hiredis hapi-hiredis
You can pass as options either an URL (all are optionals, defaults to: no password, 127.0.01 and 6379) or host
and port
. Obviously passing an URL is way more convenient.
var Hapi = require('hapi');
var server = new Hapi.Server();
server.register({
register: require('hapi-hiredis'),
opts: { url: 'redis://:password@domain.tld:port' }
}, function (err) {
if (err) console.error(err);
});
The object returned by redis.createClient
is exposed on server.plugins['hapi-hiredis'].client
and binded to the context on routes and extensions as this.redis
.
server.route({
method: 'GET',
path: '/hashes',
handler: function (request, reply) {
var redis = request.server.plugins['hapi-hiredis'].client;
redis.hgetall('hashes', function (err, obj) {
reply(obj);
});
}
}, {
method: 'GET',
path: '/session',
handler: function (request, reply) {
var redis = this.redis;
redis.get('session', function (err, obj) {
reply(obj);
});
}
});
If for any reason you need to use the redis
library, then you can use it from server.plugins['hapi-hiredis'].library
.
Licensed under the terms of the ISC. A copy of the license can be found in the file LICENSE
.
© 2015, Jose-Luis Rivas <me@ghostbar.co>
FAQs
Hapi's redis plugin
The npm package hapi-hiredis receives a total of 2 weekly downloads. As such, hapi-hiredis popularity was classified as not popular.
We found that hapi-hiredis 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.