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.
@cznec/screenshot-compare
Advanced tools
Website screenshot compare / collect.
This package is wraps:
https://www.npmjs.com/package/puppeteer
https://www.npmjs.com/package/pixelmatch
for easy collect and compare website screenshots.
Package is under construction 🚧 but it works! 😉
npm install --save-dev @cznec/screenshot-compare
or
yarn add -D @cznec/screenshot-compare
Create collection file collection.js
const Screenshot = require('@cznec/screenshot-compare').Screenshot
module.exports = [
new Screenshot()
.name('github')
.url("https://github.com/cznec/screenshot-compare")
.delay(1000)
.get(),
]
Run screenshots collection collect
npx screenshot-compare collect ./collection.js
Run screenshot collection compare
npx screenshot-compare compare ./collection.js
Run screenshot compare / collect on specific Screenshot() names
npx screenshot-compare compare ./collection.js name1 name1 ...
Collection file
const Screenshot = require('@cznec/screenshot-compare').Screenshot
const viewport = {
width: 1920,
height: 1080,
deviceScaleFactor: 1,
}
module.exports = [
new Screenshot()
.name('github')
.url("https://github.com/cznec/screenshot-compare")
.viewport(viewport)
.delay(500)
.saveTo('./screenshots')
.pageLog(true)
.get(),
new Screenshot()
.name('github_2')
.before(async (page, screenshot, collector) => {
console.log(screenshot)
await page.setViewport(viewport)
await page.goto("https://github.com/cznec/screenshot-compare")
await collector.delay(1000)
})
.saveTo('./screenshots')
.get(),
]
{ width: Number, height: Number, deviceScaleFactor: Number }
docsCapture PNG screenshot and save them with name defined in collection file.
Also create screenshot definition stamp. This stamp is compared in compare command.
Compare captured screenshots and save ..._test.png file and ..._diff.png file.
Print pixel and percentage diff.
Also check screenshot definition stamp and alert if is not equal.
More later? 🙃
FAQs
Website **screenshot compare / collect.**
The npm package @cznec/screenshot-compare receives a total of 0 weekly downloads. As such, @cznec/screenshot-compare popularity was classified as not popular.
We found that @cznec/screenshot-compare 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.