diff --git a/core/main/client/os.js b/core/main/client/os.js index 7d153db26..90c39f58c 100644 --- a/core/main/client/os.js +++ b/core/main/client/os.js @@ -85,6 +85,10 @@ beef.os = { return (this.ua.match('(Maemo Browser)|(Symbian)|(Nokia)')) ? true : false; }, + isAndroid: function() { + return (this.ua.indexOf('Android')) ? true : false; + }, + isBlackBerry: function() { return (this.ua.indexOf('BlackBerry')) ? true : false; }, @@ -124,6 +128,9 @@ beef.os = { // BlackBerry if(this.isBlackBerry()) return 'BlackBerry OS'; + // Android + if(this.isAndroid()) return 'Android'; + //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 ed97f9d4a..2014de11d 100644 --- a/core/main/constants/os.rb +++ b/core/main/constants/os.rb @@ -31,6 +31,8 @@ module Constants OS_IPHONE_IMG = 'iphone.png' OS_BLACKBERRY_UA_STR = 'BlackBerry' OS_BLACKBERRY_IMG = 'blackberry.png' + OS_ANDROID_UA_STR = 'Android' + OS_ANDROID_IMG = 'android.png' OS_ALL_UA_STR = 'All' def self.match_os(name) @@ -45,6 +47,8 @@ module Constants OS_IPHONE_UA_STR when /blackberry/ OS_BLACKBERRY_UA_STR + when /android/ + OS_ANDROID_UA_STR else 'ALL' end diff --git a/extensions/admin_ui/media/images/icons/android.png b/extensions/admin_ui/media/images/icons/android.png new file mode 100644 index 000000000..0c773b558 Binary files /dev/null and b/extensions/admin_ui/media/images/icons/android.png differ diff --git a/extensions/initialization/models/browserdetails.rb b/extensions/initialization/models/browserdetails.rb index c107e5ed9..88a91cbbd 100644 --- a/extensions/initialization/models/browserdetails.rb +++ b/extensions/initialization/models/browserdetails.rb @@ -105,6 +105,7 @@ module Models 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 + return BeEF::Core::Constants::Os::OS_ANDROID_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_ANDROID_UA_STR BeEF::Core::Constants::Os::OS_UNKNOWN_IMG end