Rename apps.json to technologies.json

main
Elbert Alias 4 years ago
parent d2b11ffcbb
commit 9e8537383a

@ -17,7 +17,7 @@ if (!version) {
;[ ;[
'./src/package.json', './src/package.json',
'./src/drivers/npm/package.json', './src/drivers/npm/package.json',
'./src/drivers/webextension/manifest.json' './src/drivers/webextension/manifest.json',
].forEach((file) => { ].forEach((file) => {
const json = JSON.parse(fs.readFileSync(file)) const json = JSON.parse(fs.readFileSync(file))

@ -9,9 +9,9 @@ const link = (src, dest) => {
} }
// WebExtension // WebExtension
link('./src/apps.json', './src/drivers/webextension/apps.json') link('./src/technologies.json', './src/drivers/webextension/technologies.json')
link('./src/wappalyzer.js', './src/drivers/webextension/js/wappalyzer.js') link('./src/wappalyzer.js', './src/drivers/webextension/js/wappalyzer.js')
// NPM // NPM
link('./src/apps.json', './src/drivers/npm/apps.json') link('./src/technologies.json', './src/drivers/npm/technologies.json')
link('./src/wappalyzer.js', './src/drivers/npm/wappalyzer.js') link('./src/wappalyzer.js', './src/drivers/npm/wappalyzer.js')

@ -2,8 +2,8 @@ const fs = require('fs')
const iconPath = './src/drivers/webextension/images/icons' const iconPath = './src/drivers/webextension/images/icons'
const { apps: technologies, categories } = JSON.parse( const { technologies, categories } = JSON.parse(
fs.readFileSync('./src/apps.json') fs.readFileSync('./src/technologies.json')
) )
try { try {

@ -17,9 +17,9 @@
"scripts": { "scripts": {
"link": "node ./bin/link.js", "link": "node ./bin/link.js",
"lint": "eslint --fix src/**/*.js", "lint": "eslint --fix src/**/*.js",
"validate": "yarn run lint && jsonlint -qV ./schema.json ./src/apps.json && node ./bin/validate.js", "validate": "yarn run lint && jsonlint -qV ./schema.json ./src/technologies.json && node ./bin/validate.js",
"convert": "cd ./src/drivers/webextension/images/icons ; cp *.svg converted ; cd converted ; convert-svg-to-png *.svg --width 32 --height 32 ; rm *.svg", "convert": "cd ./src/drivers/webextension/images/icons ; cp *.svg converted ; cd converted ; convert-svg-to-png *.svg --width 32 --height 32 ; rm *.svg",
"prettify": "jsonlint -si --trim-trailing-commas --enforce-double-quotes ./src/apps.json", "prettify": "jsonlint -si --trim-trailing-commas --enforce-double-quotes ./src/technologies.json",
"build": "yarn run link && yarn run validate && yarn run prettify && yarn run convert && node ./bin/build.js", "build": "yarn run link && yarn run validate && yarn run prettify && yarn run convert && node ./bin/build.js",
"build:safari": "xcrun safari-web-extension-converter --swift --project-location build --force src/drivers/webextension" "build:safari": "xcrun safari-web-extension-converter --swift --project-location build --force src/drivers/webextension"
} }

@ -8,7 +8,7 @@
}, },
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
"required": ["categories","apps"], "required": ["technologies", "categories"],
"properties": { "properties": {
"$schema": { "$schema": {
"type": "string" "type": "string"
@ -31,7 +31,7 @@
} }
} }
}, },
"apps": { "technologies": {
"type": "object", "type": "object",
"additionalProperties": { "additionalProperties": {
"additionalProperties": false, "additionalProperties": false,
@ -110,6 +110,19 @@
} }
] ]
}, },
"certIssuer": {
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/non-empty-non-blank-string"
}
},
{
"$ref": "#/definitions/non-empty-non-blank-string"
}
]
},
"excludes": { "excludes": {
"oneOf": [ "oneOf": [
{ {
@ -147,7 +160,7 @@
} }
} }
}, },
"script": { "scripts": {
"oneOf": [ "oneOf": [
{ {
"type": "array", "type": "array",

@ -17,9 +17,9 @@ const fs = require('fs')
const Wappalyzer = require('./wappalyzer') const Wappalyzer = require('./wappalyzer')
// See https://www.wappalyzer.com/docs/dev/specification or use // See https://www.wappalyzer.com/docs/dev/specification or use
// https://raw.githubusercontent.com/AliasIO/wappalyzer/master/src/apps.json // https://raw.githubusercontent.com/AliasIO/wappalyzer/master/src/technologies.json
const { apps: technologies, categories } = JSON.parse( const { technologies, categories } = JSON.parse(
fs.readFileSync('./apps.json') fs.readFileSync('./technologies.json')
) )
Wappalyzer.setTechnologies(technologies) Wappalyzer.setTechnologies(technologies)

@ -17,10 +17,10 @@ RUN mkdir -p "$WAPPALYZER_ROOT/browsers"
WORKDIR "$WAPPALYZER_ROOT" WORKDIR "$WAPPALYZER_ROOT"
ADD apps.json .
ADD cli.js . ADD cli.js .
ADD driver.js . ADD driver.js .
ADD package.json . ADD package.json .
ADD technologies.json .
ADD wappalyzer.js . ADD wappalyzer.js .
ADD yarn.lock . ADD yarn.lock .

@ -43,8 +43,8 @@ if (AWS_LAMBDA_FUNCTION_NAME) {
const extensions = /^([^.]+$|\.(asp|aspx|cgi|htm|html|jsp|php)$)/ const extensions = /^([^.]+$|\.(asp|aspx|cgi|htm|html|jsp|php)$)/
const { apps: technologies, categories } = JSON.parse( const { technologies, categories } = JSON.parse(
fs.readFileSync(path.resolve(`${__dirname}/apps.json`)) fs.readFileSync(path.resolve(`${__dirname}/technologies.json`))
) )
setTechnologies(technologies) setTechnologies(technologies)
@ -321,8 +321,6 @@ class Site {
? response.securityDetails().issuer() ? response.securityDetails().issuer()
: '' : ''
console.log(certIssuer)
this.onDetect(analyze({ headers, certIssuer })) this.onDetect(analyze({ headers, certIssuer }))
await this.emit('response', { page, response }) await this.emit('response', { page, response })

@ -25,10 +25,10 @@
}, },
"main": "driver.js", "main": "driver.js",
"files": [ "files": [
"apps.json",
"cli.js", "cli.js",
"driver.js", "driver.js",
"index.js", "index.js",
"technologies.json",
"wappalyzer.js" "wappalyzer.js"
], ],
"bin": { "bin": {

@ -106,8 +106,8 @@ const Driver = {
*/ */
async loadTechnologies() { async loadTechnologies() {
try { try {
const { apps: technologies, categories } = await ( const { technologies, categories } = await (
await fetch(chrome.extension.getURL('apps.json')) await fetch(chrome.extension.getURL('technologies.json'))
).json() ).json()
setTechnologies(technologies) setTechnologies(technologies)

File diff suppressed because it is too large Load Diff

@ -226,7 +226,7 @@ const Wappalyzer = {
headers, headers,
certIssuer, certIssuer,
cookies, cookies,
script, scripts,
js, js,
implies, implies,
excludes, excludes,
@ -246,7 +246,7 @@ const Wappalyzer = {
certIssuer: transform(certIssuer), certIssuer: transform(certIssuer),
robots: transform(robots), robots: transform(robots),
meta: transform(meta), meta: transform(meta),
scripts: transform(script), scripts: transform(scripts),
js: transform(js, true), js: transform(js, true),
implies: transform(implies).map(({ value, confidence }) => ({ implies: transform(implies).map(({ value, confidence }) => ({
name: value, name: value,