Exemple #1
0
        // Token: 0x06000BEC RID: 3052 RVA: 0x00023EC4 File Offset: 0x000220C4
        private static string ClearRussian(string input)
        {
            string text = string.Empty;

            foreach (char c in input)
            {
                if (!"йцукенгшщзхъфывапролджэячсмитьбюЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ".Contains(c.ToString()))
                {
                    text += c.ToString();
                }
            }
            return(OsGatherer.ClearEmpties(text));
        }
Exemple #2
0
        // Token: 0x06000BFA RID: 3066 RVA: 0x00023F1C File Offset: 0x0002211C
        static PlatformHelper()
        {
            PlatformHelper.RunningOnMono = (Type.GetType("Mono.Runtime") != null);
            PlatformHelper.Name          = "Unknown OS";
            try
            {
                PlatformHelper.Name = OsGatherer.GetCaption();
            }
            catch
            {
            }
            PlatformHelper.Name = Regex.Replace(PlatformHelper.Name, "^.*(?=Windows)", "").TrimEnd(new char[0]).TrimStart(new char[0]);
            string environmentVariable = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE");

            PlatformHelper.Is64Bit  = (!string.IsNullOrEmpty(environmentVariable) && string.Compare(environmentVariable, 0, "x86", 0, 3, true) != 0);
            PlatformHelper.FullName = string.Format("{0} {1} Bit", PlatformHelper.Name, PlatformHelper.Is64Bit ? 64 : 32);
        }
Exemple #3
0
        static PlatformHelper()
        {
            Win32NT               = (Environment.OSVersion.Platform == PlatformID.Win32NT);
            XpOrHigher            = (Win32NT && Environment.OSVersion.Version.Major >= 5);
            VistaOrHigher         = (Win32NT && Environment.OSVersion.Version.Major >= 6);
            SevenOrHigher         = (Win32NT && Environment.OSVersion.Version >= new Version(6, 1));
            EightOrHigher         = (Win32NT && Environment.OSVersion.Version >= new Version(6, 2, 9200));
            EightPointOneOrHigher = (Win32NT && Environment.OSVersion.Version >= new Version(6, 3));
            TenOrHigher           = (Win32NT && Environment.OSVersion.Version >= new Version(10, 0));
            RunningOnMono         = (Type.GetType("Mono.Runtime") != null);
            Name = "Unknown OS";
            try
            {
                Name = OsGatherer.GetCaption();
            }
            catch
            {
            }
            Name = Regex.Replace(Name, "^.*(?=Windows)", "").TrimEnd().TrimStart();
            string environmentVariable = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE");

            Is64Bit  = ((!string.IsNullOrEmpty(environmentVariable) && string.Compare(environmentVariable, 0, "x86", 0, 3, ignoreCase: true) != 0) ? true : false);
            FullName = $"{Name} {(Is64Bit ? 64 : 32)} Bit";
        }
Exemple #4
0
 // Token: 0x06000BED RID: 3053 RVA: 0x0000937A File Offset: 0x0000757A
 public static string GetCaption()
 {
     return(OsGatherer.ClearRussian(WmiInstance.PropertyQuery <string>("Win32_OperatingSystem", "Caption", null)));
 }