Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@apilayer/screenshotlayer
Advanced tools
Screenshotlayer: Capture highly customizable snapshots of any website
Screenshotlayer: Capture highly customizable snapshots of any website
Using npm
npm install --save @apilayer/screenshotlayer
or yarn
yarn add @apilayer/screenshotlayer
Head over to Screenshotlayer and create an account. Copy access key from dashboard.
You can set a secret key from the dashboard or just use an empty string.
import screenshotlayer from '@apilayer/screenshotlayer'
const useHTTPs = false
const layer = new screenshotlayer("<your-access-key>", "<your-secret-key>", useHTTPs)
capture
capture
creates a valid screenshot URL
Signature:
capture(site: string, config: Config = null): string
Example:
const response = layer.capture("https://apilayer.com")
console.log("response:", response)
Response:
"http://api.screenshotlayer.com/api/capture
?access_key=<your-access-key>
&url=https://apilayer.com
&viewport=1440x900
&format=PNG"
Alternatively, you can specify a Config
object as
the second parameter. Supported properties include:
Parameter | Description |
---|---|
fullPage | set to true if you want to capture the full height of the target website |
width | specify your preferred thumbnail width in pixels |
vHeight | specify your preferred viewport height dimensions in pixels |
vWidth | specify your preferred viewport width dimensions in pixels |
format | set your preferred image output format (PNG |
injectCSS | attach a URL containing a custom CSS stylesheet |
delay | specify a delay before screenshot is captured (in seconds) |
tTL | define the time (in seconds) your snapshot should be cached |
force | set to true if you want to force the API to capture a fresh screenshot |
placeholder | attach a URL containing a custom placeholder image or set to "1" |
userAgent | specify a custom User-Agent HTTP header to send with your request |
acceptLang | specify a custom Accept-Language HTTP header to send with your request |
export | export snapshot via custom ftp path or using your AWS S3 user details |
FAQs
Screenshotlayer: Capture highly customizable snapshots of any website
The npm package @apilayer/screenshotlayer receives a total of 0 weekly downloads. As such, @apilayer/screenshotlayer popularity was classified as not popular.
We found that @apilayer/screenshotlayer 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.