Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Node extension that wraps hiredis. Because Node is already good at doing I/O, hiredis-node only provides bindings to the protocol parser. The hiredis protocol parser is faster than JavaScript protocol parsers, but the speedup only becomes noticeable for large replies. If you use Redis for simple SET/GET operations, there won't be a big benefit to using hiredis. If you use Redis for big SUNION/SINTER/LRANGE/ZRANGE operations, the benefit to using hiredis-node can be significant.
Install with NPM:
npm install hiredis
This requires:
gcc
/ g++
4.8 or newer.python
2.7 or any newer 2.x version. python
3.x is not supported.For running on Travis check the bundled .travis.yml.
To work on the code, first fetch the bundled hiredis submodule, then build hiredis and run the tests.
git submodule update --init
npm install
npm test
hiredis-node works out of the box with Matt Ranney's node_redis. The latter has an optional dependency on hiredis-node, so maybe you're already using it without knowing.
Alternatively, you can use it directly:
var hiredis = require("hiredis"),
reader = new hiredis.Reader();
// Data comes in
reader.feed("$5\r\nhello\r\n");
// Reply comes out
reader.get() // => "hello"
Instead of returning strings for bulk payloads, it can also return buffers:
var hiredis = require("hiredis"),
reader = new hiredis.Reader({ return_buffers: true });
// Data comes in
reader.feed("$5\r\nhello\r\n");
// Reply comes out
reader.get() // => <Buffer 68 65 6c 6c 6f>
Since Version 0.3.0 hiredis-node officially supports Windows.
A simple npm install hiredis
should just work.
If not, please open a bug report.
There's also a Windows fork by Dmitry Gorbunos (@fuwaneko), which should now be unnecessary.
This code is released under the BSD license, after the license of hiredis.
0.5.0 (2016-04-xy)
FAQs
Wrapper for reply processing code in hiredis
The npm package hiredis receives a total of 8,000 weekly downloads. As such, hiredis popularity was classified as popular.
We found that hiredis demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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 threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.