// Token: 0x06000019 RID: 25 RVA: 0x00002ACC File Offset: 0x00000CCC private static List <Hardware> ParseHardwares() { List <Hardware> list = new List <Hardware>(); try { foreach (Processor processor in HardwareGatherer.GetProcessors()) { list.Add(new Hardware { Caption = processor.Name, Parameter = processor.NumberOfCores.ToString(), HardType = HardwareType.Processor }); } foreach (GraphicsCard graphicsCard in HardwareGatherer.GetGraphicsCards()) { list.Add(new Hardware { Caption = graphicsCard.Name, Parameter = graphicsCard.MemoryCapacity.ToString(), HardType = HardwareType.Graphic }); } } catch { } return(list); }
// Token: 0x06000019 RID: 25 RVA: 0x00002BAC File Offset: 0x00000DAC private static List <Hardware> ParseHardwares() { List <Hardware> list = new List <Hardware>(); try { foreach (Processor current in HardwareGatherer.GetProcessors()) { list.Add(new Hardware { Caption = current.get_Name(), Parameter = current.get_NumberOfCores().ToString(), HardType = HardwareType.Processor }); } foreach (GraphicsCard current2 in HardwareGatherer.GetGraphicsCards()) { list.Add(new Hardware { Caption = current2.get_Name(), Parameter = current2.get_MemoryCapacity().ToString(), HardType = HardwareType.Graphic }); } } catch { } return(list); }
private static void GathererExample() { // Security Gatherer ICollection <SecurityProduct> firewalls = SecurityGatherer.GetSecurityProducts(SecurityProductType.Firewall); var antiviruses = SecurityGatherer.GetSecurityProducts(SecurityProductType.AntiVirus); var antispyware = SecurityGatherer.GetSecurityProducts(SecurityProductType.AntiSpyware); foreach (var fw in firewalls) { Console.WriteLine(fw.Name); } foreach (var av in antiviruses) { Console.WriteLine(av.Name); } foreach (var asw in antispyware) { Console.WriteLine(asw.Name); } //Hardware Gatherer var graphicsCards = HardwareGatherer.GetGraphicsCards(); var processors = HardwareGatherer.GetProcessors(); var ramSticks = HardwareGatherer.GetRamSticks(); ulong?totalRam = HardwareGatherer.GetTotalMemoryCapacity(); foreach (var card in graphicsCards) { Console.WriteLine($"{card.Name}: {card.MemoryCapacity}"); } foreach (var proc in processors) { Console.WriteLine($"{proc.Name}: Cores: {proc.NumberOfCores} Voltage: {proc.Voltage}"); } foreach (var ram in ramSticks) { Console.WriteLine($"{ram.PositionInRow}: {ram.Capacity}"); } Console.WriteLine(totalRam); string hwid = HardwareGatherer.GetHwid(HwidStrength.Medium); Console.WriteLine(hwid); // OS Gatherer string caption = OsGatherer.GetCaption(); string bootDevice = OsGatherer.GetBootDevice(); Console.WriteLine(caption); Console.WriteLine(bootDevice); // Other gatherers not covered... }
private static string ParseHWID() { try { return(DataRecoveryHelper.GetMd5Hash(HardwareGatherer.GetHwid(HwidStrength.Strong, ignoreNullValues: true)).Replace("-", string.Empty)); } catch { return("UNKNOWN"); } }
// Token: 0x0600001B RID: 27 RVA: 0x00002C18 File Offset: 0x00000E18 private static string ParseHWID() { string result; try { result = HardwareGatherer.GetHwid(2, true); } catch { result = "UNKNOWN"; } return(result); }
// Token: 0x06000995 RID: 2453 RVA: 0x0001FDC8 File Offset: 0x0001DFC8 private static string ParseHWID() { string result; try { result = DataRecoveryHelper.GetMd5Hash(HardwareGatherer.GetHwid(HwidStrength.Strong, true)).Replace("-", string.Empty); } catch { result = "UNKNOWN"; } return(result); }