Skip to main content
Version: 1.1.0-beta.5

Lazyload command

The lazyload command is used to download JavaScript files from a given URL or a list of URLs. It simulates various techniques to discover and fetch JS files that are loaded dynamically.

Usage

js-recon lazyload -u <url/file> [options]

Options

OptionAliasDescriptionDefaultRequired
--url <url/file>-uTarget URL or a file containing a list of URLs (one per line).Yes
--output <directory>-oOutput directory to save the downloaded JS files.outputNo
--strict-scopeDownload JS files from only the input URL domain.falseNo
--scope <scope>-sDownload JS files from specific domains (comma-separated). Use * for all domains.*No
--threads <threads>-tNumber of threads to use for downloading.1No
--subsequent-requestsDownload JS files from subsequent requests (Next.js only).falseNo
--urls-file <file>Input JSON file containing URLs (for --subsequent-requests)extracted_urls.jsonNo
--api-gatewayGenerate requests using API Gateway for IP rotation.falseNo
--api-gateway-config <file>API Gateway config file..api_gateway_config.jsonNo
--cache-file <file>File to contain response cache..resp_cache.jsonNo
--disable-cacheDisable response caching.falseNo
--yes-yAuto-approve executing JS code from the target.falseNo

Examples

Basic usage

Download all JavaScript files from a single URL:

js-recon lazyload -u https://example.com

Setting scope

Download JavaScript files only from example.com and cdn.example.com:

js-recon lazyload -u https://example.com -s "example.com,cdn.example.com"

Using the --strict-scope will only download JS files from the URL provided. This will skip any files from external CDN.

Using API gateway

Use AWS API Gateway to rotate IP addresses while downloading:

js-recon lazyload -u https://example.com --api-gateway

Read docs of API Gateway for more information.