From f5882705796179d455c7c41b3d588daa2b4bfd56 Mon Sep 17 00:00:00 2001 From: Elbert Alias Date: Sun, 3 Dec 2017 14:23:59 +1100 Subject: [PATCH] Dont fetch robots.txt on non HTTP requests --- src/wappalyzer.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wappalyzer.js b/src/wappalyzer.js index a3f714e56..bfa52fd66 100644 --- a/src/wappalyzer.js +++ b/src/wappalyzer.js @@ -117,6 +117,10 @@ class Wappalyzer { return new Promise((resolve, reject) => { var parsed = this.parseUrl(url); + if ( parsed.protocol !== 'http:' && parsed.protocol !== 'https:' ) { + reject(); + } + this.driver.getRobotsTxt(parsed.host, parsed.protocol === 'https:') .then(robotsTxt => { robotsTxt.forEach(disallow => parsed.pathname.indexOf(disallow) === 0 && reject());