diff --git a/src/drivers/npm/README.md b/src/drivers/npm/README.md index 986e7c784..d73ec227a 100644 --- a/src/drivers/npm/README.md +++ b/src/drivers/npm/README.md @@ -32,6 +32,7 @@ wappalyzer [options] -w, --max-wait=... Wait no more than ms milliseconds for page resources to load -P, --pretty Pretty-print JSON output -p, --probe Perform a deeper scan by performing additional requests and inspecting DNS records +--proxy=... Proxy URL, e.g. 'http://user:pass@proxy:8080' -r, --recursive Follow links on pages (crawler) -a, --user-agent=... Set the user agent string -n, --no-scripts Disabled JavaScript on web pages @@ -63,6 +64,7 @@ const options = { maxWait: 5000, recursive: true, probe: true, + proxy: false, userAgent: 'Wappalyzer', htmlMaxCols: 2000, htmlMaxRows: 2000, diff --git a/src/drivers/npm/cli.js b/src/drivers/npm/cli.js index 26cad7556..334725892 100755 --- a/src/drivers/npm/cli.js +++ b/src/drivers/npm/cli.js @@ -74,6 +74,7 @@ Options: -w, --max-wait=... Wait no more than ms milliseconds for page resources to load -p, --probe Perform a deeper scan by performing additional requests and inspecting DNS records -P, --pretty Pretty-print JSON output + --proxy=... Proxy URL, e.g. 'http://user:pass@proxy:8080' -r, --recursive Follow links on pages (crawler) -a, --user-agent=... Set the user agent string -n, --no-scripts Disabled JavaScript on web pages diff --git a/src/drivers/npm/driver.js b/src/drivers/npm/driver.js index c11f16075..2b5b9e75a 100644 --- a/src/drivers/npm/driver.js +++ b/src/drivers/npm/driver.js @@ -277,6 +277,7 @@ class Driver { maxWait: 30000, recursive: false, probe: false, + proxy: false, noScripts: false, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36', @@ -296,6 +297,10 @@ class Driver { this.options.noScripts = Boolean(+this.options.noScripts) this.options.extended = Boolean(+this.options.extended) + if (this.options.proxy) { + chromiumArgs.push(`--proxy-server=${this.options.proxy}`) + } + this.destroyed = false }