Added Ruby on Rails, made env detection more robust in FF driver

main
ElbertF 12 years ago
parent ae8c3d321f
commit 2624d331eb

@ -106,6 +106,8 @@
headers: { 'Server': /(Apache($|[^-])|HTTPD)/i } },
'Apache JSPWiki': {
cats: [ 8 ],
url: /wiki\.jsp/,
script: /jspwiki/,
html: /<html[^>]* xmlns:jspwiki=/i
},
'Apache Tomcat': {
@ -902,7 +904,8 @@
},
'Mixpanel': {
cats: [ 10 ],
script: /api\.mixpanel\.com\/track/
script: /api\.mixpanel\.com\/track/,
env: /^Mixpanel/
},
'MochiKit': {
cats: [ 12 ],
@ -1232,8 +1235,14 @@
},
'Ruby': {
cats: [ 27 ],
headers: { 'Server': /(Mongrel|WEBrick|Ruby|mod_rails|mod_rack|Phusion.Passenger)/i, 'X-Powered-By': /(mod_rails|mod_rack|Phusion.Passenger)/i },
meta: { 'csrf-param': /authenticity_token /i }
headers: { 'Server': /(Mongrel|WEBrick|Ruby)/i }
},
'Ruby on Rails': {
cats: [ 18 ],
script: /\/assets\/application\-[a-z0-9]{32}\/\.js/,
meta: { 'csrf-param': /authenticity_token/ },
headers: { 'Server': /(mod_rails|mod_rack|Phusion.Passenger)/i, 'X-Powered-By': /(mod_rails|mod_rack|Phusion.Passenger)/i },
implies: [ 'Ruby' ]
},
'S.Builder': {
cats: [ 1 ],

@ -141,7 +141,7 @@ var wappalyzer = wappalyzer || (function() {
if ( new RegExp('name=["\']' + meta + '["\']', 'i').test(match) ) {
content = match.toString().match(/content=("|')([^"']+)("|')/i);
if ( content && w.apps[app].meta[meta].test(content[2]) ) {
if ( content && content.length == 4 && w.apps[app].meta[meta].test(content[2]) ) {
apps.push(app);
break;

@ -106,6 +106,8 @@
headers: { 'Server': /(Apache($|[^-])|HTTPD)/i } },
'Apache JSPWiki': {
cats: [ 8 ],
url: /wiki\.jsp/,
script: /jspwiki/,
html: /<html[^>]* xmlns:jspwiki=/i
},
'Apache Tomcat': {
@ -902,7 +904,8 @@
},
'Mixpanel': {
cats: [ 10 ],
script: /api\.mixpanel\.com\/track/
script: /api\.mixpanel\.com\/track/,
env: /^Mixpanel/
},
'MochiKit': {
cats: [ 12 ],
@ -1232,8 +1235,14 @@
},
'Ruby': {
cats: [ 27 ],
headers: { 'Server': /(Mongrel|WEBrick|Ruby|mod_rails|mod_rack|Phusion.Passenger)/i, 'X-Powered-By': /(mod_rails|mod_rack|Phusion.Passenger)/i },
meta: { 'csrf-param': /authenticity_token /i }
headers: { 'Server': /(Mongrel|WEBrick|Ruby)/i }
},
'Ruby on Rails': {
cats: [ 18 ],
script: /\/assets\/application\-[a-z0-9]{32}\/\.js/,
meta: { 'csrf-param': /authenticity_token/ },
headers: { 'Server': /(mod_rails|mod_rack|Phusion.Passenger)/i, 'X-Powered-By': /(mod_rails|mod_rack|Phusion.Passenger)/i },
implies: [ 'Ruby' ]
},
'S.Builder': {
cats: [ 1 ],

@ -141,7 +141,7 @@ var wappalyzer = wappalyzer || (function() {
if ( new RegExp('name=["\']' + meta + '["\']', 'i').test(match) ) {
content = match.toString().match(/content=("|')([^"']+)("|')/i);
if ( content && w.apps[app].meta[meta].test(content[2]) ) {
if ( content && content.length == 4 && w.apps[app].meta[meta].test(content[2]) ) {
apps.push(app);
break;

@ -106,6 +106,8 @@
headers: { 'Server': /(Apache($|[^-])|HTTPD)/i } },
'Apache JSPWiki': {
cats: [ 8 ],
url: /wiki\.jsp/,
script: /jspwiki/,
html: /<html[^>]* xmlns:jspwiki=/i
},
'Apache Tomcat': {
@ -902,7 +904,8 @@
},
'Mixpanel': {
cats: [ 10 ],
script: /api\.mixpanel\.com\/track/
script: /api\.mixpanel\.com\/track/,
env: /^Mixpanel/
},
'MochiKit': {
cats: [ 12 ],
@ -1232,8 +1235,14 @@
},
'Ruby': {
cats: [ 27 ],
headers: { 'Server': /(Mongrel|WEBrick|Ruby|mod_rails|mod_rack|Phusion.Passenger)/i, 'X-Powered-By': /(mod_rails|mod_rack|Phusion.Passenger)/i },
meta: { 'csrf-param': /authenticity_token /i }
headers: { 'Server': /(Mongrel|WEBrick|Ruby)/i }
},
'Ruby on Rails': {
cats: [ 18 ],
script: /\/assets\/application\-[a-z0-9]{32}\/\.js/,
meta: { 'csrf-param': /authenticity_token/ },
headers: { 'Server': /(mod_rails|mod_rack|Phusion.Passenger)/i, 'X-Powered-By': /(mod_rails|mod_rack|Phusion.Passenger)/i },
implies: [ 'Ruby' ]
},
'S.Builder': {
cats: [ 1 ],

@ -1,11 +1,21 @@
"use strict";
(function() {
addEventListener('DOMContentLoaded', onLoad, false);
addEventListener('DOMContentLoaded', function() {
removeEventListener('DOMContentLoaded', onLoad, false);
onLoad();
}, false);
function onLoad() {
if ( content.document.contentType != 'text/html' ) { return };
content.document.documentElement.addEventListener('load', function() {
sendAsyncMessage('wappalyzer', { env: Object.keys(content.wrappedJSObject) });
removeEventListener('load', onLoad, false);
}, true);
// HTML
var html = content.document.documentElement.outerHTML;
@ -24,7 +34,5 @@
env: Object.keys(content.wrappedJSObject),
url: content.location.href
});
removeEventListener('DOMContentLoaded', onLoad, false);
}
})();

@ -141,7 +141,7 @@ var wappalyzer = wappalyzer || (function() {
if ( new RegExp('name=["\']' + meta + '["\']', 'i').test(match) ) {
content = match.toString().match(/content=("|')([^"']+)("|')/i);
if ( content && w.apps[app].meta[meta].test(content[2]) ) {
if ( content && content.length == 4 && w.apps[app].meta[meta].test(content[2]) ) {
apps.push(app);
break;

@ -106,6 +106,8 @@
headers: { 'Server': /(Apache($|[^-])|HTTPD)/i } },
'Apache JSPWiki': {
cats: [ 8 ],
url: /wiki\.jsp/,
script: /jspwiki/,
html: /<html[^>]* xmlns:jspwiki=/i
},
'Apache Tomcat': {
@ -902,7 +904,8 @@
},
'Mixpanel': {
cats: [ 10 ],
script: /api\.mixpanel\.com\/track/
script: /api\.mixpanel\.com\/track/,
env: /^Mixpanel/
},
'MochiKit': {
cats: [ 12 ],
@ -1232,8 +1235,14 @@
},
'Ruby': {
cats: [ 27 ],
headers: { 'Server': /(Mongrel|WEBrick|Ruby|mod_rails|mod_rack|Phusion.Passenger)/i, 'X-Powered-By': /(mod_rails|mod_rack|Phusion.Passenger)/i },
meta: { 'csrf-param': /authenticity_token /i }
headers: { 'Server': /(Mongrel|WEBrick|Ruby)/i }
},
'Ruby on Rails': {
cats: [ 18 ],
script: /\/assets\/application\-[a-z0-9]{32}\/\.js/,
meta: { 'csrf-param': /authenticity_token/ },
headers: { 'Server': /(mod_rails|mod_rack|Phusion.Passenger)/i, 'X-Powered-By': /(mod_rails|mod_rack|Phusion.Passenger)/i },
implies: [ 'Ruby' ]
},
'S.Builder': {
cats: [ 1 ],

@ -141,7 +141,7 @@ var wappalyzer = wappalyzer || (function() {
if ( new RegExp('name=["\']' + meta + '["\']', 'i').test(match) ) {
content = match.toString().match(/content=("|')([^"']+)("|')/i);
if ( content && w.apps[app].meta[meta].test(content[2]) ) {
if ( content && content.length == 4 && w.apps[app].meta[meta].test(content[2]) ) {
apps.push(app);
break;

@ -106,6 +106,8 @@
headers: { 'Server': /(Apache($|[^-])|HTTPD)/i } },
'Apache JSPWiki': {
cats: [ 8 ],
url: /wiki\.jsp/,
script: /jspwiki/,
html: /<html[^>]* xmlns:jspwiki=/i
},
'Apache Tomcat': {
@ -902,7 +904,8 @@
},
'Mixpanel': {
cats: [ 10 ],
script: /api\.mixpanel\.com\/track/
script: /api\.mixpanel\.com\/track/,
env: /^Mixpanel/
},
'MochiKit': {
cats: [ 12 ],
@ -1232,8 +1235,14 @@
},
'Ruby': {
cats: [ 27 ],
headers: { 'Server': /(Mongrel|WEBrick|Ruby|mod_rails|mod_rack|Phusion.Passenger)/i, 'X-Powered-By': /(mod_rails|mod_rack|Phusion.Passenger)/i },
meta: { 'csrf-param': /authenticity_token /i }
headers: { 'Server': /(Mongrel|WEBrick|Ruby)/i }
},
'Ruby on Rails': {
cats: [ 18 ],
script: /\/assets\/application\-[a-z0-9]{32}\/\.js/,
meta: { 'csrf-param': /authenticity_token/ },
headers: { 'Server': /(mod_rails|mod_rack|Phusion.Passenger)/i, 'X-Powered-By': /(mod_rails|mod_rack|Phusion.Passenger)/i },
implies: [ 'Ruby' ]
},
'S.Builder': {
cats: [ 1 ],

@ -141,7 +141,7 @@ var wappalyzer = wappalyzer || (function() {
if ( new RegExp('name=["\']' + meta + '["\']', 'i').test(match) ) {
content = match.toString().match(/content=("|')([^"']+)("|')/i);
if ( content && w.apps[app].meta[meta].test(content[2]) ) {
if ( content && content.length == 4 && w.apps[app].meta[meta].test(content[2]) ) {
apps.push(app);
break;