Fix NPM driver

main
Elbert Alias 7 years ago
parent 04aa8dc399
commit 1612c54d80

@ -61,7 +61,12 @@ const driver = {
browser.visit(url, error => { browser.visit(url, error => {
wappalyzer.driver.document = browser.document; 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 vars = Object.getOwnPropertyNames(browser.window);
const html = browser.html(); const html = browser.html();

@ -296,10 +296,6 @@ class Wappalyzer {
* Cache detected applications * Cache detected applications
*/ */
cacheDetectedApps(apps, url) { cacheDetectedApps(apps, url) {
if ( !( this.driver.ping instanceof Function ) ) {
return;
}
Object.keys(apps).forEach(appName => { Object.keys(apps).forEach(appName => {
var app = apps[appName]; var app = apps[appName];
@ -311,7 +307,9 @@ class Wappalyzer {
}); });
}) })
this.ping(); if ( this.driver.ping instanceof Function ) {
this.ping();
}
} }
/** /**