main
Elbert Alias 6 years ago
commit 3a9e6059e7

File diff suppressed because it is too large Load Diff

@ -14,40 +14,40 @@ technologies used on websites. It detects
## Installation ## Installation
```shell ```shell
$ npm i wappalyzer $ npm i -g wappalyzer # Globally
$ npm i wappalyzer --save # As a dependency
``` ```
## Run from the command line ## Run from the command line
``` ```
node index.js [url] [options] wappalyzer [url] [options]
``` ```
### Options ### Options
``` ```
--password Password to be used for basic HTTP authentication --password Password to be used for basic HTTP authentication
--proxy Proxy URL, e.g. 'http://user:pass@proxy:8080' --proxy Proxy URL, e.g. 'http://user:pass@proxy:8080'
--username Username to be used for basic HTTP authentication --username Username to be used for basic HTTP authentication
--chunk-size=num Process links in chunks. --chunk-size=num Process links in chunks.
--debug=0|1 Output debug messages. --debug=0|1 Output debug messages.
--delay=ms Wait for ms milliseconds between requests. --delay=ms Wait for ms milliseconds between requests.
--html-max-cols=num Limit the number of HTML characters per line processed. --html-max-cols=num Limit the number of HTML characters per line processed.
--html-max-rows=num Limit the number of HTML lines processed. --html-max-rows=num Limit the number of HTML lines processed.
--max-depth=num Don't analyse pages more than num levels deep. --max-depth=num Don't analyse pages more than num levels deep.
--max-urls=num Exit when num URLs have been analysed. --max-urls=num Exit when num URLs have been analysed.
--max-wait=ms Wait no more than ms milliseconds for page resources to load. --max-wait=ms Wait no more than ms milliseconds for page resources to load.
--recursive=0|1 Follow links on pages (crawler). --recursive=0|1 Follow links on pages (crawler).
--user-agent=str Set the user agent string. --user-agent=str Set the user agent string.
``` ```
## Run from a script ## Run from a script
```javascript ```javascript
const Wappalyzer = require('./driver'); const Wappalyzer = require('wappalyzer');
const Browser = require('./browsers/zombie');
const url = 'https://www.wappalyzer.com'; const url = 'https://www.wappalyzer.com';
@ -63,7 +63,10 @@ const options = {
htmlMaxRows: 2000, htmlMaxRows: 2000,
}; };
const wappalyzer = new Wappalyzer(Browser, url, options); const wappalyzer = new Wappalyzer(url, options);
// Optional: set the browser to use
// wappalyzer.browser = Wappalyzer.browsers.zombie;
// Optional: capture log output // Optional: capture log output
// wappalyzer.on('log', params => { // wappalyzer.on('log', params => {

@ -0,0 +1,45 @@
#!/usr/bin/env node
const Wappalyzer = require('./driver');
const Browser = require('./browsers/zombie');
const args = process.argv.slice(2);
const url = args.shift() || '';
if (!url) {
process.stderr.write('No URL specified\n');
process.exit(1);
}
const options = {};
let arg;
do {
arg = args.shift();
const matches = /--([^=]+)=(.+)/.exec(arg);
if (matches) {
const key = matches[1].replace(/-\w/g, _matches => _matches[1].toUpperCase());
const value = matches[2];
options[key] = value;
}
} while (arg);
const wappalyzer = new Wappalyzer(Browser, url, options);
wappalyzer.analyze()
.then((json) => {
process.stdout.write(`${JSON.stringify(json)}\n`);
process.exit(0);
})
.catch((error) => {
process.stderr.write(`${error}\n`);
process.exit(1);
});

@ -317,5 +317,6 @@ class Driver {
} }
module.exports = Driver; module.exports = Driver;
module.exports.processJs = processJs; module.exports.processJs = processJs;
module.exports.processHtml = processHtml; module.exports.processHtml = processHtml;

@ -1,45 +1,16 @@
#!/usr/bin/env node const Driver = require('./driver');
const ZombieBrowser = require('./browsers/zombie');
const Wappalyzer = require('./driver'); class Wappalyzer {
const Browser = require('./browsers/zombie'); constructor(pageUrl, options) {
this.browser = ZombieBrowser;
const args = process.argv.slice(2); return new Driver(this.browser, pageUrl, options);
const url = args.shift() || '';
if (!url) {
process.stderr.write('No URL specified\n');
process.exit(1);
}
const options = {};
let arg;
do {
arg = args.shift();
const matches = /--([^=]+)=(.+)/.exec(arg);
if (matches) {
const key = matches[1].replace(/-\w/g, _matches => _matches[1].toUpperCase());
const value = matches[2];
options[key] = value;
} }
} while (arg); }
const wappalyzer = new Wappalyzer(Browser, url, options);
wappalyzer.analyze()
.then((json) => {
process.stdout.write(`${JSON.stringify(json)}\n`);
process.exit(0); Wappalyzer.browsers = {
}) zombie: ZombieBrowser,
.catch((error) => { };
process.stderr.write(`${error}\n`);
process.exit(1); module.exports = Wappalyzer;
});

@ -1,6 +1,6 @@
{ {
"name": "wappalyzer", "name": "wappalyzer",
"version": "5.7.4", "version": "5.8.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

@ -2,24 +2,25 @@
"name": "wappalyzer", "name": "wappalyzer",
"description": "Uncovers the technologies used on websites", "description": "Uncovers the technologies used on websites",
"homepage": "https://github.com/AliasIO/Wappalyzer", "homepage": "https://github.com/AliasIO/Wappalyzer",
"version": "5.7.4", "version": "5.8.1",
"author": "Elbert Alias", "author": "Elbert Alias",
"license": "GPL-3.0", "license": "GPL-3.0",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/AliasIO/Wappalyzer" "url": "https://github.com/AliasIO/Wappalyzer"
}, },
"main": "driver.js", "main": "index.js",
"files": [ "files": [
"apps.json", "apps.json",
"browser.js", "browser.js",
"browsers/zombie.js", "browsers/zombie.js",
"cli.js",
"driver.js", "driver.js",
"index.js", "index.js",
"wappalyzer.js" "wappalyzer.js"
], ],
"bin": { "bin": {
"wappalyzer": "./index.js" "wappalyzer": "./cli.js"
}, },
"dependencies": { "dependencies": {
"zombie": "^6.1.2" "zombie": "^6.1.2"

@ -4,7 +4,7 @@
"author": "Elbert Alias", "author": "Elbert Alias",
"homepage_url": "https://www.wappalyzer.com", "homepage_url": "https://www.wappalyzer.com",
"description": "Identify web technologies", "description": "Identify web technologies",
"version": "5.7.4", "version": "5.8.1",
"default_locale": "en", "default_locale": "en",
"manifest_version": 2, "manifest_version": 2,
"icons": { "icons": {