
Research
/Security News
Malicious npm Packages Target WhatsApp Developers with Remote Kill Switch
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
redis-adapter
Advanced tools
This is simple Redis client adapter with promises.
const Redis = require('redis-adapter');
const client = new Redis({port: 6379, host: '127.0.0.1'});
client.connect()
.then(() => {
console.log('Hooray!');
})
.catch(error => {
console.log('Connection failed!');
});
client.on('end', () => {
console.log('Connection closed')
});
const client = new Redis({port: 6379, host: '127.0.0.1', prefix: 'prefix'});
client.call('smembers', 'blocks').then(blocks => {
console.log('List of blocks:', blocks);
});
shape
for plain shapes:client.shape({
blocks: ['smembers', 'blocks'],
hashName: ['hget', 'data', 'name'],
range: ['zrange', 'logs', 0, '+inf'],
}).then(({blocks, hashName, range}) => {
console.log('blocks set:', blocks);
console.log('hash key "name" value:', hashName);
console.log('range:', range);
});
multi
client.multi([
['smembers', 'blocks'],
['hget', 'data', 'name'],
['zrange', 'logs', 0, '+inf'],
]).then(([blocks, hashName, range]) => {
console.log('blocks set:', blocks);
console.log('hash key "name" value:', hashName);
console.log('range:', range);
});
Methods:
client
.call('smembers', 'items')
.map(Number)
.asc()
.then(console.log);
client
.call('zrangebyscore', 'somethings', '-inf', '+inf')
.map(x => Number(x.property))
.filter(p => p > 0)
.desc()
.then(console.log);
client
.call('smembers')
FAQs
Simple Redis Adapter
The npm package redis-adapter receives a total of 118 weekly downloads. As such, redis-adapter popularity was classified as not popular.
We found that redis-adapter 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
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.