diff --git a/core/main/client/os.js b/core/main/client/os.js index 0318645d0..7d153db26 100644 --- a/core/main/client/os.js +++ b/core/main/client/os.js @@ -81,6 +81,14 @@ beef.os = { return (this.ua.indexOf('iPad') != -1) ? true : false; }, + isNokia: function() { + return (this.ua.match('(Maemo Browser)|(Symbian)|(Nokia)')) ? true : false; + }, + + isBlackBerry: function() { + return (this.ua.indexOf('BlackBerry')) ? true : false; + }, + isQNX: function() { return (this.ua.indexOf('QNX')) ? true : false; }, @@ -102,7 +110,20 @@ beef.os = { if(this.isWinServer2003()) return 'Windows Server 2003'; if(this.isWinVista()) return 'Windows Vista'; if(this.isWin7()) return 'Windows 7'; - + + //Nokia + if(this.isNokia()) { + + if (this.ua.indexOf('Maemo Browser') != -1) return 'Maemo'; + if (this.ua.match('(SymbianOS)|(Symbian OS)')) return 'SymbianOS'; + if (this.ua.indexOf('Symbian') != -1) return 'Symbian'; + + //return 'Nokia'; + } + + // BlackBerry + if(this.isBlackBerry()) return 'BlackBerry OS'; + //linux if(this.isLinux()) return 'Linux'; if(this.isSunOS()) return 'Sun OS'; diff --git a/core/main/constants/os.rb b/core/main/constants/os.rb index 5754c2ac1..ed97f9d4a 100644 --- a/core/main/constants/os.rb +++ b/core/main/constants/os.rb @@ -29,6 +29,8 @@ module Constants OS_MAC_IMG = 'mac.png' OS_IPHONE_UA_STR = 'iPhone' OS_IPHONE_IMG = 'iphone.png' + OS_BLACKBERRY_UA_STR = 'BlackBerry' + OS_BLACKBERRY_IMG = 'blackberry.png' OS_ALL_UA_STR = 'All' def self.match_os(name) @@ -41,6 +43,8 @@ module Constants OS_MAC_UA_STR when /iphone/ OS_IPHONE_UA_STR + when /blackberry/ + OS_BLACKBERRY_UA_STR else 'ALL' end diff --git a/extensions/admin_ui/media/images/icons/blackberry.png b/extensions/admin_ui/media/images/icons/blackberry.png new file mode 100644 index 000000000..17c8de669 Binary files /dev/null and b/extensions/admin_ui/media/images/icons/blackberry.png differ diff --git a/extensions/initialization/models/browserdetails.rb b/extensions/initialization/models/browserdetails.rb index 24d5a8aa9..c107e5ed9 100644 --- a/extensions/initialization/models/browserdetails.rb +++ b/extensions/initialization/models/browserdetails.rb @@ -104,6 +104,7 @@ module Models return BeEF::Core::Constants::Os::OS_LINUX_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_LINUX_UA_STR return BeEF::Core::Constants::Os::OS_IPHONE_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_IPHONE_UA_STR return BeEF::Core::Constants::Os::OS_MAC_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_MAC_UA_STR + return BeEF::Core::Constants::Os::OS_BLACKBERRY_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_BLACKBERRY_UA_STR BeEF::Core::Constants::Os::OS_UNKNOWN_IMG end @@ -113,4 +114,4 @@ module Models end end end -end \ No newline at end of file +end