
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@xterm/addon-clipboard
Advanced tools
An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables accessing the system clipboard. This addon requires xterm.js v4+.
An addon for xterm.js that enables accessing the system clipboard. This addon requires xterm.js v4+.
npm install --save @xterm/addon-clipboard
import { Terminal } from 'xterm';
import { ClipboardAddon } from '@xterm/addon-clipboard';
const terminal = new Terminal();
const clipboardAddon = new ClipboardAddon();
terminal.loadAddon(clipboardAddon);
To use a custom clipboard provider
import { Terminal } from '@xterm/xterm';
import { ClipboardAddon, IClipboardProvider, ClipboardSelectionType } from '@xterm/addon-clipboard';
function b64Encode(data: string): string {
// Base64 encode impl
}
function b64Decode(data: string): string {
// Base64 decode impl
}
class MyCustomClipboardProvider implements IClipboardProvider {
private _data: string
public readText(selection: ClipboardSelectionType): Promise<string> {
return Promise.resolve(b64Encode(this._data));
}
public writeText(selection: ClipboardSelectionType, data: string): Promise<void> {
this._data = b64Decode(data);
return Promise.resolve();
}
}
const terminal = new Terminal();
const clipboardAddon = new ClipboardAddon(new MyCustomClipboardProvider());
terminal.loadAddon(clipboardAddon);
See the full API for more advanced usage.
FAQs
An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables accessing the system clipboard. This addon requires xterm.js v4+.
We found that @xterm/addon-clipboard demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.