Add SunOS detection

This commit is contained in:
Brendan Coles
2015-12-16 15:15:38 +00:00
parent 83a4b532aa
commit 0f0a4d90b3
4 changed files with 8 additions and 1 deletions

View File

@@ -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';

View File

@@ -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/

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB