diff --git a/src/drivers/npm/cli.js b/src/drivers/npm/cli.js index 9e2644bdb..197a6a122 100755 --- a/src/drivers/npm/cli.js +++ b/src/drivers/npm/cli.js @@ -17,6 +17,7 @@ const aliases = { h: 'help', D: 'maxDepth', m: 'maxUrls', + p: 'probe', P: 'pretty', r: 'recursive', w: 'maxWait', @@ -68,6 +69,7 @@ Options: -D, --max-depth=... Don't analyse pages more than num levels deep -m, --max-urls=... Exit when num URLs have been analysed -w, --max-wait=... Wait no more than ms milliseconds for page resources to load + -p, --probe Perform a deeper scan by making additional network requests -P, --pretty Pretty-print JSON output -r, --recursive Follow links on pages (crawler) -a, --user-agent=... Set the user agent string diff --git a/src/drivers/npm/driver.js b/src/drivers/npm/driver.js index 8a70d876e..2ecb3efda 100644 --- a/src/drivers/npm/driver.js +++ b/src/drivers/npm/driver.js @@ -468,7 +468,7 @@ class Site { }) ) ) - ).catch(() => []) + ).catch(() => ({ jsonValue: () => [] })) ).jsonValue() ).catch(() => []) @@ -499,7 +499,7 @@ class Site { return css.join('\n') }, this.options.htmlMaxRows) - ).catch(() => '') + ).catch(() => ({ jsonValue: () => '' })) ).jsonValue() ).catch(() => '') @@ -512,7 +512,7 @@ class Site { .map(({ src }) => src) .filter((src) => src) ) - ).catch(() => []) + ).catch(() => ({ jsonValue: () => [] })) ).jsonValue() ).catch(() => []) @@ -535,7 +535,7 @@ class Site { {} ) ) - ).catch(() => []) + ).catch(() => ({ jsonValue: () => [] })) ).jsonValue() ).catch(() => []) @@ -833,15 +833,15 @@ class Site { await sleep(this.options.delay * index) } - if (this.options.probe) { - await this.probe(url) - } - const links = await this.goto(url) if (links && this.options.recursive && depth < this.options.maxDepth) { await this.batch(links.slice(0, this.options.maxUrls), depth + 1) } + + if (this.options.probe) { + await this.probe(url) + } } catch (error) { this.analyzedUrls[url.href] = { status: 0, @@ -888,6 +888,7 @@ class Site { async probe(url) { const files = { robots: '/robots.txt', + magento: '/magento_version', } for (const file of Object.keys(files)) { diff --git a/src/drivers/webextension/css/styles.css b/src/drivers/webextension/css/styles.css index 1c6cbb0a1..cfb5bc58a 100644 --- a/src/drivers/webextension/css/styles.css +++ b/src/drivers/webextension/css/styles.css @@ -95,7 +95,7 @@ a, a:focus, a:hover { .footer__heading-text { flex: 1 0; - font-size: 1rem; + font-size: .9rem; font-weight: bold; } diff --git a/src/technologies.json b/src/technologies.json index c5abf8000..8266e719f 100644 --- a/src/technologies.json +++ b/src/technologies.json @@ -11305,6 +11305,7 @@ "Mage": "", "VarienForm": "" }, + "magento": "Magento/([0-9.]+)\\;version:\\1", "oss": true, "scripts": [ "js/mage", diff --git a/src/wappalyzer.js b/src/wappalyzer.js index e0e68d70e..bf1cb5b12 100644 --- a/src/wappalyzer.js +++ b/src/wappalyzer.js @@ -197,6 +197,7 @@ const Wappalyzer = { html, css, robots, + magento, meta, headers, dns, @@ -222,6 +223,7 @@ const Wappalyzer = { oo(technology, 'html', html), oo(technology, 'css', css), oo(technology, 'robots', robots), + oo(technology, 'magento', magento), oo(technology, 'certIssuer', certIssuer), om(technology, 'scripts', scripts), mm(technology, 'cookies', cookies), @@ -255,6 +257,7 @@ const Wappalyzer = { html, css, robots, + magento, meta, headers, dns, @@ -295,6 +298,7 @@ const Wappalyzer = { css: transform(css), certIssuer: transform(certIssuer), robots: transform(robots), + magento: transform(magento), meta: transform(meta), scripts: transform(scripts), js: transform(js, true),