
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
winston-nanomsg
Advanced tools
A nanomsg transport for winston.
$ npm install winston-nanomsg
This winston transport allows you to publish logs using a nanomsg pub socket (so that multiple recipients can subscribe to it)
The message is sent with a variable length prefix that allows the subscribers to subscribe log message of a certain threshold and above.
var winston = require('winston');
require('winston-nanomsg');
winston.add(winston.transports.Nanomsg, options);
The Nanomsg transport takes the following options.
Metadata: Logged as a native JSON object.
'use strict';
let nano = require('nanomsg');
// subscribe to all log levels
let sub = nano.socket('sub', {chan:['']});
sub.on('data', function(buffer) {
try {
let msg = String(buffer).split('|*|')[1];
console.log(JSON.parse(msg));
} catch(error) {
console.log(error);
}
});
sub.connect('tcp://127.0.0.1:5678');
'use strict';
var winston = require('winston');
require('winston-nanomsg');
let logger = new (winston.Logger)({
transports: [
new (winston.transports.Nanomsg)({
address:'127.0.0.1',
port: 5678,
level: 'silly'
})
]
});
let seq = 0;
setInterval(function() {
logger.log('info', 'foo:' + seq);
logger.log('debug', 'bar:' + seq);
++seq;
}, 1000);
The above two messages will be transmitted as:
***|*|{"timestamp":"2015-09-22T14:25:37.936Z","level":"info","message":"foo:0","meta":{}}
*****|*|{"timestamp":"2015-09-22T14:25:37.943Z","level":"debug","message":"bar:0","meta":{}}
FAQs
A Nanomsg transport for Winston
The npm package winston-nanomsg receives a total of 1 weekly downloads. As such, winston-nanomsg popularity was classified as not popular.
We found that winston-nanomsg 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.