Update README

main
Elbert Alias 4 years ago
parent c6f6677337
commit 05a9d7d761

@ -0,0 +1,40 @@
# Wappalyzer core
[Wappalyzer](https://www.wappalyzer.com/) indentifies technologies on websites.
## Installation
```shell
$ npm i wappalyzer-core
```
## Usage
```javascript
#!/usr/bin/env node
const fs = require('fs')
const Wappalyzer = require('./wappalyzer')
// See https://www.wappalyzer.com/docs/dev/specification or use
// https://raw.githubusercontent.com/AliasIO/wappalyzer/master/src/technologies.json
const { technologies, categories } = JSON.parse(
fs.readFileSync('./technologies.json')
)
Wappalyzer.setTechnologies(technologies)
Wappalyzer.setCategories(categories)
const detections = Wappalyzer.analyze({
url: 'https://example.github.io/',
meta: { generator: ['WordPress'] },
headers: { server: ['Nginx'] },
scripts: ['jquery-3.0.0.js'],
cookies: { awselb: [''] },
html: '<div ng-app="">'
})
const results = Wappalyzer.resolve(detections)
console.log(results)
```

@ -67,7 +67,7 @@ const options = {
};
;(async function() {
const wappalyzer = await new Wappalyzer(options)
const wappalyzer = new Wappalyzer(options)
try {
await wappalyzer.init()

@ -77,7 +77,7 @@ Options:
}
;(async function () {
const wappalyzer = await new Wappalyzer(options)
const wappalyzer = new Wappalyzer(options)
try {
await wappalyzer.init()

@ -267,41 +267,11 @@ const Driver = {
)
})
/*
let certIssuer = ''
if (
browser &&
browser.webRequest &&
browser.webRequest.getSecurityInfo
) {
// Currently only works in Firefox
// See https://stackoverflow.com/a/50484642
const { certificates } = await browser.webRequest.getSecurityInfo(
request.requestId,
{
certificateChain: false,
rawDER: false,
}
)
if (certificates && certificates.length) {
certIssuer = certificates[0].issuer.replace(
/^.*CN=([^,]+).*$/,
'$1'
)
}
}
*/
if (
headers['content-type'] &&
/\/x?html/.test(headers['content-type'][0])
) {
await Driver.onDetect(
request.url,
analyze({ headers /*, certIssuer */ })
)
await Driver.onDetect(request.url, analyze({ headers }))
}
}
} catch (error) {

Loading…
Cancel
Save