diff --git a/src/drivers/npm/package.json b/src/drivers/npm/package.json index 5e2b573e2..ca7ac32dd 100644 --- a/src/drivers/npm/package.json +++ b/src/drivers/npm/package.json @@ -2,7 +2,7 @@ "name": "wappalyzer", "description": "Uncovers the technologies used on websites", "homepage": "https://github.com/AliasIO/Wappalyzer", - "version": "5.4.4", + "version": "5.4.5", "author": "Elbert Alias", "license": "GPL-3.0", "repository": { diff --git a/src/drivers/webextension/js/content.js b/src/drivers/webextension/js/content.js index 7ffb4ba12..8404c4b92 100644 --- a/src/drivers/webextension/js/content.js +++ b/src/drivers/webextension/js/content.js @@ -5,8 +5,8 @@ if ( typeof browser !== 'undefined' && typeof document.body !== 'undefined' ) { try { var html = new XMLSerializer().serializeToString(document); - if ( html.length > 50000 ) { - html = html.substring(0, 25000) + html.substring(html.length - 25000, html.length); + if ( html.length > 500000 ) { + html = html.substring(0, 250000) + html.substring(html.length - 250000, html.length); } const scripts = Array.prototype.slice diff --git a/src/drivers/webextension/js/inject.js b/src/drivers/webextension/js/inject.js index e496e1bd8..26fc00de6 100644 --- a/src/drivers/webextension/js/inject.js +++ b/src/drivers/webextension/js/inject.js @@ -1,7 +1,6 @@ (function() { try { addEventListener('message', (event => { - console.log({ event }); if ( event.data.id !== 'patterns' ) { return; } diff --git a/src/drivers/webextension/manifest.json b/src/drivers/webextension/manifest.json index 74292b879..39c22718e 100644 --- a/src/drivers/webextension/manifest.json +++ b/src/drivers/webextension/manifest.json @@ -4,7 +4,7 @@ "author": "Elbert Alias", "homepage_url": "https://www.wappalyzer.com", "description": "Identify web technologies", - "version": "5.4.4", + "version": "5.4.5", "default_locale": "en", "manifest_version": 2, "icons": { diff --git a/src/wappalyzer.js b/src/wappalyzer.js index 95c933eab..df7e3bd1e 100644 --- a/src/wappalyzer.js +++ b/src/wappalyzer.js @@ -442,13 +442,16 @@ class Wappalyzer { analyzeMeta(app, html) { var regex = /]+>/ig; var patterns = this.parsePatterns(app.props.meta); - var content; - var match; + var content = ''; + var matches = []; - while ( patterns && ( match = regex.exec(html) ) ) { + while ( patterns && ( matches = regex.exec(html) ) ) { for ( var meta in patterns ) { - if ( new RegExp('(name|property)=["\']' + meta + '["\']', 'i').test(match) ) { - content = match.toString().match(/content=("|')([^"']+)("|')/i); + + const r = new RegExp('(?:name|property)=["\']' + meta + '["\']', 'i'); + + if ( new RegExp('(?:name|property)=["\']' + meta + '["\']', 'i').test(matches[0]) ) { + content = matches[0].match(/content=("|')([^"']+)("|')/i); patterns[meta].forEach(pattern => { if ( content && content.length === 4 && pattern.regex.test(content[2]) ) {