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.
chrome-ext-screen-capture
Advanced tools
Capture screen from a chrome extension
In your manifest.json
file, include the following:
"permissions": ["tabs", "<all_urls>"],
"background": {
"scripts": ["background.js"]
}
In your background page, put the following:
require('chrome-ext-screen-capture').backgroundPage()
In your content script, the following will return an img url:
var cesc = require('chrome-ext-screen-capture')
cesc.takeScreenshot(function (canvas) {
/* You can use either a getBoundingClientRect() function or any individual jQuery object */
var selection = document.getSelection().getRangeAt(0).getBoundingClientRect()
var imgURL = cesc.renderPreview(selection, canvas, {padding: 20}).toDataURL('image/png')
console.log('Check this out', imgURL)
})
Much of this code was originally sourced from Louis Li and his post.
FAQs
Capture screen from within a Chrome extension
The npm package chrome-ext-screen-capture receives a total of 0 weekly downloads. As such, chrome-ext-screen-capture popularity was classified as not popular.
We found that chrome-ext-screen-capture 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.