
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@johnlindquist/clipboard
Advanced tools
Cross Platform Clipboard listener that detects both text and image update in clipboard
A Cross-Platform clipboard listener that listens for both text and image (screenshots). Designed for NodeJS, not for web. Provides API to read and write text/image from/to clipboard.
Forked from: https://www.npmjs.com/package/@crosscopy/clipboard
npm i @johnlindquist/clipboard
It has a very easy to use event-based system.
See demo.ts for a demo.
Run ts-node demo.ts
.
import clipboardEventListener from "./@crosscopy/clipboard";
console.log(clipboard.readTextSync());
console.log(await clipboard.readText());
const imgBuf = clipboard.readImageSync();
// console.log(imgBuf.toString("base64"));
// console.log(clipboard.readImageBase64Sync());
// await clipboard.writeImage(base64img); // add fake image to clipboard
clipboard.writeImageSync(base64img); // add fake image to clipboard
console.log(""); // give some time
console.assert(clipboard.readImageBase64Sync() === base64img);
// * test readimage
clipboard.writeImageSync(base64img);
console.log();
console.assert(
(await clipboard.readImage()).toString("base64") === base64img
);
await clipboard.writeImage(base64img);
console.log();
console.assert((await clipboard.readImageBase64()) === base64img);
clipboard.on("text", (text) => {
console.log(text);
});
clipboard.on("image", (data) => {
fs.writeFileSync("test.png", data);
});
clipboard.listen();
setTimeout(() => {
clipboard.close();
}, 10000);
It's achieved using child process + stdout
.
I took a golang version of the listener from golang-design/clipboard.
When a change is detected, IMAGE_CHANGED
or TEXT_CHANGED
is printed to stdout
.
This library runs compiled go-version clipboard listener using child process and listen to the stdout
.
If it sees the keywords in child process's stdout
, an event will be emitted.
Run npm run demo
to see a demo for 10 sec. Once started, copy some text and screenshot and check the terminal.
Format: process.platform/process.arch
The process here is from nodejs.
Supported platforms can be found in go-clipboard/binaries
.
If your nodejs gives different platform or arch, it may not work.
Cross Compile doesn't work due to some CGO problem. Have to build on different platforms manually.
Within go-clipboard
folder.
go build -o binaries/go-clipboard-darwin-arm64
go build -o binaries/go-clipboard-darwin-x64
go build -o binaries/go-clipboard-win32-x64.exe
go build -o binaries/go-clipboard-linux-x64
go build -o binaries/go-clipboard-linux-arm
go build -o binaries/go-clipboard-linux-arm64
FAQs
Cross Platform Clipboard listener that detects both text and image update in clipboard
We found that @johnlindquist/clipboard 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.