Merge pull request #920 from passmarked/master

Various updates to work/fit nicely on NPMJS.org
main
Elbert Alias 9 years ago
commit 6d3ffa7599

@ -1,78 +1,145 @@
# Wappalyzer # Wappalyzer
This is npm module for wappalyzer ## Install
npm install wappalyzer Install wappalyzer from NPM with:
```bash
npm install wappalyzer
```
## Quickstart
var wappalyzer = require("wappalyzer"); ```javascript
// load in the lib
var wappalyzer = require("wappalyzer");
// set our options
var options={
var options={
url : "http://codelanka.github.io/Presentation-Engines", url : "http://codelanka.github.io/Presentation-Engines",
hostname:"codelanka.github.io", hostname:"codelanka.github.io",
debug:false debug:false
}
wappalyzer.detectFromUrl(options,function (err,apps,appInfo) { }
console.log(err,apps,appInfo);
}) // detect from the url directly, library will make a request
wappalyzer.detectFromUrl(options,function (err,apps,appInfo) {
// output for the test
console.dir(apps);
console.dir(appInfo);
})
// sample data
var data = {
url: options.url,
headers: {
test: 1
},
html: '<p>HTML CONTENT OF PAGE HERE</p>'
####Output };
// detect from content you have already
wappalyzer.detectFromHTML(options,function (err,apps,appInfo) {
null [ 'AngularJS', // output for the test
console.dir(apps);
console.log(appInfo);
})
```
### Output from QuickStart
```javascript
// Apps
[
'CloudFlare',
'Font Awesome', 'Font Awesome',
'Google Font API', 'Google Maps',
'jQuery', 'Modernizr',
'Twitter Bootstrap' ] { AngularJS: 'Nginx',
{ app: 'AngularJS', 'RequireJS',
confidence: 'jQuery'
{ 'script //([\\d.]+(\\-?rc[.\\d]*)*)/angular(\\.min)?\\.js/i': 100, ]
'script /angular.*\\.js/i': 100 },
// Detailed info on links
{
CloudFlare: {
app: 'CloudFlare',
confidence: { 'headers Server /cloudflare/i': 100 },
confidenceTotal: 100,
detected: true,
excludes: [],
version: '',
versions: []
},
'Font Awesome': {
app: 'Font Awesome',
confidence: { 'html /<link[^>]* href=[^>]+font-awesome(?:\.min)?\.css/i': 100 },
confidenceTotal: 100, confidenceTotal: 100,
detected: true, detected: true,
excludes: [], excludes: [],
version: '1.3.5', version: '',
versions: [ '1.3.5' ] }, versions: []
'Font Awesome': },
{ app: 'Font Awesome', 'Google Maps': {
confidence: { 'html /<link[^>]* href=[^>]+font-awesome(?:\\.min)?\\.css/i': 100 }, app: 'Google Maps',
confidence: { 'script ///maps.googleapis.com/maps/api/js/i': 100 },
confidenceTotal: 100, confidenceTotal: 100,
detected: true, detected: true,
excludes: [], excludes: [],
version: '', version: '',
versions: [] }, versions: []
'Google Font API': },
{ app: 'Google Font API', 'Modernizr': {
confidence: { 'html /<link[^>]* href=[^>]+fonts\\.(?:googleapis|google)\\.com/i': 100 }, app: 'Modernizr',
confidence: { 'script /modernizr(?:-([\d.]*[\d]))?.*\.js/i': 100 },
confidenceTotal: 100,
detected: true,
excludes: [],
version: '2.6.2',
versions: [ '2.6.2' ]
},
'Nginx': {
app: 'Nginx',
confidence: { 'headers Server /nginx(?:/([\d.]+))?/i': 100 },
confidenceTotal: 100, confidenceTotal: 100,
detected: true, detected: true,
excludes: [], excludes: [],
version: '', version: '',
versions: [] }, versions: []
jQuery: },
{ app: 'jQuery', 'RequireJS': {
confidence: { 'script /jquery.*\\.js/i': 100 }, app: 'RequireJS',
confidence: { 'script /require.*\.js/i': 100 },
confidenceTotal: 100, confidenceTotal: 100,
detected: true, detected: true,
excludes: [], excludes: [],
version: '', version: '',
versions: [] }, versions: []
'Twitter Bootstrap': },
{ app: 'Twitter Bootstrap', 'jQuery': {
app: 'jQuery',
confidence: confidence:
{ 'script /(?:twitter\\.github\\.com/bootstrap|bootstrap(?:\\.js|\\.min\\.js))/i': 100, { 'script //([\d.]+)/jquery(\.min)?\.js/i': 100,
'html /<link.+?href="[^"]+bootstrap(?:\\.min)?\\.css/i': 100 }, 'script /jquery.*\.js/i': 100 },
confidenceTotal: 100, confidenceTotal: 100,
detected: true, detected: true,
excludes: [], excludes: [],
version: '', version: '1.10.1',
versions: [] } } versions: [ '1.10.1' ]
}
}
```
## Credits
Wappalyzer Author - Elbert Alias ### Wappalyzer Author - Elbert Alias
[Wappalyzer](https://wappalyzer.com/) is a [Wappalyzer](https://wappalyzer.com/) is a
[cross-platform](https://github.com/AliasIO/Wappalyzer/wiki/Drivers) utility that uncovers the [cross-platform](https://github.com/AliasIO/Wappalyzer/wiki/Drivers) utility that uncovers the
@ -89,8 +156,17 @@ Refer to the [wiki](https://github.com/AliasIO/Wappalyzer/wiki) for
[contribute](https://github.com/AliasIO/Wappalyzer/wiki/Contributing) and [contribute](https://github.com/AliasIO/Wappalyzer/wiki/Contributing) and
[more](https://github.com/AliasIO/Wappalyzer/wiki/_pages). [more](https://github.com/AliasIO/Wappalyzer/wiki/_pages).
### NPM Module
* [Pasindu De Silva](https://github.com/pasindud) - Initial version with tests
* [Johann du Toit](http://johanndutoit.net) from [Passmarked](http://passmarked.com) - Updated to support just passing data and helped publish to NPMJS
## License
*Licensed under the [GPL](https://github.com/AliasIO/Wappalyzer/blob/master/LICENSE).* *Licensed under the [GPL](https://github.com/AliasIO/Wappalyzer/blob/master/LICENSE).*
## Donations
Donate Bitcoin: 16gb4uGDAjaeRJwKVmKr2EXa8x2fmvT8EQ - *Thanks!* Donate Bitcoin: 16gb4uGDAjaeRJwKVmKr2EXa8x2fmvT8EQ - *Thanks!*
![QR Code](https://wappalyzer.com/sites/default/themes/wappalyzer/images/bitcoinqrcode.png) ![QR Code](https://wappalyzer.com/sites/default/themes/wappalyzer/images/bitcoinqrcode.png)

@ -81,7 +81,20 @@ function getHTMLFromUrl(url, cb) {
} }
function getAppsJson(cb) { function getAppsJson(cb) {
fs.readFile(path.resolve(__dirname, '../../apps.json'), 'utf8', function(err, data) {
// depending on evironment select a direction to the path
var appsFileStr = path.resolve(__dirname, './apps.json');
// handle the environment variable if it's there
if(process.env.NODE_ENV == 'testing') {
// set the apps.json to testing stage
appsFileStr = path.resolve(__dirname, '../../apps.json');
}
// read in the file
fs.readFile(appsFileStr, 'utf8', function(err, data) {
if (err) throw err; if (err) throw err;
return cb(null, JSON.parse(data)); return cb(null, JSON.parse(data));
}); });

@ -1,6 +1,6 @@
{ {
"name": "wappalyzer", "name": "wappalyzer",
"version": "2.0.2", "version": "2.0.3",
"description": "NPM Module that uncovers the technologies used on websites", "description": "NPM Module that uncovers the technologies used on websites",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
@ -11,9 +11,20 @@
"url": "https://github.com/AliasIO/Wappalyzer" "url": "https://github.com/AliasIO/Wappalyzer"
}, },
"keywords": [ "keywords": [
"wappalyzer" "wappalyzer",
"detect",
"stack",
"technologies"
], ],
"author": "Pasindu De Silva", "contributors": [
{
"name": "Pasindu De Silva"
},
{
"name": "Johann du Toit"
}
],
"author": "Elbert Alias",
"license": "GPLv3", "license": "GPLv3",
"bugs": { "bugs": {
"url": "https://github.com/AliasIO/Wappalyzer/issues" "url": "https://github.com/AliasIO/Wappalyzer/issues"

Loading…
Cancel
Save