
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
node-native-win-utils
Advanced tools
Native addon for Node.js providing utility operations on Windows systems
I did it for myself because I didn't feel like dealing with libraries like 'node-ffi' to implement this functionality. Maybe someone will find it useful. It's WINDOWS OS ONLY
keyDown / keyUp)keyPress, typeString)prebuildify)npm install node-native-win-utils
import {
KeyboardListener,
KeyCodeHelper,
KeyListener,
getWindowData,
captureWindow,
captureWindowN,
captureScreenToFile,
mouseMove,
mouseClick,
mouseDrag,
typeString,
keyPress,
textRecognition,
OpenCV,
startMouseListener,
stopMouseListener,
} from "node-native-win-utils";
// Singleton listener
const listener = KeyboardListener.listener();
listener.on("keyDown", (data) => console.log("Down:", data.keyName));
listener.on("keyUp", (data) => console.log("Up:", data.keyName));
// Simulate key press
keyPress(KeyCodeHelper.A); // once
keyPress(KeyCodeHelper.Enter, 2); // twice
mouseMove(500, 300);
mouseClick(); // left click
mouseClick("right");
mouseDrag(100, 100, 800, 600, 50); // optional speed
typeString("Hello from Node!", 30); // 30ms delay per char
const data = getWindowData("Notepad");
console.log(data); // { width, height, x, y }
captureWindow("Notepad", "screenshot.png");
const buffer = captureWindowN("Notepad"); // Buffer
await captureScreenToFile("full-screen.png");
import path from "path";
const text = textRecognition(
path.join(__dirname, "traineddata"), // path to .traineddata files
"eng",
path.join(__dirname, "image.png")
);
console.log(text);
import { OpenCV } from "node-native-win-utils";
const img = new OpenCV("image.png"); // or ImageData { width, height, data: Uint8Array }
// Chainable methods
const processed = img
.blur(5, 5)
.bgrToGray()
.equalizeHist()
.darkenColor([240, 240, 240], [255, 255, 255], 0.5) // lower, upper, factor
.drawRectangle([10, 10], [200, 100], [255, 0, 0], 3)
.getRegion([50, 50, 300, 200]);
processed.imwrite("processed.png");
// Template matching
const match = img.matchTemplate(templateImage, /* method */, /* mask */);
console.log(match); // { minValue, maxValue, minLocation, maxLocation }
startMouseListener(({ x, y, type }) => {
console.log(`${type} at ${x},${y}`); // move at 400 300
});
mouseClick("left"); // trigger event
// terminates a thread
stopMouseListener();
npm install
npm run build
Visual Studio Build Tools (C++).
Python 3
--
Made with ❤️ for Windows automation.
Issues / PRs welcome!
FAQs
Native addon for Node.js providing utility operations on Windows systems
The npm package node-native-win-utils receives a total of 27 weekly downloads. As such, node-native-win-utils popularity was classified as not popular.
We found that node-native-win-utils 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.