diff --git a/src/drivers/npm/README.md b/src/drivers/npm/README.md index 5f4181513..c8b739200 100644 --- a/src/drivers/npm/README.md +++ b/src/drivers/npm/README.md @@ -41,6 +41,7 @@ wappalyzer [options] -e, --extended Output additional information --local-storage=... JSON object to use as local storage --session-storage=... JSON object to use as session storage +--defer=ms Defer scan for ms milliseconds after page load ``` diff --git a/src/drivers/npm/cli.js b/src/drivers/npm/cli.js index 357fbf975..5241ec698 100755 --- a/src/drivers/npm/cli.js +++ b/src/drivers/npm/cli.js @@ -92,6 +92,7 @@ Options: -e, --extended Output additional information --local-storage=... JSON object to use as local storage --session-storage=... JSON object to use as session storage + --defer=ms Defer scan for ms milliseconds after page load `) process.exit(options.help ? 0 : 1) } @@ -154,6 +155,10 @@ for (const type of Object.keys(storage)) { const site = await wappalyzer.open(url, headers, storage) + await new Promise((resolve) => + setTimeout(resolve, parseInt(options.defer || 0, 10)) + ) + const results = await site.analyze() process.stdout.write(