Skip to content

Commit 7e2fc14

Browse files
committed
Add updated versions of firefox.
1 parent 54af292 commit 7e2fc14

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

lib/rex/exploitation/javascriptosdetect.js

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,34 @@ window.os_detect.getVersion = function(){
192192
ua_name = clients_ff;
193193
// Thanks to developer.mozilla.org "Firefox for developers" series for most
194194
// of these.
195-
if ('mozConnection' in navigator) {
195+
// Release changelogs: http://www.mozilla.org/en-US/firefox/releases/
196+
if ('HTMLTimeElement' in window) {
197+
ua_version = '22.0'
198+
} else if ('createElement' in document &&
199+
document.createElement('main') &&
200+
document.createElement('main').constructor === window['HTMLElement']) {
201+
ua_version = '21.0'
202+
} else if ('imul' in Math) {
203+
ua_version = '20.0'
204+
} else if ('HTMLCanvasElement' in window &&
205+
'toBlob' in HTMLCanvasElement.prototype) {
206+
ua_version = '19.0'
207+
} else if ('devicePixelRatio' in window) {
208+
ua_version = '18.0'
209+
} else if ('HTMLIFrameElement' in window &&
210+
'sandbox' in HTMLIFrameElement.prototype) {
211+
ua_version = '17.0'
212+
} else if ('CSS2Properties' in window &&
213+
'animation' in CSS2Properties.prototype) {
214+
ua_version = '16.0'
215+
} else if ('HTMLSourceElement' in window &&
216+
'media' in HTMLSourceElement.prototype) {
217+
ua_version = '15.0'
218+
} else if ('mozRequestPointerLock' in document.body) {
219+
ua_version = '14.0'
220+
} else if ('Map' in window) {
221+
ua_version = "13.0"
222+
} else if ('mozConnection' in navigator) {
196223
ua_version = "12.0";
197224
} else if ('mozVibrate' in navigator) {
198225
ua_version = "11.0";

0 commit comments

Comments
 (0)