Add --defer option to defer scanning the page after loading

main
Elbert Alias 2 years ago
parent 9a23097f44
commit f353a5e6e5

@ -41,6 +41,7 @@ wappalyzer <url> [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
```

@ -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(