Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
forked-systray
Advanced tools
SysTray library for nodejs using ssbc/systrayhelper (a portable version of the go systray library).
The original version built by zaaack contianed the compiled helper binaries inside the npm package. I didn't like this approach and therefore added a prebuild fetcher as a npm postinstall hook.
npm i forked-systray
import SysTray from 'forked-systray'
const systray = new SysTray({
menu: {
// you should using .png icon in macOS/Linux, but .ico format in windows
icon: "<base64 image string>",
title: "标题",
tooltip: "Tips",
items: [{
title: "aa",
tooltip: "bb",
// checked is implement by plain text in linux
checked: true,
enabled: true
}, {
title: "aa2",
tooltip: "bb",
checked: false,
enabled: true
}, {
title: "Exit",
tooltip: "bb",
checked: false,
enabled: true
}]
},
debug: false,
copyDir: true, // copy go tray binary to outside directory, useful for packing tool like pkg.
})
systray.onClick(action => {
if (action.seq_id === 0) {
systray.sendAction({
type: 'update-item',
item: {
...action.item,
checked: !action.item.checked,
},
seq_id: action.seq_id,
})
} else if (action.seq_id === 1) {
// open the url
console.log('open the url', action)
} else if (action.seq_id === 2) {
systray.kill()
}
})
For more API info please see https://zaaack.github.io/node-systray/
Here is also a demo project you might want to check out, it shows how to integrate this library with opn, node-notifier and node-packer:
MIT
FAQs
systray libray for nodejs (original had bundled binaries)
The npm package forked-systray receives a total of 3 weekly downloads. As such, forked-systray popularity was classified as not popular.
We found that forked-systray demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.