simple-wappalyzer 1.1.90 → 1.1.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +26 -30
- package/src/technologies.json +27653 -32513
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "simple-wappalyzer",
|
|
3
3
|
"description": "A simple way to interacting with Wappalyzer.",
|
|
4
4
|
"homepage": "https://github.com/Kikobeats/simple-wappalyzer",
|
|
5
|
-
"version": "1.1.
|
|
5
|
+
"version": "1.1.92",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"author": {
|
|
8
8
|
"email": "josefrancisco.verdu@gmail.com",
|
package/src/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const { chain, mapValues } = require('lodash')
|
|
4
4
|
const wappalyzer = require('wappalyzer-core')
|
|
5
5
|
const { Cookie } = require('tough-cookie')
|
|
6
|
-
const {
|
|
6
|
+
const { Window } = require('happy-dom')
|
|
7
7
|
|
|
8
8
|
const technologies = require('./technologies.json')
|
|
9
9
|
const categories = require('./categories.json')
|
|
@@ -41,36 +41,32 @@ const getMeta = document =>
|
|
|
41
41
|
return acc
|
|
42
42
|
}, {})
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
disableJavaScriptFileLoading: true
|
|
52
|
-
}
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
const page = browser.newPage()
|
|
56
|
-
page.url = url
|
|
57
|
-
page.content = html
|
|
58
|
-
|
|
59
|
-
const document = page.mainFrame.document
|
|
60
|
-
|
|
61
|
-
const detections = await wappalyzer.analyze({
|
|
62
|
-
url,
|
|
63
|
-
meta: getMeta(document),
|
|
64
|
-
headers: getHeaders(headers),
|
|
65
|
-
scripts: getScripts(document.scripts),
|
|
66
|
-
cookies: getCookies(getHeader(headers, 'set-cookie')),
|
|
67
|
-
html: document.documentElement.outerHTML
|
|
68
|
-
})
|
|
69
|
-
|
|
70
|
-
const result = wappalyzer.resolve(detections)
|
|
71
|
-
await browser.close()
|
|
44
|
+
const DOCUMENT_SETTINGS = {
|
|
45
|
+
disableComputedStyleRendering: true,
|
|
46
|
+
disableCSSFileLoading: true,
|
|
47
|
+
disableIframePageLoading: true,
|
|
48
|
+
disableJavaScriptEvaluation: true,
|
|
49
|
+
disableJavaScriptFileLoading: true
|
|
50
|
+
}
|
|
72
51
|
|
|
73
|
-
|
|
52
|
+
module.exports = async ({ url, headers, html }) => {
|
|
53
|
+
const window = new Window({ url, settings: DOCUMENT_SETTINGS })
|
|
54
|
+
window.document.documentElement.innerHTML = html
|
|
55
|
+
|
|
56
|
+
try {
|
|
57
|
+
const detections = await wappalyzer.analyze({
|
|
58
|
+
url,
|
|
59
|
+
meta: getMeta(window.document),
|
|
60
|
+
headers: getHeaders(headers),
|
|
61
|
+
scripts: getScripts(window.document.scripts),
|
|
62
|
+
cookies: getCookies(getHeader(headers, 'set-cookie')),
|
|
63
|
+
html: window.document.documentElement.outerHTML
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
return wappalyzer.resolve(detections)
|
|
67
|
+
} finally {
|
|
68
|
+
await window.happyDOM.close()
|
|
69
|
+
}
|
|
74
70
|
}
|
|
75
71
|
|
|
76
72
|
module.exports.getHeader = getHeader
|