
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
screenshot-phantom
Advanced tools
Timing screenshots on the websites and output pictures files in Node.js
Websites screenshots timer in Node.js
Regularly perform a screenshot task, the whole process of a task is: open the page => wait for resources to load => screenshots => close page => open the next page (if the screen at the same time multiple sites) ... ...
npm install --save screenshot-phantom
const screenshot = require('screenshot-phantom');
screenshot({
/*
* Required: An array consist of websites
*/
urls: [
'http://google.com',
'https://www.npmjs.com/'
],
/*
* Optional: Set the rule of screenshots timing
* Convenient options: 'everyMinute' | 'everyHour' | 'everyDay' | 'everyWeek' | 'everyMonth'
* or use the other options of package "node-schedule", such as '0 * * * * *' (see the "Links" for more details)
*/
rule: 'everyMinute',
/*
* Optional: Set the viewport width of screenshots
*/
width: 1024,
/*
* Optional: Set the viewport height of screenshots
*/
height: 768,
/*
* Optional: Set the screenshots format (pdf|png|jpeg)
*/
format: 'jpeg',
/*
* Optional: Set the time delay of screenshot after page loaded
*/
timeout: 15000,
/*
* Optional: Set the quality of the screenshots (0-100)
*/
quality: 75,
/*
* Optional: An array consist of screenshots files' prefix names that match the urls array by index, which means these two arrays have the same length
*/
picNamePrefix: [...urls],
/*
* Optional: Define the path of the output screenshots
*/
pathName: './pictures/'
});
const screenshot = require('screenshot-phantom');
screenshot({
urls: [
'http://google.com',
'http://www.bing.com/'
]
});
or
const screenshot = require('screenshot-phantom');
const schedule = require('node-schedule');
const rule = new schedule.RecurrenceRule();
rule.second = 0;
screenshot({
urls: [
'http://google.com',
'http://www.bing.com/'
],
rule
});
or
const screenshot = require('screenshot-phantom');
const rule = '0 * * * * *';
screenshot({
urls: [
'http://google.com',
'http://www.bing.com//'
],
rule
});
The same result:
const screenshot = require('screenshot-phantom');
const rule = '0 * * * * *';
screenshot({
urls: [
'http://google.com',
'http://www.bing.com/'
],
picNamePrefix: [
'Rose',
'Jack'
]
});
Result:
$ npm demo
https://github.com/node-schedule/node-schedule
Contributions welcome.
FAQs
Timing screenshots on the websites and output pictures files in Node.js
The npm package screenshot-phantom receives a total of 0 weekly downloads. As such, screenshot-phantom popularity was classified as not popular.
We found that screenshot-phantom 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.