Beispiel #1
0
        public static void zombolize(string[] args)
        {
            if(args.Length!=6)
            {
                ConsoleLog.WriteLine("Usage: zombolize loginlist dictionary proxylist threadcount outfile");
                return;
            }
            m_NickNameList=new NerZul.Core.Utils.StringHolder(args[1]);
            m_Dictionary=System.IO.File.ReadAllLines(args[2]);
            m_ProxyList=new NerZul.Core.Utils.StringSelector(args[3]);
            int ThreadCount=int.Parse(args[4]);
            m_OutS=new System.IO.StreamWriter(args[5]);
            m_List=new System.Collections.Generic.List<Engine.Zomboloid.LoginPassword>();

            for(int i=0; i<ThreadCount;i++)
            {
                new System.Threading.Thread(zombolize_thread).Start();
            }
            while(true)
            {
                System.Threading.Thread.Sleep(500);
                lock(m_ThreadCountLock)
                {
                    if(m_ThreadCount<=0) return;
                }
            }
        }
Beispiel #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;
            timeoutsLimit = Config.GetValue("misc", "timeoutslimit", 9999);
            ShowDlg = false;
            threadCount = Config.GetValue("misc", "threadCount", 10);
            webNickURL = Config.GetValue("misc", "webnickurl", "");

            //Init database
            Database=new Database();
            Database.ConnectToDb();
            //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.DisableProxyAfterLogin = false;
            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);

            defaultFoodQ = Config.GetValue("gameplay", "defaultFoodQ", 1);
            TryAnotherWork = Config.GetValue("gameplay", "TryAnotherWork", 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");
            }

            //#if PUBLIC_BUILD

            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);

            //#endif
            //Load avatars list
            Avatars=new NerZul.Core.Utils.StringSelector(
                System.IO.Directory.GetFiles(System.IO.Path.Combine(DataDir,"avatars")));

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