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.
electron-captureview
Advanced tools
npm install electron-captureview
import CaptureView from 'electron-captureview'
// ... 跟主窗口一起创建
const capture = new CaptureView({
devTools: false,
Mosaic: false,
Text: false,
onShow: () => {
console.log('启动截图')
},
onClose: () => {
console.log('结束截图')
},
onShowByShortCut: () => {
console.log('快捷键启动截图')
}
})
// capture.updateShortCutKey('shift+option+c')
// capture.setMultiScreen(false)
2.渲染进程中调用截图对象
const { remote } = require('electron')
const captureview = remote.getGlobal('captureView')
captureview.open()
名称 | 类型 | 说明 | 默认值 |
---|---|---|---|
multiScreen | boolean | 是否开启多显示屏截图 | false |
globalShortCut | string | 快捷键 | 'shift+option+A' |
devTools | boolen | 打开或关闭截图devtools工具 | false |
fileprefix | string | 保存的图片文件名字前缀, 默认: fileprefix+yyyymmddhhmmss(时间格式) | '' |
onClose | ()=>void | 关闭截图的回调函数 | |
onShow | ()=>void | 打开截图的回调函数 | |
onShowByShortCut | ()=>void | 快捷键打开截图的回调函数 | |
Mosaic | boolean | 打开马赛克功能 | false |
Text | boolean | 打开文字编辑功能 | false |
curve | boolean | 打开画笔编辑功能 | false |
名称 | 说明 | 参数 | 返回值 |
---|---|---|---|
useCapture | 初始化截图 | - | - |
open | 打开截图功能 | ||
close | 关闭截图功能 | ||
updateShortCutKey | 更新快捷键 | key:string | - |
setMultiScreen | 设置扩展屏 | flag:boolean |
tips: 考虑性能原因, 多显示屏截图需要多开一个启动窗口,容易消耗性能,所以默认单屏幕截屏
FAQs
'a electron screen capture'
The npm package electron-captureview receives a total of 0 weekly downloads. As such, electron-captureview popularity was classified as not popular.
We found that electron-captureview 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
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.