diff --git a/src/drivers/npm/cli.js b/src/drivers/npm/cli.js index 334725892..6274fe5c9 100755 --- a/src/drivers/npm/cli.js +++ b/src/drivers/npm/cli.js @@ -15,6 +15,7 @@ const aliases = { d: 'debug', t: 'delay', h: 'help', + H: 'header', D: 'maxDepth', m: 'maxUrls', p: 'probe', @@ -47,7 +48,15 @@ while (true) { ? args.shift() : true - options[key] = value + if (options[key]) { + if (!Array.isArray(options[key])) { + options[key] = [options[key]] + } + + options[key].push(value) + } else { + options[key] = value + } } else { url = arg } @@ -59,7 +68,7 @@ if (!url || options.help) { Examples: wappalyzer https://www.example.com - node cli.js https://www.example.com -r -D 3 -m 50 + node cli.js https://www.example.com -r -D 3 -m 50 -H "Cookie: username=admin" docker wappalyzer/cli https://www.example.com --pretty Options: @@ -67,6 +76,7 @@ Options: -d, --debug Output debug messages -t, --delay=ms Wait for ms milliseconds between requests -h, --help This text + -H, --header Extra header to send with requests --html-max-cols=... Limit the number of HTML characters per line processed --html-max-rows=... Limit the number of HTML lines processed -D, --max-depth=... Don't analyse pages more than num levels deep @@ -85,13 +95,25 @@ Options: process.exit(1) } +const headers = {} + +if (options.header) { + ;(Array.isArray(options.header) ? options.header : [options.header]).forEach( + (header) => { + const [key, value] = header.split(':') + + headers[key.trim()] = (value || '').trim() + } + ) +} + ;(async function () { const wappalyzer = new Wappalyzer(options) try { await wappalyzer.init() - const site = await wappalyzer.open(url) + const site = await wappalyzer.open(url, headers) const results = await site.analyze() diff --git a/src/drivers/npm/driver.js b/src/drivers/npm/driver.js index 38cf01994..117216f32 100644 --- a/src/drivers/npm/driver.js +++ b/src/drivers/npm/driver.js @@ -13,6 +13,7 @@ const { setTechnologies, setCategories, analyze, analyzeManyToMany, resolve } = const { CHROMIUM_BIN, CHROMIUM_DATA_DIR, CHROMIUM_WEBSOCKET } = process.env const chromiumArgs = [ + '--single-process', '--no-sandbox', '--no-zygote', '--disable-gpu', diff --git a/src/drivers/npm/package.json b/src/drivers/npm/package.json index 33024ea4a..992b4c413 100644 --- a/src/drivers/npm/package.json +++ b/src/drivers/npm/package.json @@ -13,7 +13,7 @@ "software" ], "homepage": "https://www.wappalyzer.com/", - "version": "6.10.36", + "version": "6.10.37", "author": "Wappalyzer", "license": "MIT", "repository": { @@ -43,4 +43,4 @@ "engines": { "node": ">=14" } -} \ No newline at end of file +} diff --git a/src/package.json b/src/package.json index c18d3c650..05b6d78f5 100644 --- a/src/package.json +++ b/src/package.json @@ -13,7 +13,7 @@ "software" ], "homepage": "https://www.wappalyzer.com/", - "version": "6.10.36", + "version": "6.10.37", "author": "Wappalyzer", "license": "MIT", "repository": { @@ -29,4 +29,4 @@ "files": [ "wappalyzer.js" ] -} \ No newline at end of file +}