
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.
Control-C (SIGINT) handler supports single, double, triple, quadruple control-c and so on
ControlC is simple utility, handles SIGINT or Control-C.
Also suppot single control-c, double control-c, triple control-c and so on.
For example, print current status on single control-c,
reset or re-initialize on double control-c,
clean up and exit on triple control-c,
ignore quadruple or more control-c, and so on.
$ npm install control-c
var ControlC = require('control-c');
Add new handlers to handle SIGINT (Control-C).
var c1 = new ControlC(
function singleControlC() { console.log('single ctrl-c'); },
function doubleControlC() { console.log('double ctrl-c'); },
function tripleControlC() { console.log('triple ctrl-c'); this.remove(); },
function ignoreControlC() {});
// or
var c2 = ControlC(
function singleControlC() { console.log('single ctrl-c'); },
function doubleControlC() { console.log('double ctrl-c'); },
function tripleControlC() { console.log('triple ctrl-c'); this.remove(); },
function ignoreControlC() {});
// or
var c3 = ControlC.new(
function singleControlC() { console.log('single ctrl-c'); },
function doubleControlC() { console.log('double ctrl-c'); },
function tripleControlC() { console.log('triple ctrl-c'); this.remove(); },
function ignoreControlC() {});
ControlC instance.
Remove and add to hande SIGINT.
var c1 = new ControlC(function () {},
function () { this.remove(); });
c1.remove();
c1.add();
Control-C timeout interval. milliseconds.
ControlC.interval = 400;
console.log(ControlC.interval);
'use strict';
var ControlC = require('control-c');
var singleCount = 0;
var doubleCount = 0;
ControlC(
function singleControlC() { console.log('Single:', ++singleCount); },
function doubleControlC() { console.log('Double:', ++doubleCount); },
function tripleControlC() { console.log('Reset'); singleCount = doubleCount = 0; },
function quadrupleControlC() { console.log('Exit'); process.nextTick(process.exit); },
function ignoreControlC() {});
console.log('press control-c in 30 seconds.');
setTimeout(function () {}, 30000);
MIT
FAQs
Control-C (SIGINT) handler supports single, double, triple, quadruple control-c and so on
The npm package control-c receives a total of 2 weekly downloads. As such, control-c popularity was classified as not popular.
We found that control-c 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.