示例#1
0
 private void SpamForm_Load(object sender, EventArgs e)
 {
     string DataDir = System.Reflection.Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName;
     DataDir = System.IO.Path.GetDirectoryName(DataDir);
     NerZul.Core.Utils.INIFile Config = new NerZul.Core.Utils.INIFile(System.IO.Path.Combine(DataDir, "config.ini"));
     bBeep = Config.GetValue("misc", "beep", false);
 }
示例#2
0
        public static void Init()
        {
            DataDir = System.Reflection.Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName;
            DataDir = System.IO.Path.GetDirectoryName(DataDir);
            //#if PUBLIC_BUILD
            AccessFile = new NerZul.Core.Utils.INIFile(System.IO.Path.Combine(DataDir, "access.ini"));
            //#endif
            Config = new NerZul.Core.Utils.INIFile(System.IO.Path.Combine(DataDir, "config.ini"));
            DataDir = System.IO.Path.Combine(DataDir, "data");
            NerZul.Core.Network.HttpClient.ResponseTimeout = Config.GetValue("misc", "responsetimeout", 10) * 1000;

            //Init time
            ErepTZ = Config.GetValue("time", "timezone", -7);
            ErepAgeStart = new DateTime(Config.GetValue("time", "zeroyear", 2007),
                                      Config.GetValue("time", "zeromounth", 11),
                                      Config.GetValue("time", "zeroday", 20));
            //Init bots configuration
            BotConfig.UserAgentList = new NerZul.Core.Utils.StringSelector(
                System.IO.Path.Combine(DataDir, "useragents.txt"));

            BotConfig.AntiGateKey = Config.GetValue("misc", "autocaptcha", "");
            BotConfig.precaptchaBufferSize = Config.GetValue("misc", "precaptchaBufferSize", 0);
            BotConfig.useTOR = Config.GetValue("misc", "TOR", false);
            BotConfig.proxyAuthorisation = Config.GetValue("misc", "proxyAuthorisation", false);
            BotConfig.proxyLogin = Config.GetValue("misc", "proxyLogin", "");
            BotConfig.proxyPassword = Config.GetValue("misc", "proxyPassword", "");
            BotConfig.bBeep = Config.GetValue("misc", "beep", false);

            string proxyURL = Config.GetValue("misc", "proxyURL", "");
            if (String.IsNullOrEmpty(proxyURL))
            {
                BotConfig.ProxyList = new NerZul.Core.Utils.StringSelector(
                    System.IO.Path.Combine(DataDir, "proxy.txt"));
            }
            else
            {
                ConsoleLog.WriteLine("Loading proxy list from " + proxyURL);
                BotConfig.ProxyList = Core.Source.Network.ProxyLoader.LoadFromURL(proxyURL, DataDir);
                ConsoleLog.WriteLine(BotConfig.ProxyList.Count.ToString() + " proxies loaded");
            }

            FirstKey = AccessFile.GetValue("vals", "FirstKey", "");
            SecondKey = AccessFile.GetValue("vals", "SecondKey", ""); ;

            StringBuilder sb1 = new StringBuilder();
            ManagementObjectSearcher searcher = null;
            searcher = new ManagementObjectSearcher("Select * from Win32_IRQResource");
            foreach (ManagementObject item in searcher.Get())
            {
                StringBuilder sb = new StringBuilder("");
                sb.Append(item.GetPropertyValue("Availability").ToString());
                sb.Append(item.GetPropertyValue("Hardware").ToString());
                sb.Append(item.GetPropertyValue("IRQNumber").ToString());
                sb.Append(item.GetPropertyValue("Name").ToString());
                sb.Append(item.GetPropertyValue("TriggerLevel").ToString());
                sb.Append(item.GetPropertyValue("TriggerType").ToString());
                string sBuf = MD5Hash(Convert.ToBase64String(StrToByteArray(sb.ToString())));
                sb1.Append(sBuf);
            }
            FirstRealKey = sb1.ToString().Substring(0, 200);

            webCitadel = new WebCitadel();
            webCitadel.Init(SecondKey);
        }