main
Elbert Alias 12 years ago
parent 70a9460d13
commit 9c0ff2e6b8

@ -66,7 +66,7 @@ var wappalyzer = (function() {
// Checks // Checks
if ( w.driver == null ) { if ( w.driver == null ) {
w.log('no driver, exiting'); w.log('no driver, exiting');
G
return; return;
} }
@ -180,7 +180,7 @@ var wappalyzer = (function() {
profiler.regexCount ++; profiler.regexCount ++;
regexMeta = new RegExp('<meta[^>]+>', 'ig'); regexMeta = /<meta[^>]+>/ig;
while ( match = regexMeta.exec(data.html) ) { while ( match = regexMeta.exec(data.html) ) {
for ( meta in w.apps[app][type] ) { for ( meta in w.apps[app][type] ) {
@ -271,13 +271,13 @@ var wappalyzer = (function() {
w.log(apps.length + ' apps detected: ' + apps.join(', ') + ' on ' + url); w.log(apps.length + ' apps detected: ' + apps.join(', ') + ' on ' + url);
// Keep history of detected apps // Keep history of detected apps
var i, app, match; var i, app, regex, regexMeta, match;
for ( i in apps ) { for ( i in apps ) {
app = apps[i]; app = apps[i];
// Per hostname // Per hostname
if ( /^[a-z0-9._\-]+\.[a-z]+/.test(hostname) && !/(dev\.|\/admin|\.local)/.test(url) ) { if ( /^[a-z0-9._\-]+\.[a-z]+/.test(hostname) && !/((local|dev|development|stage|staging|test|testing|demo|admin)\.|\/admin|\.local)/.test(url) ) {
if ( typeof w.ping.hostnames === 'undefined' ) { if ( typeof w.ping.hostnames === 'undefined' ) {
w.ping.hostnames = {}; w.ping.hostnames = {};
} }
@ -300,14 +300,28 @@ var wappalyzer = (function() {
// Additional information // Additional information
if ( typeof w.ping.hostnames !== 'undefined' && typeof w.ping.hostnames[hostname] !== 'undefined' ) { if ( typeof w.ping.hostnames !== 'undefined' && typeof w.ping.hostnames[hostname] !== 'undefined' ) {
if ( data.html != null ) { if ( data.html != null ) {
match = data.html.match(/<html[^>]*[: ]lang="([^"]+)"/); match = data.html.match(/<html[^>]*[: ]lang="([a-z]{2}((-|_)[A-Z]{2})?)"/i);
if ( match != null && match.length ) { if ( match != null && match.length ) {
w.ping.hostnames[hostname].meta['language'] = match[1]; w.ping.hostnames[hostname].meta['language'] = match[1];
} }
regexMeta = /<meta[^>]+>/ig;
while ( match = regexMeta.exec(data.html) ) {
if ( !match.length ) { continue; }
match = match[0].match(/name="(author|copyright|country|description|keywords)"[^>]*content="([^"]+)"/i);
if ( match && match.length === 3 ) {
w.ping.hostnames[hostname].meta[match[1]] = match[2];
}
} }
} }
w.log(hostname + ': ' + JSON.stringify(w.ping.hostnames[hostname]));
}
if ( w.ping.hostnames != null && Object.keys(w.ping.hostnames).length >= 50 ) { driver('ping'); } if ( w.ping.hostnames != null && Object.keys(w.ping.hostnames).length >= 50 ) { driver('ping'); }
apps = null; apps = null;

@ -323,7 +323,7 @@
"implies": [ "node.js" ] "implies": [ "node.js" ]
}, },
"Contao": { "Contao": {
"cats": [ 1, 6 ], "cats": [ 1 ],
"html": "(<!--\\s+This website is powered by (TYPOlight|Contao)|<link[^>]+(typolight|contao).css)", "html": "(<!--\\s+This website is powered by (TYPOlight|Contao)|<link[^>]+(typolight|contao).css)",
"implies": [ "PHP" ] "implies": [ "PHP" ]
}, },

@ -323,7 +323,7 @@
"implies": [ "node.js" ] "implies": [ "node.js" ]
}, },
"Contao": { "Contao": {
"cats": [ 1, 6 ], "cats": [ 1 ],
"html": "(<!--\\s+This website is powered by (TYPOlight|Contao)|<link[^>]+(typolight|contao).css)", "html": "(<!--\\s+This website is powered by (TYPOlight|Contao)|<link[^>]+(typolight|contao).css)",
"implies": [ "PHP" ] "implies": [ "PHP" ]
}, },

@ -66,7 +66,7 @@ var wappalyzer = (function() {
// Checks // Checks
if ( w.driver == null ) { if ( w.driver == null ) {
w.log('no driver, exiting'); w.log('no driver, exiting');
G
return; return;
} }
@ -180,7 +180,7 @@ var wappalyzer = (function() {
profiler.regexCount ++; profiler.regexCount ++;
regexMeta = new RegExp('<meta[^>]+>', 'ig'); regexMeta = /<meta[^>]+>/ig;
while ( match = regexMeta.exec(data.html) ) { while ( match = regexMeta.exec(data.html) ) {
for ( meta in w.apps[app][type] ) { for ( meta in w.apps[app][type] ) {
@ -271,13 +271,13 @@ var wappalyzer = (function() {
w.log(apps.length + ' apps detected: ' + apps.join(', ') + ' on ' + url); w.log(apps.length + ' apps detected: ' + apps.join(', ') + ' on ' + url);
// Keep history of detected apps // Keep history of detected apps
var i, app, match; var i, app, regex, regexMeta, match;
for ( i in apps ) { for ( i in apps ) {
app = apps[i]; app = apps[i];
// Per hostname // Per hostname
if ( /^[a-z0-9._\-]+\.[a-z]+/.test(hostname) && !/(dev\.|\/admin|\.local)/.test(url) ) { if ( /^[a-z0-9._\-]+\.[a-z]+/.test(hostname) && !/((local|dev|development|stage|staging|test|testing|demo|admin)\.|\/admin|\.local)/.test(url) ) {
if ( typeof w.ping.hostnames === 'undefined' ) { if ( typeof w.ping.hostnames === 'undefined' ) {
w.ping.hostnames = {}; w.ping.hostnames = {};
} }
@ -300,14 +300,28 @@ var wappalyzer = (function() {
// Additional information // Additional information
if ( typeof w.ping.hostnames !== 'undefined' && typeof w.ping.hostnames[hostname] !== 'undefined' ) { if ( typeof w.ping.hostnames !== 'undefined' && typeof w.ping.hostnames[hostname] !== 'undefined' ) {
if ( data.html != null ) { if ( data.html != null ) {
match = data.html.match(/<html[^>]*[: ]lang="([^"]+)"/); match = data.html.match(/<html[^>]*[: ]lang="([a-z]{2}((-|_)[A-Z]{2})?)"/i);
if ( match != null && match.length ) { if ( match != null && match.length ) {
w.ping.hostnames[hostname].meta['language'] = match[1]; w.ping.hostnames[hostname].meta['language'] = match[1];
} }
regexMeta = /<meta[^>]+>/ig;
while ( match = regexMeta.exec(data.html) ) {
if ( !match.length ) { continue; }
match = match[0].match(/name="(author|copyright|country|description|keywords)"[^>]*content="([^"]+)"/i);
if ( match && match.length === 3 ) {
w.ping.hostnames[hostname].meta[match[1]] = match[2];
}
} }
} }
w.log(hostname + ': ' + JSON.stringify(w.ping.hostnames[hostname]));
}
if ( w.ping.hostnames != null && Object.keys(w.ping.hostnames).length >= 50 ) { driver('ping'); } if ( w.ping.hostnames != null && Object.keys(w.ping.hostnames).length >= 50 ) { driver('ping'); }
apps = null; apps = null;

@ -323,7 +323,7 @@
"implies": [ "node.js" ] "implies": [ "node.js" ]
}, },
"Contao": { "Contao": {
"cats": [ 1, 6 ], "cats": [ 1 ],
"html": "(<!--\\s+This website is powered by (TYPOlight|Contao)|<link[^>]+(typolight|contao).css)", "html": "(<!--\\s+This website is powered by (TYPOlight|Contao)|<link[^>]+(typolight|contao).css)",
"implies": [ "PHP" ] "implies": [ "PHP" ]
}, },

@ -66,7 +66,7 @@ var wappalyzer = (function() {
// Checks // Checks
if ( w.driver == null ) { if ( w.driver == null ) {
w.log('no driver, exiting'); w.log('no driver, exiting');
G
return; return;
} }
@ -180,7 +180,7 @@ var wappalyzer = (function() {
profiler.regexCount ++; profiler.regexCount ++;
regexMeta = new RegExp('<meta[^>]+>', 'ig'); regexMeta = /<meta[^>]+>/ig;
while ( match = regexMeta.exec(data.html) ) { while ( match = regexMeta.exec(data.html) ) {
for ( meta in w.apps[app][type] ) { for ( meta in w.apps[app][type] ) {
@ -271,13 +271,13 @@ var wappalyzer = (function() {
w.log(apps.length + ' apps detected: ' + apps.join(', ') + ' on ' + url); w.log(apps.length + ' apps detected: ' + apps.join(', ') + ' on ' + url);
// Keep history of detected apps // Keep history of detected apps
var i, app, match; var i, app, regex, regexMeta, match;
for ( i in apps ) { for ( i in apps ) {
app = apps[i]; app = apps[i];
// Per hostname // Per hostname
if ( /^[a-z0-9._\-]+\.[a-z]+/.test(hostname) && !/(dev\.|\/admin|\.local)/.test(url) ) { if ( /^[a-z0-9._\-]+\.[a-z]+/.test(hostname) && !/((local|dev|development|stage|staging|test|testing|demo|admin)\.|\/admin|\.local)/.test(url) ) {
if ( typeof w.ping.hostnames === 'undefined' ) { if ( typeof w.ping.hostnames === 'undefined' ) {
w.ping.hostnames = {}; w.ping.hostnames = {};
} }
@ -300,14 +300,28 @@ var wappalyzer = (function() {
// Additional information // Additional information
if ( typeof w.ping.hostnames !== 'undefined' && typeof w.ping.hostnames[hostname] !== 'undefined' ) { if ( typeof w.ping.hostnames !== 'undefined' && typeof w.ping.hostnames[hostname] !== 'undefined' ) {
if ( data.html != null ) { if ( data.html != null ) {
match = data.html.match(/<html[^>]*[: ]lang="([^"]+)"/); match = data.html.match(/<html[^>]*[: ]lang="([a-z]{2}((-|_)[A-Z]{2})?)"/i);
if ( match != null && match.length ) { if ( match != null && match.length ) {
w.ping.hostnames[hostname].meta['language'] = match[1]; w.ping.hostnames[hostname].meta['language'] = match[1];
} }
regexMeta = /<meta[^>]+>/ig;
while ( match = regexMeta.exec(data.html) ) {
if ( !match.length ) { continue; }
match = match[0].match(/name="(author|copyright|country|description|keywords)"[^>]*content="([^"]+)"/i);
if ( match && match.length === 3 ) {
w.ping.hostnames[hostname].meta[match[1]] = match[2];
}
} }
} }
w.log(hostname + ': ' + JSON.stringify(w.ping.hostnames[hostname]));
}
if ( w.ping.hostnames != null && Object.keys(w.ping.hostnames).length >= 50 ) { driver('ping'); } if ( w.ping.hostnames != null && Object.keys(w.ping.hostnames).length >= 50 ) { driver('ping'); }
apps = null; apps = null;

@ -323,7 +323,7 @@
"implies": [ "node.js" ] "implies": [ "node.js" ]
}, },
"Contao": { "Contao": {
"cats": [ 1, 6 ], "cats": [ 1 ],
"html": "(<!--\\s+This website is powered by (TYPOlight|Contao)|<link[^>]+(typolight|contao).css)", "html": "(<!--\\s+This website is powered by (TYPOlight|Contao)|<link[^>]+(typolight|contao).css)",
"implies": [ "PHP" ] "implies": [ "PHP" ]
}, },
@ -1694,7 +1694,7 @@
"WebsiteBaker": { "WebsiteBaker": {
"cats": [ 1 ], "cats": [ 1 ],
"meta": { "generator": "WebsiteBaker" }, "meta": { "generator": "WebsiteBaker" },
"implies": [ "PHP" ] "implies": [ 'PHP' ]
}, },
"Webtrekk": { "Webtrekk": {
"cats": [ 10 ], "cats": [ 10 ],

File diff suppressed because one or more lines are too long

@ -66,7 +66,7 @@ var wappalyzer = (function() {
// Checks // Checks
if ( w.driver == null ) { if ( w.driver == null ) {
w.log('no driver, exiting'); w.log('no driver, exiting');
G
return; return;
} }
@ -180,7 +180,7 @@ var wappalyzer = (function() {
profiler.regexCount ++; profiler.regexCount ++;
regexMeta = new RegExp('<meta[^>]+>', 'ig'); regexMeta = /<meta[^>]+>/ig;
while ( match = regexMeta.exec(data.html) ) { while ( match = regexMeta.exec(data.html) ) {
for ( meta in w.apps[app][type] ) { for ( meta in w.apps[app][type] ) {
@ -271,13 +271,13 @@ var wappalyzer = (function() {
w.log(apps.length + ' apps detected: ' + apps.join(', ') + ' on ' + url); w.log(apps.length + ' apps detected: ' + apps.join(', ') + ' on ' + url);
// Keep history of detected apps // Keep history of detected apps
var i, app, match; var i, app, regex, regexMeta, match;
for ( i in apps ) { for ( i in apps ) {
app = apps[i]; app = apps[i];
// Per hostname // Per hostname
if ( /^[a-z0-9._\-]+\.[a-z]+/.test(hostname) && !/(dev\.|\/admin|\.local)/.test(url) ) { if ( /^[a-z0-9._\-]+\.[a-z]+/.test(hostname) && !/((local|dev|development|stage|staging|test|testing|demo|admin)\.|\/admin|\.local)/.test(url) ) {
if ( typeof w.ping.hostnames === 'undefined' ) { if ( typeof w.ping.hostnames === 'undefined' ) {
w.ping.hostnames = {}; w.ping.hostnames = {};
} }
@ -300,14 +300,28 @@ var wappalyzer = (function() {
// Additional information // Additional information
if ( typeof w.ping.hostnames !== 'undefined' && typeof w.ping.hostnames[hostname] !== 'undefined' ) { if ( typeof w.ping.hostnames !== 'undefined' && typeof w.ping.hostnames[hostname] !== 'undefined' ) {
if ( data.html != null ) { if ( data.html != null ) {
match = data.html.match(/<html[^>]*[: ]lang="([^"]+)"/); match = data.html.match(/<html[^>]*[: ]lang="([a-z]{2}((-|_)[A-Z]{2})?)"/i);
if ( match != null && match.length ) { if ( match != null && match.length ) {
w.ping.hostnames[hostname].meta['language'] = match[1]; w.ping.hostnames[hostname].meta['language'] = match[1];
} }
regexMeta = /<meta[^>]+>/ig;
while ( match = regexMeta.exec(data.html) ) {
if ( !match.length ) { continue; }
match = match[0].match(/name="(author|copyright|country|description|keywords)"[^>]*content="([^"]+)"/i);
if ( match && match.length === 3 ) {
w.ping.hostnames[hostname].meta[match[1]] = match[2];
}
} }
} }
w.log(hostname + ': ' + JSON.stringify(w.ping.hostnames[hostname]));
}
if ( w.ping.hostnames != null && Object.keys(w.ping.hostnames).length >= 50 ) { driver('ping'); } if ( w.ping.hostnames != null && Object.keys(w.ping.hostnames).length >= 50 ) { driver('ping'); }
apps = null; apps = null;

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

@ -323,7 +323,7 @@
"implies": [ "node.js" ] "implies": [ "node.js" ]
}, },
"Contao": { "Contao": {
"cats": [ 1, 6 ], "cats": [ 1 ],
"html": "(<!--\\s+This website is powered by (TYPOlight|Contao)|<link[^>]+(typolight|contao).css)", "html": "(<!--\\s+This website is powered by (TYPOlight|Contao)|<link[^>]+(typolight|contao).css)",
"implies": [ "PHP" ] "implies": [ "PHP" ]
}, },

@ -66,7 +66,7 @@ var wappalyzer = (function() {
// Checks // Checks
if ( w.driver == null ) { if ( w.driver == null ) {
w.log('no driver, exiting'); w.log('no driver, exiting');
G
return; return;
} }
@ -180,7 +180,7 @@ var wappalyzer = (function() {
profiler.regexCount ++; profiler.regexCount ++;
regexMeta = new RegExp('<meta[^>]+>', 'ig'); regexMeta = /<meta[^>]+>/ig;
while ( match = regexMeta.exec(data.html) ) { while ( match = regexMeta.exec(data.html) ) {
for ( meta in w.apps[app][type] ) { for ( meta in w.apps[app][type] ) {
@ -271,13 +271,13 @@ var wappalyzer = (function() {
w.log(apps.length + ' apps detected: ' + apps.join(', ') + ' on ' + url); w.log(apps.length + ' apps detected: ' + apps.join(', ') + ' on ' + url);
// Keep history of detected apps // Keep history of detected apps
var i, app, match; var i, app, regex, regexMeta, match;
for ( i in apps ) { for ( i in apps ) {
app = apps[i]; app = apps[i];
// Per hostname // Per hostname
if ( /^[a-z0-9._\-]+\.[a-z]+/.test(hostname) && !/(dev\.|\/admin|\.local)/.test(url) ) { if ( /^[a-z0-9._\-]+\.[a-z]+/.test(hostname) && !/((local|dev|development|stage|staging|test|testing|demo|admin)\.|\/admin|\.local)/.test(url) ) {
if ( typeof w.ping.hostnames === 'undefined' ) { if ( typeof w.ping.hostnames === 'undefined' ) {
w.ping.hostnames = {}; w.ping.hostnames = {};
} }
@ -300,14 +300,28 @@ var wappalyzer = (function() {
// Additional information // Additional information
if ( typeof w.ping.hostnames !== 'undefined' && typeof w.ping.hostnames[hostname] !== 'undefined' ) { if ( typeof w.ping.hostnames !== 'undefined' && typeof w.ping.hostnames[hostname] !== 'undefined' ) {
if ( data.html != null ) { if ( data.html != null ) {
match = data.html.match(/<html[^>]*[: ]lang="([^"]+)"/); match = data.html.match(/<html[^>]*[: ]lang="([a-z]{2}((-|_)[A-Z]{2})?)"/i);
if ( match != null && match.length ) { if ( match != null && match.length ) {
w.ping.hostnames[hostname].meta['language'] = match[1]; w.ping.hostnames[hostname].meta['language'] = match[1];
} }
regexMeta = /<meta[^>]+>/ig;
while ( match = regexMeta.exec(data.html) ) {
if ( !match.length ) { continue; }
match = match[0].match(/name="(author|copyright|country|description|keywords)"[^>]*content="([^"]+)"/i);
if ( match && match.length === 3 ) {
w.ping.hostnames[hostname].meta[match[1]] = match[2];
}
} }
} }
w.log(hostname + ': ' + JSON.stringify(w.ping.hostnames[hostname]));
}
if ( w.ping.hostnames != null && Object.keys(w.ping.hostnames).length >= 50 ) { driver('ping'); } if ( w.ping.hostnames != null && Object.keys(w.ping.hostnames).length >= 50 ) { driver('ping'); }
apps = null; apps = null;

@ -323,7 +323,7 @@
"implies": [ "node.js" ] "implies": [ "node.js" ]
}, },
"Contao": { "Contao": {
"cats": [ 1, 6 ], "cats": [ 1 ],
"html": "(<!--\\s+This website is powered by (TYPOlight|Contao)|<link[^>]+(typolight|contao).css)", "html": "(<!--\\s+This website is powered by (TYPOlight|Contao)|<link[^>]+(typolight|contao).css)",
"implies": [ "PHP" ] "implies": [ "PHP" ]
}, },

@ -66,7 +66,7 @@ var wappalyzer = (function() {
// Checks // Checks
if ( w.driver == null ) { if ( w.driver == null ) {
w.log('no driver, exiting'); w.log('no driver, exiting');
G
return; return;
} }
@ -180,7 +180,7 @@ var wappalyzer = (function() {
profiler.regexCount ++; profiler.regexCount ++;
regexMeta = new RegExp('<meta[^>]+>', 'ig'); regexMeta = /<meta[^>]+>/ig;
while ( match = regexMeta.exec(data.html) ) { while ( match = regexMeta.exec(data.html) ) {
for ( meta in w.apps[app][type] ) { for ( meta in w.apps[app][type] ) {
@ -271,13 +271,13 @@ var wappalyzer = (function() {
w.log(apps.length + ' apps detected: ' + apps.join(', ') + ' on ' + url); w.log(apps.length + ' apps detected: ' + apps.join(', ') + ' on ' + url);
// Keep history of detected apps // Keep history of detected apps
var i, app, match; var i, app, regex, regexMeta, match;
for ( i in apps ) { for ( i in apps ) {
app = apps[i]; app = apps[i];
// Per hostname // Per hostname
if ( /^[a-z0-9._\-]+\.[a-z]+/.test(hostname) && !/(dev\.|\/admin|\.local)/.test(url) ) { if ( /^[a-z0-9._\-]+\.[a-z]+/.test(hostname) && !/((local|dev|development|stage|staging|test|testing|demo|admin)\.|\/admin|\.local)/.test(url) ) {
if ( typeof w.ping.hostnames === 'undefined' ) { if ( typeof w.ping.hostnames === 'undefined' ) {
w.ping.hostnames = {}; w.ping.hostnames = {};
} }
@ -300,14 +300,28 @@ var wappalyzer = (function() {
// Additional information // Additional information
if ( typeof w.ping.hostnames !== 'undefined' && typeof w.ping.hostnames[hostname] !== 'undefined' ) { if ( typeof w.ping.hostnames !== 'undefined' && typeof w.ping.hostnames[hostname] !== 'undefined' ) {
if ( data.html != null ) { if ( data.html != null ) {
match = data.html.match(/<html[^>]*[: ]lang="([^"]+)"/); match = data.html.match(/<html[^>]*[: ]lang="([a-z]{2}((-|_)[A-Z]{2})?)"/i);
if ( match != null && match.length ) { if ( match != null && match.length ) {
w.ping.hostnames[hostname].meta['language'] = match[1]; w.ping.hostnames[hostname].meta['language'] = match[1];
} }
regexMeta = /<meta[^>]+>/ig;
while ( match = regexMeta.exec(data.html) ) {
if ( !match.length ) { continue; }
match = match[0].match(/name="(author|copyright|country|description|keywords)"[^>]*content="([^"]+)"/i);
if ( match && match.length === 3 ) {
w.ping.hostnames[hostname].meta[match[1]] = match[2];
}
} }
} }
w.log(hostname + ': ' + JSON.stringify(w.ping.hostnames[hostname]));
}
if ( w.ping.hostnames != null && Object.keys(w.ping.hostnames).length >= 50 ) { driver('ping'); } if ( w.ping.hostnames != null && Object.keys(w.ping.hostnames).length >= 50 ) { driver('ping'); }
apps = null; apps = null;

@ -1,7 +1,6 @@
#!/bin/sh #!/bin/sh
ln -f share/images/icons/* drivers/firefox/skin/images/icons ln -f share/images/icons/* drivers/firefox/skin/images/icons
ln -f share/js/lib/jquery.min.js drivers/firefox/content/js/lib
ln -f share/apps.json drivers/firefox/content ln -f share/apps.json drivers/firefox/content
ln -f share/js/wappalyzer.js drivers/firefox/content/js ln -f share/js/wappalyzer.js drivers/firefox/content/js
@ -10,7 +9,6 @@ ln -f share/apps.json drivers/firefox-jetpack/data
ln -f share/js/wappalyzer.js drivers/firefox-jetpack/lib ln -f share/js/wappalyzer.js drivers/firefox-jetpack/lib
ln -f share/images/icons/* drivers/chrome/images/icons ln -f share/images/icons/* drivers/chrome/images/icons
ln -f share/js/lib/jquery.min.js drivers/chrome/js/lib
ln -f share/apps.json drivers/chrome ln -f share/apps.json drivers/chrome
ln -f share/js/wappalyzer.js drivers/chrome/js ln -f share/js/wappalyzer.js drivers/chrome/js

@ -323,7 +323,7 @@
"implies": [ "node.js" ] "implies": [ "node.js" ]
}, },
"Contao": { "Contao": {
"cats": [ 1, 6 ], "cats": [ 1 ],
"html": "(<!--\\s+This website is powered by (TYPOlight|Contao)|<link[^>]+(typolight|contao).css)", "html": "(<!--\\s+This website is powered by (TYPOlight|Contao)|<link[^>]+(typolight|contao).css)",
"implies": [ "PHP" ] "implies": [ "PHP" ]
}, },

@ -66,7 +66,7 @@ var wappalyzer = (function() {
// Checks // Checks
if ( w.driver == null ) { if ( w.driver == null ) {
w.log('no driver, exiting'); w.log('no driver, exiting');
G
return; return;
} }
@ -180,7 +180,7 @@ var wappalyzer = (function() {
profiler.regexCount ++; profiler.regexCount ++;
regexMeta = new RegExp('<meta[^>]+>', 'ig'); regexMeta = /<meta[^>]+>/ig;
while ( match = regexMeta.exec(data.html) ) { while ( match = regexMeta.exec(data.html) ) {
for ( meta in w.apps[app][type] ) { for ( meta in w.apps[app][type] ) {
@ -271,13 +271,13 @@ var wappalyzer = (function() {
w.log(apps.length + ' apps detected: ' + apps.join(', ') + ' on ' + url); w.log(apps.length + ' apps detected: ' + apps.join(', ') + ' on ' + url);
// Keep history of detected apps // Keep history of detected apps
var i, app, match; var i, app, regex, regexMeta, match;
for ( i in apps ) { for ( i in apps ) {
app = apps[i]; app = apps[i];
// Per hostname // Per hostname
if ( /^[a-z0-9._\-]+\.[a-z]+/.test(hostname) && !/(dev\.|\/admin|\.local)/.test(url) ) { if ( /^[a-z0-9._\-]+\.[a-z]+/.test(hostname) && !/((local|dev|development|stage|staging|test|testing|demo|admin)\.|\/admin|\.local)/.test(url) ) {
if ( typeof w.ping.hostnames === 'undefined' ) { if ( typeof w.ping.hostnames === 'undefined' ) {
w.ping.hostnames = {}; w.ping.hostnames = {};
} }
@ -300,14 +300,28 @@ var wappalyzer = (function() {
// Additional information // Additional information
if ( typeof w.ping.hostnames !== 'undefined' && typeof w.ping.hostnames[hostname] !== 'undefined' ) { if ( typeof w.ping.hostnames !== 'undefined' && typeof w.ping.hostnames[hostname] !== 'undefined' ) {
if ( data.html != null ) { if ( data.html != null ) {
match = data.html.match(/<html[^>]*[: ]lang="([^"]+)"/); match = data.html.match(/<html[^>]*[: ]lang="([a-z]{2}((-|_)[A-Z]{2})?)"/i);
if ( match != null && match.length ) { if ( match != null && match.length ) {
w.ping.hostnames[hostname].meta['language'] = match[1]; w.ping.hostnames[hostname].meta['language'] = match[1];
} }
regexMeta = /<meta[^>]+>/ig;
while ( match = regexMeta.exec(data.html) ) {
if ( !match.length ) { continue; }
match = match[0].match(/name="(author|copyright|country|description|keywords)"[^>]*content="([^"]+)"/i);
if ( match && match.length === 3 ) {
w.ping.hostnames[hostname].meta[match[1]] = match[2];
}
} }
} }
w.log(hostname + ': ' + JSON.stringify(w.ping.hostnames[hostname]));
}
if ( w.ping.hostnames != null && Object.keys(w.ping.hostnames).length >= 50 ) { driver('ping'); } if ( w.ping.hostnames != null && Object.keys(w.ping.hostnames).length >= 50 ) { driver('ping'); }
apps = null; apps = null;

Loading…
Cancel
Save