From 488ed5bd4abc73af58ec2ae5da808f3632562321 Mon Sep 17 00:00:00 2001 From: joev Date: Mon, 14 Oct 2013 13:41:26 -0500 Subject: [PATCH] Add new feature detection logic for FF 23 and 24. --- lib/rex/exploitation/javascriptosdetect.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/rex/exploitation/javascriptosdetect.js b/lib/rex/exploitation/javascriptosdetect.js index eabe23c33a..a83aa8207c 100644 --- a/lib/rex/exploitation/javascriptosdetect.js +++ b/lib/rex/exploitation/javascriptosdetect.js @@ -52,6 +52,12 @@ window.os_detect.getVersion = function(){ return d.style[propCamelCase] === css; } + var input_type_is_valid = function(input_type) { + var input = document.createElement('input'); + input.setAttribute('type', input_type); + return input.type == input_type; + } + //-- // Client //-- @@ -203,7 +209,12 @@ window.os_detect.getVersion = function(){ // Thanks to developer.mozilla.org "Firefox for developers" series for most // of these. // Release changelogs: http://www.mozilla.org/en-US/firefox/releases/ - if ('HTMLTimeElement' in window) { + if ('DeviceStorage' in window && 'default' in window.DeviceStorage) { + // https://bugzilla.mozilla.org/show_bug.cgi?id=874213 + ua_version = '24.0' + } else if (input_type_is_valid('range')) { + ua_version = '23.0' + } else if ('HTMLTimeElement' in window) { ua_version = '22.0' } else if ('createElement' in document && document.createElement('main') &&