
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
ansi-keycode
Advanced tools
Turn browser keycodes into ansi characters and escape sequences.
$ node
> require('ansi-keycode')(97)
'a'
> require('ansi-keycode')(36) // HOME key
'\u001bOH'
> require('ansi-keycode')(220)
'\\'
the browser forwards its decoded events to the server:
var decode = require('ansi-keycode');
var shoe = require('shoe');
var sock = shoe('/sock');
window.addEventListener('keydown', function (ev) {
var c = decode(ev);
if (c) sock.write(c);
});
and the server.js will print what is typed in the browser:
var http = require('http');
var shoe = require('shoe');
var ecstatic = require('ecstatic')(__dirname + '/static');
var server = http.createServer(ecstatic);
server.listen(8000);
var sock = shoe(function (stream) {
stream.pipe(process.stdout);
});
sock.install(server, '/sock');
var decode = require('ansi-keycode')
Return the ansi string for ev.which or the keycode integer ev.
If opts.arrows is false, don't include escape sequences for arrow keys.
If opts.delete is false, don't include escape sequences for the delete key.
If opts.backspace is false, don't include escape sequences for the backspace
key.
With npm do:
npm install ansi-keycode
MIT
FAQs
map browser keycodes to ansi characters and escape sequences
The npm package ansi-keycode receives a total of 44 weekly downloads. As such, ansi-keycode popularity was classified as not popular.
We found that ansi-keycode 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
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.