|
|
@ -9,7 +9,6 @@ const {
|
|
|
|
setTechnologies,
|
|
|
|
setTechnologies,
|
|
|
|
setCategories,
|
|
|
|
setCategories,
|
|
|
|
analyze,
|
|
|
|
analyze,
|
|
|
|
analyzeOneToMany,
|
|
|
|
|
|
|
|
analyzeManyToMany,
|
|
|
|
analyzeManyToMany,
|
|
|
|
resolve,
|
|
|
|
resolve,
|
|
|
|
} = Wappalyzer
|
|
|
|
} = Wappalyzer
|
|
|
@ -395,6 +394,8 @@ class Site {
|
|
|
|
|
|
|
|
|
|
|
|
await sleep(1000)
|
|
|
|
await sleep(1000)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// page.on('console', (message) => this.log(message.text()))
|
|
|
|
|
|
|
|
|
|
|
|
// Links
|
|
|
|
// Links
|
|
|
|
const links = await this.promiseTimeout(
|
|
|
|
const links = await this.promiseTimeout(
|
|
|
|
(
|
|
|
|
(
|
|
|
@ -529,15 +530,16 @@ class Site {
|
|
|
|
: !!value
|
|
|
|
: !!value
|
|
|
|
|
|
|
|
|
|
|
|
Object.keys(dom).forEach((selector) => {
|
|
|
|
Object.keys(dom).forEach((selector) => {
|
|
|
|
const el = document.querySelector(selector)
|
|
|
|
const nodes = document.querySelectorAll(selector)
|
|
|
|
|
|
|
|
|
|
|
|
if (!el) {
|
|
|
|
if (!nodes.length) {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dom[selector].forEach(({ text, properties, attributes }) => {
|
|
|
|
dom[selector].forEach(({ text, properties, attributes }) => {
|
|
|
|
|
|
|
|
nodes.forEach((node) => {
|
|
|
|
if (text) {
|
|
|
|
if (text) {
|
|
|
|
const value = el.textContent.trim()
|
|
|
|
const value = node.textContent.trim()
|
|
|
|
|
|
|
|
|
|
|
|
if (value) {
|
|
|
|
if (value) {
|
|
|
|
technologies.push({
|
|
|
|
technologies.push({
|
|
|
@ -550,8 +552,10 @@ class Site {
|
|
|
|
|
|
|
|
|
|
|
|
if (properties) {
|
|
|
|
if (properties) {
|
|
|
|
Object.keys(properties).forEach((property) => {
|
|
|
|
Object.keys(properties).forEach((property) => {
|
|
|
|
if (Object.prototype.hasOwnProperty.call(el, property)) {
|
|
|
|
if (
|
|
|
|
const value = el[property]
|
|
|
|
Object.prototype.hasOwnProperty.call(node, property)
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
const value = node[property]
|
|
|
|
|
|
|
|
|
|
|
|
if (typeof value !== 'undefined') {
|
|
|
|
if (typeof value !== 'undefined') {
|
|
|
|
technologies.push({
|
|
|
|
technologies.push({
|
|
|
@ -567,8 +571,8 @@ class Site {
|
|
|
|
|
|
|
|
|
|
|
|
if (attributes) {
|
|
|
|
if (attributes) {
|
|
|
|
Object.keys(attributes).forEach((attribute) => {
|
|
|
|
Object.keys(attributes).forEach((attribute) => {
|
|
|
|
if (el.hasAttribute(attribute)) {
|
|
|
|
if (node.hasAttribute(attribute)) {
|
|
|
|
const value = el.getAttribute(attribute)
|
|
|
|
const value = node.getAttribute(attribute)
|
|
|
|
|
|
|
|
|
|
|
|
technologies.push({
|
|
|
|
technologies.push({
|
|
|
|
name,
|
|
|
|
name,
|
|
|
@ -581,6 +585,7 @@ class Site {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
return technologies
|
|
|
|
return technologies
|
|
|
|
}, [])
|
|
|
|
}, [])
|
|
|
|