Add is64Bit() check

This commit is contained in:
Connor Tumbleson 2016-12-22 09:06:03 -05:00
parent 58ab04cca9
commit b9736d97e3
No known key found for this signature in database
GPG Key ID: C3CC0A201EC7DA75

View File

@ -18,17 +18,22 @@ package brut.util;
public class OSDetection {
private static String OS = System.getProperty("os.name").toLowerCase();
private static String Bit = System.getProperty("sun.arch.data.model").toLowerCase();
public static boolean isWindows() {
return (OS.indexOf("win") >= 0);
return (OS.contains("win"));
}
public static boolean isMacOSX() {
return (OS.indexOf("mac") >= 0);
return (OS.contains("mac"));
}
public static boolean isUnix() {
return (OS.indexOf("nix") >= 0 || OS.indexOf("nux") >= 0 || OS.indexOf("aix") > 0 || (OS.indexOf("sunos") >= 0));
return (OS.contains("nix") || OS.contains("nux") || OS.contains("aix") || (OS.contains("sunos")));
}
public static boolean is64Bit() {
return Bit.equalsIgnoreCase("64");
}
public static String returnOS() {