diff --git a/drivers/bookmarklet/js/apps.js b/drivers/bookmarklet/js/apps.js index 0bbaae11a..8f05cdc43 100644 --- a/drivers/bookmarklet/js/apps.js +++ b/drivers/bookmarklet/js/apps.js @@ -106,6 +106,8 @@ headers: { 'Server': /(Apache($|[^-])|HTTPD)/i } }, 'Apache JSPWiki': { cats: [ 8 ], + url: /wiki\.jsp/, + script: /jspwiki/, 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 ], diff --git a/drivers/bookmarklet/js/wappalyzer.js b/drivers/bookmarklet/js/wappalyzer.js index 36ca60f96..bd396bf2b 100644 --- a/drivers/bookmarklet/js/wappalyzer.js +++ b/drivers/bookmarklet/js/wappalyzer.js @@ -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; diff --git a/drivers/chrome/js/apps.js b/drivers/chrome/js/apps.js index 0bbaae11a..8f05cdc43 100644 --- a/drivers/chrome/js/apps.js +++ b/drivers/chrome/js/apps.js @@ -106,6 +106,8 @@ headers: { 'Server': /(Apache($|[^-])|HTTPD)/i } }, 'Apache JSPWiki': { cats: [ 8 ], + url: /wiki\.jsp/, + script: /jspwiki/, 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 ], diff --git a/drivers/chrome/js/wappalyzer.js b/drivers/chrome/js/wappalyzer.js index 36ca60f96..bd396bf2b 100644 --- a/drivers/chrome/js/wappalyzer.js +++ b/drivers/chrome/js/wappalyzer.js @@ -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; diff --git a/drivers/firefox/content/js/apps.js b/drivers/firefox/content/js/apps.js index 0bbaae11a..8f05cdc43 100644 --- a/drivers/firefox/content/js/apps.js +++ b/drivers/firefox/content/js/apps.js @@ -106,6 +106,8 @@ headers: { 'Server': /(Apache($|[^-])|HTTPD)/i } }, 'Apache JSPWiki': { cats: [ 8 ], + url: /wiki\.jsp/, + script: /jspwiki/, 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 ], diff --git a/drivers/firefox/content/js/content.js b/drivers/firefox/content/js/content.js index b0028090e..b01099da7 100644 --- a/drivers/firefox/content/js/content.js +++ b/drivers/firefox/content/js/content.js @@ -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); } })(); diff --git a/drivers/firefox/content/js/wappalyzer.js b/drivers/firefox/content/js/wappalyzer.js index 36ca60f96..bd396bf2b 100644 --- a/drivers/firefox/content/js/wappalyzer.js +++ b/drivers/firefox/content/js/wappalyzer.js @@ -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; diff --git a/drivers/html/js/apps.js b/drivers/html/js/apps.js index 0bbaae11a..8f05cdc43 100644 --- a/drivers/html/js/apps.js +++ b/drivers/html/js/apps.js @@ -106,6 +106,8 @@ headers: { 'Server': /(Apache($|[^-])|HTTPD)/i } }, 'Apache JSPWiki': { cats: [ 8 ], + url: /wiki\.jsp/, + script: /jspwiki/, 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 ], diff --git a/drivers/html/js/wappalyzer.js b/drivers/html/js/wappalyzer.js index 36ca60f96..bd396bf2b 100644 --- a/drivers/html/js/wappalyzer.js +++ b/drivers/html/js/wappalyzer.js @@ -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; diff --git a/share/js/apps.js b/share/js/apps.js index 0bbaae11a..8f05cdc43 100644 --- a/share/js/apps.js +++ b/share/js/apps.js @@ -106,6 +106,8 @@ headers: { 'Server': /(Apache($|[^-])|HTTPD)/i } }, 'Apache JSPWiki': { cats: [ 8 ], + url: /wiki\.jsp/, + script: /jspwiki/, 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 ], diff --git a/share/js/wappalyzer.js b/share/js/wappalyzer.js index 36ca60f96..bd396bf2b 100644 --- a/share/js/wappalyzer.js +++ b/share/js/wappalyzer.js @@ -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;