@ -0,0 +1,16 @@
|
|||||||
|
<!--
|
||||||
|
If you need technical help please read https://www.wappalyzer.com/docs before opening an issue.
|
||||||
|
It also explains well how to add a new application detection.
|
||||||
|
-->
|
||||||
|
|
||||||
|
**Do you want to request a *feature*, a *new application detection* or report a *bug*?**
|
||||||
|
|
||||||
|
**Is your issue about WebExtension driver (Chrome & Firefox), the website, the NPM driver or the bookmarklet ?**
|
||||||
|
|
||||||
|
**What is the current behavior ?**
|
||||||
|
|
||||||
|
**If the current behavior is a bug, please provide the steps to reproduce and if possible a demo of the problem.**
|
||||||
|
|
||||||
|
**What is the expected behavior ?**
|
||||||
|
|
||||||
|
**Which versions of Wappalyzer, and which browser / OS are affected by this issue ? Did this work in previous versions ?**
|
@ -0,0 +1,284 @@
|
|||||||
|
{
|
||||||
|
"requires": true,
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"dependencies": {
|
||||||
|
"assertion-error": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"balanced-match": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"brace-expansion": {
|
||||||
|
"version": "1.1.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||||
|
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"balanced-match": "1.0.0",
|
||||||
|
"concat-map": "0.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"browser-stdout": {
|
||||||
|
"version": "1.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
|
||||||
|
"integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"chai": {
|
||||||
|
"version": "4.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/chai/-/chai-4.1.2.tgz",
|
||||||
|
"integrity": "sha1-D2RYS6ZC8PKs4oBiefTwbKI61zw=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"assertion-error": "1.1.0",
|
||||||
|
"check-error": "1.0.2",
|
||||||
|
"deep-eql": "3.0.1",
|
||||||
|
"get-func-name": "2.0.0",
|
||||||
|
"pathval": "1.1.0",
|
||||||
|
"type-detect": "4.0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"check-error": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"commander": {
|
||||||
|
"version": "2.11.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz",
|
||||||
|
"integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"concat-map": {
|
||||||
|
"version": "0.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||||
|
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"debug": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ms": "2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"deep-eql": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"type-detect": "4.0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"diff": {
|
||||||
|
"version": "3.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
|
||||||
|
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"escape-string-regexp": {
|
||||||
|
"version": "1.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||||
|
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"file-type": {
|
||||||
|
"version": "7.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/file-type/-/file-type-7.4.0.tgz",
|
||||||
|
"integrity": "sha1-KnyU9ioAMBULt9m2xwz6HT51nIY="
|
||||||
|
},
|
||||||
|
"fs.realpath": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"get-func-name": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"glob": {
|
||||||
|
"version": "7.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
|
||||||
|
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"fs.realpath": "1.0.0",
|
||||||
|
"inflight": "1.0.6",
|
||||||
|
"inherits": "2.0.3",
|
||||||
|
"minimatch": "3.0.4",
|
||||||
|
"once": "1.4.0",
|
||||||
|
"path-is-absolute": "1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"growl": {
|
||||||
|
"version": "1.10.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz",
|
||||||
|
"integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"has-flag": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"he": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz",
|
||||||
|
"integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"html-comment-regex": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.1.tgz",
|
||||||
|
"integrity": "sha1-ZouTd26q5V696POtRkswekljYl4="
|
||||||
|
},
|
||||||
|
"inflight": {
|
||||||
|
"version": "1.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||||
|
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"once": "1.4.0",
|
||||||
|
"wrappy": "1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"inherits": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||||
|
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"is-svg": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-svg/-/is-svg-2.1.0.tgz",
|
||||||
|
"integrity": "sha1-z2EJDaDZ77yrhyLeum8DIgjbsOk=",
|
||||||
|
"requires": {
|
||||||
|
"html-comment-regex": "1.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"minimatch": {
|
||||||
|
"version": "3.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||||
|
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"brace-expansion": "1.1.11"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"minimist": {
|
||||||
|
"version": "0.0.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
||||||
|
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"mkdirp": {
|
||||||
|
"version": "0.5.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||||
|
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"minimist": "0.0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mocha": {
|
||||||
|
"version": "5.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mocha/-/mocha-5.1.0.tgz",
|
||||||
|
"integrity": "sha512-d6RWgYPILd+AoWVOxiD0UwUqRicnE1inTxMr40CXOgqYve1MvnKntoLAtLIcxjEeVjEoYYTe5QAq3mUc6/ySjQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"browser-stdout": "1.3.1",
|
||||||
|
"commander": "2.11.0",
|
||||||
|
"debug": "3.1.0",
|
||||||
|
"diff": "3.5.0",
|
||||||
|
"escape-string-regexp": "1.0.5",
|
||||||
|
"glob": "7.1.2",
|
||||||
|
"growl": "1.10.3",
|
||||||
|
"he": "1.1.1",
|
||||||
|
"minimatch": "3.0.4",
|
||||||
|
"mkdirp": "0.5.1",
|
||||||
|
"supports-color": "4.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ms": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"once": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||||
|
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"wrappy": "1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"path-is-absolute": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"pathval": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"pify": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
|
||||||
|
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY="
|
||||||
|
},
|
||||||
|
"read-chunk": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-2.1.0.tgz",
|
||||||
|
"integrity": "sha1-agTAkoAF7Z1C4aasVgDhnLx/9lU=",
|
||||||
|
"requires": {
|
||||||
|
"pify": "3.0.0",
|
||||||
|
"safe-buffer": "5.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"safe-buffer": {
|
||||||
|
"version": "5.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
|
||||||
|
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
|
||||||
|
},
|
||||||
|
"supports-color": {
|
||||||
|
"version": "4.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz",
|
||||||
|
"integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"has-flag": "2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type-detect": {
|
||||||
|
"version": "4.0.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
|
||||||
|
"integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"wrappy": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
--- src/drivers/npm/node_modules/zombie/lib/document.js 2018-04-20 14:36:04.097829977 +1000
|
||||||
|
+++ src/drivers/npm/node_modules/zombie/lib/document.js 2018-04-20 14:34:25.699317000 +1000
|
||||||
|
@@ -281,7 +281,7 @@
|
||||||
|
// The current window, postMessage and window.close need this
|
||||||
|
browser._windowInScope = window;
|
||||||
|
var result = undefined;
|
||||||
|
- if (typeof code === 'string' || code instanceof String) result = VM.runInContext(code, window, { filename: filename });else if (code) result = code.call(window);
|
||||||
|
+ if (typeof code === 'string' || code instanceof String) result = VM.runInContext(code, window, { filename: filename, timeout: 1000 });else if (code) result = code.call(window);
|
||||||
|
browser.emit('evaluated', code, result, filename);
|
||||||
|
return result;
|
||||||
|
} catch (error) {
|
After Width: | Height: | Size: 326 B |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 706 B After Width: | Height: | Size: 763 B |
Before Width: | Height: | Size: 678 B |
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 270 B |
Before Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 262 B |
Before Width: | Height: | Size: 453 B |
Before Width: | Height: | Size: 265 B |
Before Width: | Height: | Size: 384 B |
Before Width: | Height: | Size: 678 B |
Before Width: | Height: | Size: 678 B |
Before Width: | Height: | Size: 645 B |
Before Width: | Height: | Size: 331 B |
Before Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 480 B |
Before Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 575 B |
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 513 B |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 833 B After Width: | Height: | Size: 669 B |
After Width: | Height: | Size: 634 B |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 271 B |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.6 KiB |
@ -0,0 +1,144 @@
|
|||||||
|
/* eslint-env mocha */
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
const assert = require('chai').assert;
|
||||||
|
const Wappalyzer = require('../src/wappalyzer');
|
||||||
|
|
||||||
|
describe('should analyze website elements properly', function () {
|
||||||
|
|
||||||
|
it('should analyze html', async () => {
|
||||||
|
const html = `
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Page title | Html detection </title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Technologies Test Page | Html detection</h1>
|
||||||
|
<!-- Google Tag Manager -->
|
||||||
|
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KAAOEOE"
|
||||||
|
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||||
|
<!-- End Google Tag Manager -->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
`;
|
||||||
|
const wappalyzer = new Wappalyzer();
|
||||||
|
wappalyzer.apps = {
|
||||||
|
"Google Tag Manager": {
|
||||||
|
"html": [
|
||||||
|
"googletagmanager\\.com/ns\\.html[^>]+></iframe>",
|
||||||
|
"<!-- (?:End )?Google Tag Manager -->"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var applications = null;
|
||||||
|
wappalyzer.driver = {
|
||||||
|
log () {},
|
||||||
|
displayApps (detectedMap) {
|
||||||
|
applications = detectedMap;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
await wappalyzer.analyze({ canonical: 'example.com' }, { html });
|
||||||
|
assert.equal(applications['Google Tag Manager'].name, 'Google Tag Manager');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should analyze scripts', async () => {
|
||||||
|
const scripts = [
|
||||||
|
'http://www.google-analytics.com/analytics.js',
|
||||||
|
'http://example.com/assets/js/jquery.min.js'
|
||||||
|
];
|
||||||
|
const wappalyzer = new Wappalyzer();
|
||||||
|
wappalyzer.apps = {
|
||||||
|
"Google Analytics": {
|
||||||
|
"cats": [
|
||||||
|
10
|
||||||
|
],
|
||||||
|
"script": "google-analytics\\.com\\/(?:ga|urchin|(analytics))\\.js\\;version:\\1?UA:"
|
||||||
|
},
|
||||||
|
"jQuery": {
|
||||||
|
"script": [
|
||||||
|
"jquery(?:\\-|\\.)([\\d.]*\\d)[^/]*\\.js\\;version:\\1",
|
||||||
|
"/([\\d.]+)/jquery(?:\\.min)?\\.js\\;version:\\1",
|
||||||
|
"jquery.*\\.js(?:\\?ver(?:sion)?=([\\d.]+))?\\;version:\\1"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var applications = null;
|
||||||
|
wappalyzer.driver = {
|
||||||
|
log () {},
|
||||||
|
displayApps (detectedMap) {
|
||||||
|
applications = detectedMap;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
await wappalyzer.analyze({ canonical: 'example.com' }, { scripts });
|
||||||
|
assert.equal(applications['Google Analytics'].name, 'Google Analytics');
|
||||||
|
assert.equal(applications['jQuery'].name, 'jQuery');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should analyze headers', async () => {
|
||||||
|
const headers = {
|
||||||
|
'date': [ 'Thu, 01 Feb 2018 11:34:18 GMT' ],
|
||||||
|
'connection': [ 'keep-alive' ],
|
||||||
|
'x-powered-by': [ 'Express'],
|
||||||
|
'etag': [ 'W/125-1jQLmiya7mfec43xR3Eb3pjdu64s' ],
|
||||||
|
'content-length': [ '293' ],
|
||||||
|
'content-type': [ 'text/html; charset=utf-8' ]
|
||||||
|
};
|
||||||
|
const wappalyzer = new Wappalyzer();
|
||||||
|
wappalyzer.apps = {
|
||||||
|
"Express": {
|
||||||
|
"headers": {
|
||||||
|
"X-Powered-By": "^Express$"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var applications = null;
|
||||||
|
wappalyzer.driver = {
|
||||||
|
log () {},
|
||||||
|
displayApps (detectedMap) {
|
||||||
|
applications = detectedMap;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
await wappalyzer.analyze({ canonical: 'example.com' }, { headers });
|
||||||
|
assert.equal(applications['Express'].name, 'Express');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should analyze js globals', async () => {
|
||||||
|
const js = {
|
||||||
|
'Moment.js': { 'moment': { '0': true } },
|
||||||
|
'Google Font API': { 'WebFonts': { '0': true } }
|
||||||
|
};
|
||||||
|
const wappalyzer = new Wappalyzer();
|
||||||
|
wappalyzer.apps = {
|
||||||
|
"Moment.js": {
|
||||||
|
"js": {
|
||||||
|
"moment": "",
|
||||||
|
"moment.version": "(.*)\\;version:\\1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Google Font API": {
|
||||||
|
"js": {
|
||||||
|
"WebFonts": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var applications = null;
|
||||||
|
wappalyzer.driver = {
|
||||||
|
log () {},
|
||||||
|
displayApps (detectedMap) {
|
||||||
|
applications = detectedMap;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
wappalyzer.parseJsPatterns();
|
||||||
|
await wappalyzer.analyze({ canonical: 'example.com' }, { js });
|
||||||
|
|
||||||
|
assert.equal(applications['Google Font API'].name, 'Google Font API');
|
||||||
|
assert.equal(applications['Moment.js'].name, 'Moment.js');
|
||||||
|
});
|
||||||
|
});
|