From 0f0a4d90b3f6e6354dad66a1c5d55e25bd79f72b Mon Sep 17 00:00:00 2001 From: Brendan Coles Date: Wed, 16 Dec 2015 15:15:38 +0000 Subject: [PATCH] Add SunOS detection --- core/main/client/os.js | 4 +++- core/main/constants/os.rb | 4 ++++ core/main/models/browserdetails.rb | 1 + extensions/admin_ui/media/images/icons/sunos.gif | Bin 0 -> 1477 bytes 4 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 extensions/admin_ui/media/images/icons/sunos.gif diff --git a/core/main/client/os.js b/core/main/client/os.js index ce25654de..fb89ab30e 100644 --- a/core/main/client/os.js +++ b/core/main/client/os.js @@ -182,9 +182,11 @@ beef.os = { // Android if(this.isAndroid()) return 'Android'; + // SunOS + if(this.isSunOS()) return 'SunOS'; + //Linux if(this.isLinux()) return 'Linux'; - if(this.isSunOS()) return 'Sun OS'; //iPhone if (this.isIphone()) return 'iOS'; diff --git a/core/main/constants/os.rb b/core/main/constants/os.rb index 86e900a8e..4f53a6321 100644 --- a/core/main/constants/os.rb +++ b/core/main/constants/os.rb @@ -20,6 +20,8 @@ module BeEF OS_MAC_IMG = 'mac.png' OS_QNX_UA_STR = 'QNX' OS_QNX_IMG = 'qnx.ico' + OS_SUNOS_UA_STR = 'SunOS' + OS_SUNOS_IMG = 'sunos.gif' OS_BEOS_UA_STR = 'BeOS' OS_BEOS_IMG = 'beos.png' OS_OPENBSD_UA_STR = 'OpenBSD' @@ -54,6 +56,8 @@ module BeEF OS_MAC_UA_STR when /qnx/ OS_QNX_UA_STR + when /sun/ + OS_SUNOS_UA_STR when /beos/ OS_BEOS_UA_STR when /openbsd/ diff --git a/core/main/models/browserdetails.rb b/core/main/models/browserdetails.rb index 790d64564..3ffeedcc4 100644 --- a/core/main/models/browserdetails.rb +++ b/core/main/models/browserdetails.rb @@ -83,6 +83,7 @@ module Models return BeEF::Core::Constants::Os::OS_ANDROID_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_ANDROID_UA_STR 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_QNX_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_QNX_UA_STR + return BeEF::Core::Constants::Os::OS_SUNOS_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_SUNOS_UA_STR return BeEF::Core::Constants::Os::OS_BEOS_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_BEOS_UA_STR return BeEF::Core::Constants::Os::OS_OPENBSD_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_OPENBSD_UA_STR return BeEF::Core::Constants::Os::OS_WEBOS_IMG if ua_string.include? BeEF::Core::Constants::Os::OS_WEBOS_UA_STR diff --git a/extensions/admin_ui/media/images/icons/sunos.gif b/extensions/admin_ui/media/images/icons/sunos.gif new file mode 100644 index 0000000000000000000000000000000000000000..f7e5c5303555911a78a4f9182c06afae2bddaee7 GIT binary patch literal 1477 zcmZ?wbhEHbbYO5`*v`Q4hJgW&fFgJRTp2P0mlmKnvNB{grWQPkAsW$Kg=`vDHqbz1 zfK?5W;Cp2CKsH$FKav8dU+VuOJZ1YHY6DE!f1oUq0-$z~2v}C}CkrD;wGM~?W6{POo7=8TK+UN-Fh82t&@mqX?7CboH_q)!Gdy+}` zm0AAWY;()Moaq;pEY7oO*!Jv>P^`A7fMoIG!^@n1^T`@J26P-^4!N_-!ua!~Zbq31 zyC0Q@UtErS_J3Pk!!L(-8<=fa*3VY?@Xc6!vHjn_W;HL_)=r*sW{Tb67xEL$0~ilX zZM{>ohS4FxiQ!)R>_HvB4_a=Yo|+pz0CvZ5+66~gzHOF3?m zRhM&|x$wojt{bhYNm;+IS_Gs??aheIw@UMv#Q2hTS;z#Fb0-uhDNZ^OleliL_}oc$ zcFU$szHa+WifKybj7O7nWEBKDUS_7vFO}$voYo_^sv>C0tyH&$8R?r`RGJSoS}Jui zi>-JXyGU_KdYG(IxWJSKE0Yyzsqc