Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
[npm-image]: https://img.shields.io/npm/v/js-macro.svg [npm-url]: https://npmjs.org/package/js-macro [downloads-image]: https://img.shields.io/npm/dm/js-macro.svg [downloads-url]: https://npmjs.org/package/js-macro
A npm package that lets you automate your windows desktop.
const { mouse } = require('js-macro')
mouse.position()
// { x: 679, y: 0 }
mouse.move(0, 0)
// cursor is now at the very left top of the screen
mouse.leftClick()
const { exec } = require('node:child_process')
const { Window, keyboard } = require('js-macro')
exec('notepad.exe')
setTimeout(async () => {
let notepad = await Window.fromProcess('notepad.exe')
if (!notepad) {
return console.error('error: cannot find notepad :(')
}
notepad.focus()
keyboard.type('Hello, World!')
}, 1000)
const { clipboard } = require('js-macro')
clipboard.copy('Hello, World!')
clipboard.paste()
// returns 'Hello, World!'
const { clicklogger } = require('js-macro')
// add a listener on every left click
// we support left, middle, and right clicks!
clicklogger.on('left', coord => console.log(coord))
// start logging!
clicklogger.start()
// do stuff here... then
// while not required, this is highly recommended
clicklogger.stop()
const { keylogger } = require('js-macro')
// add a listener on every word (after space is pressed)
// we support raw keys, characters, words, and lines!
// please note that this listens directly to your keyboard
// which means that it can't read things like keyboard shortcuts (e.g: clipboard)
// or shifted keys directly.
keylogger.on('word', text => console.log(text))
// start logging!
keylogger.start()
// do stuff here... then
// while not required, this is highly recommended
keylogger.stop()
const { Screenshot } = require('js-macro')
const screenshot = new Screenshot({
x: 0,
y: 0,
width: 150,
height: 150
})
// take screenshot and write it to a file
await screenshot.file('file.png')
const { Screenshot } = require('js-macro')
// providing no arguments will screenshot the current monitor/screen
const screenshot = new Screenshot()
// take screenshot and write it to a Buffer in a PNG format
// the format can be 'png' or 'jpeg'
const buf = await screenshot.buffer('png')
FAQs
[npm-image]: https://img.shields.io/npm/v/js-macro.svg [npm-url]: https://npmjs.org/package/js-macro [downloads-image]: https://img.shields.io/npm/dm/js-macro.svg [downloads-url]: https://npmjs.org/package/js-macro
The npm package js-macro receives a total of 0 weekly downloads. As such, js-macro popularity was classified as not popular.
We found that js-macro 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.