Beispiel #1
0
        private void CreateAccountInputValue()
        {
            NewAccount account = new NewAccount();

            if (lstAccount.Count >= 1)
            {
                account = lstAccount[0];
            }
            wbPage.Document.GetElementById("name").SetAttribute("value", account.Account);
            wbPage.Document.GetElementById("pass").SetAttribute("value", account.Password);
            wbPage.Document.GetElementById("pass2").SetAttribute("value", account.Password);
            wbPage.Document.GetElementById("pass3").SetAttribute("value", account.SafeCode);
            wbPage.Document.GetElementById("pass4").SetAttribute("value", account.SafeCode);
            wbPage.Document.GetElementById("authinput").SetAttribute("value", "");
            Random ran     = new Random();
            int    RandKey = ran.Next(100000, 9999999);

            wbPage.Document.GetElementById("qqmsn").SetAttribute("value", RandKey.ToString());
            lstAccount.RemoveAt(0);
        }
Beispiel #2
0
        private void GenerateAccountList()
        {
            /*
             * DP Account, 40 account index +1
             * DP Server, 5 account then server index +1
             * XZ Loop, 1 +1
             */
            int sequeneDPIndex = 0;
            int serverDPIndex  = 0;
            int serverXZIndex  = 0;

            RetrieveIniIndex(ref sequeneDPIndex, ref serverDPIndex, ref serverXZIndex);
            if (sequeneDPIndex > 0)
            {
                sequeneDPIndex += 1;
            }
            if ((serverDPList.Length - 1) == serverDPIndex)
            {
                serverDPIndex = 0;
            }
            else
            {
                serverDPIndex += 1;
            }
            if ((serverXZList.Length - 1) == serverXZIndex)
            {
                serverXZIndex = 0;
            }
            else
            {
                serverXZIndex += 1;
            }

            int total = 0;

            int.TryParse(txtNumber.Text.Trim(), out total);
            List <NewAccount> lstAccounts = new List <NewAccount>();

            for (int i = 0; i < total; i++)
            {
                NewAccount account = new NewAccount();
                account.Account  = Generate();
                account.Password = Generate();
                account.SafeCode = Generate();

                //Sequence
                if (i == 0)
                {
                    if (rbHD.Checked)
                    {
                        account.DPScript = String.Format("{0}{1}.txt", captionHDSrc, sequeneDPIndex);
                    }
                    else if (rbYP.Checked)
                    {
                        account.DPScript = String.Format(captionYPSrc, sequeneDPIndex);
                    }
                }
                else if ((i % 40) == 0)
                {
                    sequeneDPIndex += 1;
                    if (rbHD.Checked)
                    {
                        account.DPScript = String.Format("{0}{1}.txt", captionHDSrc, sequeneDPIndex);
                    }
                    else if (rbYP.Checked)
                    {
                        account.DPScript = String.Format(captionYPSrc, sequeneDPIndex);
                    }
                }
                else if ((i % 5) == 0)
                {
                    if (rbHD.Checked)
                    {
                        account.DPScript = String.Format("{0}{1}.txt", captionHDSrc, sequeneDPIndex);
                    }
                    else if (rbYP.Checked)
                    {
                        account.DPScript = String.Format(captionYPSrc, sequeneDPIndex);
                    }
                }
                else
                {
                    if (rbHD.Checked)
                    {
                        account.DPScript = String.Format("{0}{1}.txt", TeammateHDSrc, sequeneDPIndex);
                    }
                    else if (rbYP.Checked)
                    {
                        account.DPScript = String.Format(TeammateYPSrc, sequeneDPIndex);
                    }
                }
                //Server
                if ((i % 5) == 0 && i != 0)
                {
                    if ((serverDPList.Length - 1) == serverDPIndex)
                    {
                        serverDPIndex = 0;
                    }
                    else
                    {
                        serverDPIndex += 1;
                    }
                }

                account.DPServer = serverDPList[serverDPIndex];

                if ((i % 10) == 0 && i != 0)
                {
                    account.BreakFlag = 1;
                }
                else
                {
                    account.BreakFlag = 0;
                }
                account.XZServerInfo = serverXZList[serverXZIndex];
                if ((serverXZList.Length - 1) == serverXZIndex)
                {
                    serverXZIndex = 0;
                }
                else
                {
                    serverXZIndex += 1;
                }


                account.DpSequenceIndex = sequeneDPIndex;
                account.DpServerIndex   = serverDPIndex;
                account.XZServerIndex   = serverXZIndex;
                lstAccounts.Add(account);
            }

            WriteProcessIni(sequeneDPIndex.ToString(), serverDPIndex.ToString(), serverXZIndex.ToString());
            CreateFile(lstAccounts);

            MessageBox.Show("Done");
        }