
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.
Wraps console log methods so you can set the current log level to only log what you want in the current environment.
Wraps console log methods so you can set the current log level to only log what you want in the current environment. This is useful for debugging in something like React Native.
Add it to your app:
yarn add rappy-log
Usage:
const log = require('rappy-log');
const levels = [
'none',
'error',
'info',
'debug',
'trace',
];
for (let logCount = 0; logCount < levels.length; logCount++) {
let msg = `should log ${logCount} time${logCount > 1 ? 's' : ''}`;
log.setLevel(levels[logCount]);
console.log('current level:', log.getCurrentLevel());
log.error(msg);
log.info(msg);
log.debug(msg);
log.trace(msg);
}
Outputs:
current level: none
current level: error
ERROR - should log 1 time
current level: info
INFO - should log 2 times
INFO - should log 2 times
current level: debug
DEBUG - should log 3 times
DEBUG - should log 3 times
DEBUG - should log 3 times
current level: trace
TRACE - should log 4 times
TRACE - should log 4 times
TRACE - should log 4 times
TRACE - should log 4 times
You can also set the log level with an environment variable (see (12-factor)[https://12factor.net/config] for more information).
If you had this app:
# app.js
const log = require('rappy-log');
log.setLevel(); // if no level parameter is passed, tries to get level from environment
// dope freestyling starts to drop
log.error('And money on the wood');
log.debug('We made a promise and it\'s understood');
Now start the app:
LOG_LEVEL=error node app.js
> And money on the wood
FAQs
Wraps console log methods so you can set the current log level to only log what you want in the current environment.
The npm package rappy-log receives a total of 0 weekly downloads. As such, rappy-log popularity was classified as not popular.
We found that rappy-log 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.