diff --git a/src/drivers/npm/driver.js b/src/drivers/npm/driver.js index ef7569b17..87f91e963 100644 --- a/src/drivers/npm/driver.js +++ b/src/drivers/npm/driver.js @@ -61,7 +61,12 @@ const driver = { browser.visit(url, error => { wappalyzer.driver.document = browser.document; - const headers = browser.resources['0'].response.headers; + const headers = {}; + + browser.resources['0'].response.headers._headers.forEach(header => { + headers[header[0]] = header[1]; + }); + const vars = Object.getOwnPropertyNames(browser.window); const html = browser.html(); diff --git a/src/wappalyzer.js b/src/wappalyzer.js index 1374dbfbe..6fed51ec9 100644 --- a/src/wappalyzer.js +++ b/src/wappalyzer.js @@ -296,10 +296,6 @@ class Wappalyzer { * Cache detected applications */ cacheDetectedApps(apps, url) { - if ( !( this.driver.ping instanceof Function ) ) { - return; - } - Object.keys(apps).forEach(appName => { var app = apps[appName]; @@ -311,7 +307,9 @@ class Wappalyzer { }); }) - this.ping(); + if ( this.driver.ping instanceof Function ) { + this.ping(); + } } /**