
Research
Namastex.ai npm Packages Hit with TeamPCP-Style CanisterWorm Malware
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.
charm_inheritance-fix
Advanced tools
ansi control sequences for terminal cursor hopping and colors (fixed for io.js and newer node)
Published fix for #24 because I needed it...
Use ansi terminal characters to write colors and cursor positions.

var charm = require('charm_inheritance-fix')();
charm.pipe(process.stdout);
charm.reset();
var colors = [ 'red', 'cyan', 'yellow', 'green', 'blue' ];
var text = 'Always after me lucky charms.';
var offset = 0;
var iv = setInterval(function () {
var y = 0, dy = 1;
for (var i = 0; i < 40; i++) {
var color = colors[(i + offset) % colors.length];
var c = text[(i + offset) % text.length];
charm
.move(1, dy)
.foreground(color)
.write(c)
;
y += dy;
if (y <= 0 || y >= 5) dy *= -1;
}
charm.position(0, 1);
offset ++;
}, 150);
Charm objects pass along the data events from their input stream except for events generated from querying the terminal device.
Because charm puts stdin into raw mode, charm emits two special events: "^C" and "^D" when the user types those combos. It's super convenient with these events to do:
charm.on('^C', process.exit)
The above is set on all charm streams. If you want to add your own handling for these
special events simply:
charm.removeAllListeners('^C')
charm.on('^C', function () {
// Don't exit. Do some mad science instead.
})
Create a new readable/writable charm stream.
You can pass in readable or writable streams as parameters and they will be
piped to or from accordingly. You can also pass process in which case
process.stdin and process.stdout will be used.
You can pipe() to and from the charm object you get back.
Reset the entire screen, like the /usr/bin/reset command.
Emit an "end" event downstream.
Pass along msg to the output stream.
Set the cursor position to the absolute coordinates x, y.
Query the absolute cursor position from the input stream through the output
stream (the shell does this automatically) and get the response back as
cb(x, y).
Move the cursor position by the relative coordinates x, y.
Move the cursor up by y rows.
Move the cursor down by y rows.
Move the cursor left by x columns.
Move the cursor right by x columns.
Push the cursor state and optionally the attribute state.
Pop the cursor state and optionally the attribute state.
Erase a region defined by the string s.
s can be:
Delete 'line' or 'char's. delete differs from erase
because it does not write over the deleted characters with whitesapce,
but instead removes the deleted space.
mode can be 'line' or 'char'. n is the number of items to be deleted.
n must be a positive integer.
The cursor position is not updated.
Insert space into the terminal. insert is the opposite of delete,
and the arguments are the same.
Set the display mode with the string attr.
attr can be:
Set the foreground color with the string color, which can be:
or color can be an integer from 0 to 255, inclusive.
Set the background color with the string color, which can be:
or color can be an integer from 0 to 255, inclusive.
Set the cursor visibility with a boolean visible.
With npm do:
npm install charm
FAQs
ansi control sequences for terminal cursor hopping and colors (fixed for io.js and newer node)
The npm package charm_inheritance-fix receives a total of 232 weekly downloads. As such, charm_inheritance-fix popularity was classified as not popular.
We found that charm_inheritance-fix 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
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.