示例#1
0
        public void SignupMultiThreaded(object parameters)
        {
            try
            {

                Thread.CurrentThread.IsBackground = true;

                string DBCUsername = BaseLib.Globals.DBCUsername;
                string DBCPAssword = BaseLib.Globals.DBCPassword;
                GlobusHttpHelper globusHelper = new GlobusHttpHelper();
                int CaptchaCounter = 0;
                int counter_AuthToken = 0;
                string ImageURL = string.Empty;
                string authenticitytoken = string.Empty;
                string capcthavalue = string.Empty;

                Array paramsArray = new object[4];
                paramsArray = (Array)parameters;

                string Email = string.Empty;//"*****@*****.**";
                string Password = string.Empty;//"1JESUS11";

                string IPAddress = string.Empty;
                string IPPort = string.Empty;
                string IPUsername = string.Empty;
                string IPpassword = string.Empty;

                string emailData = (string)paramsArray.GetValue(0);
                string username = (string)paramsArray.GetValue(1);
                string name = (string)paramsArray.GetValue(2);
                string IP = (string)paramsArray.GetValue(3);
                try
                {
                    //Log("test - " + emailData + " :: " + name);

                    #region Emails & IP Settings
                    try
                    {
                        int Count = emailData.Split(':').Length;
                        if (Count == 1)
                        {
                            Log("[ " + DateTime.Now + " ] => [ Uploaded Emails Not In correct Format ]");
                            Log(emailData);
                            return;
                        }
                        if (Count == 2)
                        {
                            Email = emailData.Split(':')[0].Replace("\0", "");
                            Password = emailData.Split(':')[1].Replace("\0", "");
                        }
                        else if (Count == 4)
                        {
                            Email = emailData.Split(':')[0].Replace("\0", "");
                            Password = emailData.Split(':')[1].Replace("\0", "");
                            IPAddress = emailData.Split(':')[2];
                            IPPort = emailData.Split(':')[3];
                        }
                        else if (Count == 6)
                        {
                            Email = emailData.Split(':')[0].Replace("\0", "");
                            Password = emailData.Split(':')[1].Replace("\0", "");
                            IPAddress = emailData.Split(':')[2];
                            IPPort = emailData.Split(':')[3];
                            IPUsername = emailData.Split(':')[4];
                            IPpassword = emailData.Split(':')[5];
                        }
                        else
                        {
                            Log("[ " + DateTime.Now + " ] => [ Uploaded Emails Not In correct Format ]");
                            Log(emailData);
                            return;
                        }
                    }
                    catch (Exception ex)
                    {
                        //Console.WriteLine("8 :" + ex.StackTrace);
                        GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- Email Pass --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                        GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- Email Pass >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
                    }

                    try
                    {
                        RaiseEvent_AddToDictionary(Email);
                        dictionary_Threads.Add("AccountCreator_" + Email, Thread.CurrentThread);
                    }
                    catch (Exception ex) { Console.WriteLine(ex.StackTrace); }

                    try
                    {
                        if (IP.Split(':').Length == 4)
                        {
                            IPAddress = IP.Split(':')[0];
                            IPPort = IP.Split(':')[1];
                            IPUsername = IP.Split(':')[2];
                            IPpassword = IP.Split(':')[3];
                        }
                    }
                    catch (Exception ex)
                    {
                        //Console.WriteLine("7 :" + ex.StackTrace);
                        GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- IP Split --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                        GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- IP Split >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
                    }

                    #endregion

                    try
                    {
                        username = username.Replace("\0", "");
                        Password = Password.Replace("\0", "");
                        if (!(username.Count() < 15 || Password.Count() > 6))
                        {
                            if (username.Count() > 15)
                            {
                                Log("[ " + DateTime.Now + " ] => [ Username Must Not be greater than 15 character ]");
                                username = username.Remove(13); //Removes the extra characters
                            }
                            else if (Password.Count() < 6)
                            {
                                Log("[ " + DateTime.Now + " ] => [ Password Must Not be less than 6 character ]");
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        //Console.WriteLine("6 :" + ex.StackTrace);
                        GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- Check Username --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                        GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- Check Username >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
                    }

                StartAgain:

                    Random randm = new Random();
                    double cachestop = randm.NextDouble();
                    string pagesourceGoogleCaptcha = string.Empty;
                    string signUpPage = string.Empty;
                    try
                    {
                        try
                        {
                            signUpPage = globusHelper.getHtmlfromUrlIP(new Uri("https://twitter.com/signup"), IPAddress, IPPort, IPUsername, IPpassword, "", "");
                        }
                        catch (Exception ex)
                        {
                            Log("[ " + DateTime.Now + " ] => [ Error in Loading sign up page  " + IPAddress + " Exception" + ex.Message + " ]");
                        }
                        if (string.IsNullOrEmpty(signUpPage))
                        {
                            Thread.Sleep(500);
                            signUpPage = globusHelper.getHtmlfromUrlIP(new Uri("https://twitter.com/signup"), IPAddress, IPPort, IPUsername, IPpassword, "", "");
                        }

                        //Check if captchaAvailable, if yes, hit google captcha url
                        if (!string.IsNullOrEmpty(signUpPage) && signUpPage.Contains("captchaAvailable&quot;:true"))
                        {
                            try
                            {
                                string pagesource1 = globusHelper.getHtmlfromUrlIP(new Uri("https://www.google.com/recaptcha/api/js/recaptcha_ajax.js"), IPAddress, IPPort, IPUsername, IPpassword, "", "");
                            }
                            catch { }
                            try
                            {
                                pagesourceGoogleCaptcha = globusHelper.getHtmlfromUrlIP(new Uri("https://www.google.com/recaptcha/api/challenge?k=6LfbTAAAAAAAAE0hk8Vnfd1THHnn9lJuow6fgulO&ajax=1&cachestop=" + cachestop + "&lang=en"), IPAddress, IPPort, IPUsername, IPpassword, "", "");
                            }
                            catch { }
                            if (string.IsNullOrEmpty(pagesourceGoogleCaptcha))
                            {
                                Thread.Sleep(500);
                                pagesourceGoogleCaptcha = globusHelper.getHtmlfromUrlIP(new Uri("https://www.google.com/recaptcha/api/challenge?k=6LfbTAAAAAAAAE0hk8Vnfd1THHnn9lJuow6fgulO&ajax=1&cachestop=" + cachestop + "&lang=en"), IPAddress, IPPort, IPUsername, IPpassword, "", "");
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        pagesourceGoogleCaptcha = string.Empty;
                        Log("[ " + DateTime.Now + " ] => [ Error in Loading sign up page  " + IPAddress + " Exception" + ex.Message + " ]");
                    }

                    if (string.IsNullOrEmpty(signUpPage))
                    {
                        NoOfNonCreatedAccounts++;
                        NoOfNonCreatedAccountsIP++;
                        Log("[ " + DateTime.Now + " ] => [ Couldn't load Sign Up Page: " + Email + " ]");
                        lock (Lock_notCreatedaccounts)
                        {
                            GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_FailedCreatedAccounts);
                            GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password, Globals.path_FailedCreatedAccountsOnlyEmailPass);
                            GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password, Globals.path_FailedCreatedAccountsOnlyEmailPass);
                        }

                        Globals.EnquequeDataForSignUp(new object[] { emailData, username, name, IP });

                        return;
                    }

                    //if captchaAvailable on signup but google captcha page source is null, retry getting captcha page source
                    if (string.IsNullOrEmpty(pagesourceGoogleCaptcha) && signUpPage.Contains("captchaAvailable&quot;:true"))
                    {
                        try
                        {
                            Thread.Sleep(500);
                            //textUrl = globusHelper.getHtmlfromUrlIP(new Uri("https://twitter.com/signup"), IPAddress, IPPort, IPUsername, IPpassword, "", "");
                            string pagesource1 = globusHelper.getHtmlfromUrlIP(new Uri("https://www.google.com/recaptcha/api/js/recaptcha_ajax.js"), IPAddress, IPPort, IPUsername, IPpassword, "", "");
                            pagesourceGoogleCaptcha = globusHelper.getHtmlfromUrlIP(new Uri("https://www.google.com/recaptcha/api/challenge?k=6LfbTAAAAAAAAE0hk8Vnfd1THHnn9lJuow6fgulO&ajax=1&cachestop=" + cachestop + "&lang=en"), IPAddress, IPPort, IPUsername, IPpassword, "", "");
                        }
                        catch (Exception ex)
                        {
                            if (CaptchaCounter == 0)//retry getting captcha page source only once
                            {
                                Log("[ " + DateTime.Now + " ] => [ Finding CAPTCHA Again For " + Email + " ]");
                                CaptchaCounter++;
                                goto StartAgain;
                            }
                            Console.WriteLine("Captcha Not Found For Email : " + Email + " : Error :" + ex.StackTrace);
                            GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- Getting Signup PageSource --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                            GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- Getting Signup PageSource >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
                        }
                    }


                    try
                    {
                        int IndexStart = pagesourceGoogleCaptcha.IndexOf("challenge :");
                        if (IndexStart > 0)
                        {
                            string Start = pagesourceGoogleCaptcha.Substring(IndexStart);
                            int IndexEnd = Start.IndexOf("',");
                            string End = Start.Substring(0, IndexEnd).Replace("challenge :", "").Replace("'", "").Replace(" ", "");
                            capcthavalue = End;
                            ImageURL = "https://www.google.com/recaptcha/api/image?c=" + End;
                        }
                        else
                        {
                            if (signUpPage.Contains("captchaAvailable&quot;:true"))
                            {
                                if (CaptchaCounter == 0)
                                {
                                    Log("[ " + DateTime.Now + " ] => [ Finding Capctha Again For " + Email + " ]");
                                    CaptchaCounter++;
                                    goto StartAgain;
                                }
                                Log("[ " + DateTime.Now + " ] => [ Cannot Find challenge Captcha on Page. Email : Password --> " + Email + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword + " ]");
                                GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.Path_CaptchaRequired);
                                //return;
                            }
                           
                        }
                    }
                    catch (Exception ex)
                    {
                        //Console.WriteLine("1 :" + ex.StackTrace);
                        GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- Getting Image Url --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                        GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- Getting Image Url >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
                    }

                    WebClient webclient = new WebClient();
                    try
                    {
                        int intIPPort = 80;
                        if (!string.IsNullOrEmpty(IPPort) && GlobusRegex.ValidateNumber(IPPort))
                        {
                            intIPPort = int.Parse(IPPort);
                        }
                        ChangeIP_WebClient(IPAddress, intIPPort, IPUsername, IPpassword, ref webclient);
                    }
                    catch (Exception ex)
                    {
                        GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- ChangeIP_WebClient() --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                        GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- ChangeIP_WebClient() >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
                    }

                    try
                    {
                        int StartIndex = signUpPage.IndexOf("phx-signup-form");
                        if (StartIndex > 0)
                        {
                            string Start = signUpPage.Substring(StartIndex);
                            int EndIndex = Start.IndexOf("name=\"authenticity_token");
                            string End = Start.Substring(0, EndIndex).Replace("phx-signup-form", "").Replace("method=\"POST\"", "").Replace("action=\"https://twitter.com/account/create\"", "");
                            authenticitytoken = End.Replace("class=\"\">", "").Replace("<input type=\"hidden\"", "").Replace("class=\"\">", "").Replace("value=\"", "").Replace("\n", "").Replace("\"", "").Replace(" ", "");
                        }
                        else
                        {
                            //Log("Cannot find Authenticity Token On Page for : " + Email);
                            if (counter_AuthToken == 0)
                            {
                                Log("[ " + DateTime.Now + " ] => [ Retrying for Authenticity Token for : " + Email + " ]");
                                goto StartAgain;
                            }
                            else
                            {
                                Log("[ " + DateTime.Now + " ] => [ Cannot find Authenticity Token On Page, Exiting for : " + Email + " ]");
                                //Log("Couldn't create Account with : " + Email);
                                lock (Lock_notCreatedaccounts)
                                {
                                    GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_FailedCreatedAccounts);
                                    GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password, Globals.path_FailedCreatedAccountsOnlyEmailPass);
                                }

                                Globals.EnquequeDataForSignUp(new object[] { emailData, username, name, IP });

                                return;
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        //Console.WriteLine("2 :" + ex.StackTrace);
                        GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- Getting Authenticity --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                        GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- Getting Authenticity >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
                    }
                    ////Posting data
                    try
                    {
                        //Sign Up
                        string postData_SignUp = "user%5Bname%5D=" + username + "&user%5Bemail%5D=" + Uri.EscapeDataString(Email) + "&user%5Buser_password%5D=" + Password + "&context=front&authenticity_token=" + authenticitytoken + "";
                        string res_PostSignUp = globusHelper.postFormData(new Uri("https://twitter.com/signup"), postData_SignUp, "", "", "", "", "");

                        int tempCount_usernameCheckLoop = 0;
                    usernameCheckLoop:
                        int tempCount_passwordCheckLoop = 0;

                        bool Created = true;
                        string url = "https://twitter.com/users/email_available?suggest=1&username=&full_name=&email=" + Uri.EscapeDataString(Email.Replace(" ", "")) + "&suggest_on_username=true&context=signup";
                        string EmailCheck = globusHelper.getHtmlfromUrlIP(new Uri(url), IPAddress, IPPort, IPUsername, IPpassword, "https://twitter.com/signup", "");
                        string Usernamecheck = globusHelper.getHtmlfromUrlIP(new Uri("https://twitter.com/users/username_available?suggest=1&username="******"&full_name=" + name + "&email=&suggest_on_username=true&context=signup"), IPAddress, IPPort, IPUsername, IPpassword, "https://twitter.com/signup", "");

                        if (EmailCheck.Contains("Email has already been taken. An email can only be used on one Twitter account at a time")
                            || (res_PostSignUp.Contains("You already have an account with this username and password")))
                        {
                            Log("[ " + DateTime.Now + " ] => [ Email : " + Email + " has already been taken. An email can only be used on one Twitter account at a time ]");
                            GlobusFileHelper.AppendStringToTextfileNewLine(emailData.Replace("\0", ""), Globals.path_EmailAlreadyTaken);
                            Created = false;
                        }
                        else if (Usernamecheck.Contains("Username has already been taken"))
                        {
                            //Created = false;
                            Log("[ " + DateTime.Now + " ] => [ Username : "******" has already been taken ]");
                            if (username.Count() > 12)
                            {
                                username = username.Remove(8); //Removes the extra characters
                            }

                            if (UsernameType == "String")
                            {
                                Log("[ " + DateTime.Now + " ] => [ Adding String To Username ]");
                                username = username + RandomStringGenerator.RandomString(5);
                            }
                            else if (UsernameType == "Numbers")
                            {
                                Log("[ " + DateTime.Now + " ] => [ Adding Numbers To Username ]");
                                username = username + RandomStringGenerator.RandomNumber(5);
                            }
                            else
                            {
                                Log("[ " + DateTime.Now + " ] => [ Adding Strings & Numbers To Username ]");
                                username = username + RandomStringGenerator.RandomStringAndNumber(5);
                            }

                            if (username.Count() > 15)
                            {
                                username = username.Remove(13); //Removes the extra characters
                            }
                            tempCount_usernameCheckLoop++;
                            if (tempCount_usernameCheckLoop < 5)
                            {
                                goto usernameCheckLoop;
                            }
                        }
                        else if (EmailCheck.Contains("You cannot have a blank email address"))
                        {
                            //Log("You cannot have a blank email address");
                            Created = false;
                            Globals.EnquequeDataForSignUp(new object[] { emailData, username, name, IP });
                        }

                        if (Created)
                        {
                            string AccountCreatePageSource = string.Empty;

                            string EscapeDataString_name = Uri.EscapeDataString(name);

                            //Replace Space (which unicode value is %20) in Pluse ....

                            EscapeDataString_name = EscapeDataString_name.Replace("%20", "+");

                            if (!string.IsNullOrEmpty(ImageURL))
                            {
                                try
                                {
                                    byte[] args = webclient.DownloadData(ImageURL);

                                    string captchaText = string.Empty;

                                    if (manualcaptch)
                                    {

                                    }
                                    else
                                    {
                                        string[] arr1 = new string[] { DBCUsername, DBCPAssword, "" };

                                        captchaText = DecodeDBC(arr1, args);
                                    }
                                    //string postdata = "authenticity_token=" + authenticitytoken + "&user%5Bname%5D=" + EscapeDataString_name + "&user%5Bemail%5D=" + Uri.EscapeDataString(Email.Replace(" ", "")) + "&user%5Buser_password%5D=" + System.Web.HttpUtility.UrlEncode(Password) + "&user%5Bscreen_name%5D=" + username + "&user%5Bremember_me_on_signup%5D=1&user%5Bremember_me_on_signup%5D=&context=front&ad_ref=&recaptcha_challenge_field=" + capcthavalue + "&recaptcha_response_field=" + System.Web.HttpUtility.UrlEncode(captchaText) + "&user%5Bdiscoverable_by_email%5D=1&user%5Bsend_email_newsletter%5D=1";
                                    string postdata = "authenticity_token=" + authenticitytoken + "&user%5Bname%5D=" + EscapeDataString_name + "&user%5Bemail%5D=" + Uri.EscapeDataString(Email.Replace(" ", "")) + "&user%5Buser_password%5D=" + System.Web.HttpUtility.UrlEncode(Password) + "&user%5Bscreen_name%5D=" + username + "&user%5Bremember_me_on_signup%5D=1&user%5Bremember_me_on_signup%5D=&context=front&ad_ref=&recaptcha_challenge_field=" + capcthavalue + "&recaptcha_response_field=" + System.Web.HttpUtility.UrlEncode(captchaText) + "&user%5Bdiscoverable_by_email%5D=1&user%5Bsend_email_newsletter%5D=1";

                                    try
                                    {
                                        AccountCreatePageSource = globusHelper.postFormData(new Uri("https://twitter.com/account/create"), postdata, "https://twitter.com/signup", "", "", "", "");
                                    }
                                    catch { };
                                    if (string.IsNullOrEmpty(AccountCreatePageSource))
                                    {
                                        Thread.Sleep(1000);
                                        AccountCreatePageSource = globusHelper.postFormData(new Uri("https://twitter.com/account/create"), postdata, "https://twitter.com/signup", "", "", "", "");
                                    }
                                }
                                catch (Exception ex)
                                {
                                    //Log(ex.Message);
                                    GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- Getting AccountCreatePageSource --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                                    GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- Getting AccountCreatePageSource >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
                                }
                            }
                            else
                            {
                                string postdata = "authenticity_token=" + authenticitytoken + "&user%5Bname%5D=" + EscapeDataString_name + "&user%5Bemail%5D=" + Email.Replace(" ", "").Replace("@", "%40") + "&user%5Buser_password%5D=" + Password + "&user%5Bscreen_name%5D=" + username + "&user%5Bremember_me_on_signup%5D=1&user%5Bremember_me_on_signup%5D=&user%5Buse_cookie_personalization%5D=1&asked_cookie_personalization_setting=1&context=front&ad_ref=&user%5Bdiscoverable_by_email%5D=1&user%5Bsend_email_newsletter%5D=1";
                                AccountCreatePageSource = globusHelper.postFormData(new Uri("https://twitter.com/account/create"), postdata, "https://twitter.com/signup", "", "", "", "");
                            }

                            //string postdata = "authenticity_token=" + authenticitytoken + "&user%5Bname%5D=" + name + "&user%5Bemail%5D=" + Email.Replace(" ", "") + "&user%5Buser_password%5D=" + Password + "&user%5Bscreen_name%5D=" + username + "&user%5Bremember_me_on_signup%5D=1&user%5Bremember_me_on_signup%5D=&context=&user%5Bdiscoverable_by_email%5D=1&user%5Bsend_email_newsletter%5D=1";
                            //string AccountCreatePageSource = globusHelper.postFormData(new Uri("https://twitter.com/account/create"), postdata, "https://twitter.com/signup", "", "", "", "");

                            if (AccountCreatePageSource.Contains("id=\"signout-form\"") && AccountCreatePageSource.Contains("/logout") && AccountCreatePageSource.Contains("id=\"signout-button")
                                || AccountCreatePageSource.Contains("/welcome/recommendations" + username))
                            {
                                Log("[ " + DateTime.Now + " ] => [ Account created With Email :" + Email + " ]");
                                lock (Lock_Createdaccounts)
                                {
                                    //GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password + ":" + username + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_SuccessfulCreatedAccounts);
                                    GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_SuccessfulCreatedAccounts);
                                }
                                NoOfSuccessfullyCreatedAccount++;
                                //After Account creation
                                if (Created)
                                {
                                    try
                                    {
                                        if (!Globals.IsUseFakeEmailAccounts)
                                        {
                                            Log("[ " + DateTime.Now + " ] => [ Going for Email Verification : " + Email + " ]");
                                            Thread.Sleep(5000);

                                            ClsEmailActivator EmailActivate = new ClsEmailActivator();
                                            bool verified = EmailActivate.EmailVerification(Email.Replace(" ", ""), Password, ref globusHelper);
                                            if (verified)
                                            {
                                                GlobusFileHelper.AppendStringToTextfileNewLine(emailData.Replace("\0", "") + ":" + username + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_EmailVerifiedAccounts);
                                                Log("[ " + DateTime.Now + " ] => [ Account Verified : " + Email + " ]");
                                            }
                                            else
                                            {
                                                GlobusFileHelper.AppendStringToTextfileNewLine(emailData.Replace("\0", "") + ":" + username + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_NonEmailVerifiedAccounts);
                                                Log("[ " + DateTime.Now + " ] => [ Account Couldn't be Email Verified : " + Email + " ]");
                                            }

                                        }

                                        try
                                        {
                                            string checkPageSource = globusHelper.getHtmlfromUrl(new Uri("https://twitter.com/"), "", "");

                                            string pstAuthToken = PostAuthenticityToken(checkPageSource, "postAuthenticityToken");

                                            #region Profilig Of new created account
                                            try
                                            {
                                                new Thread(() =>
                                                {
                                                    startProfilingAfterAccountCreation(new object[] { Email, Password, IPAddress, IPPort, IPUsername, IPpassword, pstAuthToken, globusHelper });
                                                }).Start();
                                            }
                                            catch (Exception)
                                            {
                                            }
                                            #endregion

                                            #region for Follow

                                            try
                                            {
                                                Follow(ref globusHelper, Email, pstAuthToken);
                                            }
                                            catch (Exception)
                                            {
                                            }

                                            #endregion

                                        }
                                        catch (Exception)
                                        {
                                        }

                                        clsFBAccount insertUpdateDataBase = new clsFBAccount();
                                        insertUpdateDataBase.InsertUpdateFBAccount(Email.Replace(" ", ""), Password, username, IPAddress, IPPort, IPUsername, IPpassword, "", "");
                                    }
                                    catch (Exception ex)
                                    {
                                        //Log(ex.Message);
                                        GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- Getting After Account creation --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                                        GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- Getting After Account creation >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
                                    }
                                }
                            }
                            else if (AccountCreatePageSource.Contains("/welcome/recommendations"))
                            {
                                Log("[ " + DateTime.Now + " ] => [ Account created With Email :" + Email + " ]");
                                lock (Lock_Createdaccounts)
                                {
                                    //GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password + ":" + username + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_SuccessfulCreatedAccounts);
                                    GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_SuccessfulCreatedAccounts);
                                }
                                NoOfSuccessfullyCreatedAccount++;
                                //After Account creation
                                if (Created)
                                {
                                    try
                                    {
                                        if (!Globals.IsUseFakeEmailAccounts)
                                        {
                                            Log("[ " + DateTime.Now + " ] => [ Going for Email Verification : " + Email + " ]");
                                            Thread.Sleep(5000);

                                            ClsEmailActivator EmailActivate = new ClsEmailActivator();
                                            bool verified = EmailActivate.EmailVerification(Email.Replace(" ", ""), Password, ref globusHelper);
                                            if (verified)
                                            {
                                                GlobusFileHelper.AppendStringToTextfileNewLine(emailData.Replace("\0", "") + ":" + username + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_EmailVerifiedAccounts);
                                                Log("[ " + DateTime.Now + " ] => [ Account Verified : " + Email + " ]");
                                            }
                                            else
                                            {
                                                GlobusFileHelper.AppendStringToTextfileNewLine(emailData.Replace("\0", "") + ":" + username + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_NonEmailVerifiedAccounts);
                                                Log("[ " + DateTime.Now + " ] => [ Account Couldn't be Email Verified : " + Email + " ]");
                                            }
                                        }


                                        try
                                        {
                                            string checkPageSource = globusHelper.getHtmlfromUrl(new Uri("https://twitter.com/"), "", "");

                                            string pstAuthToken = PostAuthenticityToken(checkPageSource, "postAuthenticityToken");

                                            #region Profilig Of new created account
                                            try
                                            {
                                                new Thread(() =>
                                                {
                                                    startProfilingAfterAccountCreation(new object[] { Email, Password, IPAddress, IPPort, IPUsername, IPpassword, pstAuthToken, globusHelper });
                                                }).Start();
                                            }
                                            catch (Exception)
                                            {
                                            }
                                            #endregion

                                            #region for Follow

                                            try
                                            {
                                                Follow(ref globusHelper, Email, pstAuthToken);
                                            }
                                            catch (Exception)
                                            {
                                            }

                                            #endregion

                                        }
                                        catch (Exception)
                                        {
                                        }

                                        clsFBAccount insertUpdateDataBase = new clsFBAccount();
                                        insertUpdateDataBase.InsertUpdateFBAccount(Email.Replace(" ", ""), Password, username, IPAddress, IPPort, IPUsername, IPpassword, "", "");
                                    }
                                    catch (Exception ex)
                                    {
                                        //Log(ex.Message);
                                        GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- Getting After Account creation --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                                        GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- Getting After Account creation >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
                                    }
                                }
                            }
                            else if (AccountCreatePageSource.ToLower().Contains("password is too obvious") || AccountCreatePageSource.ToLower().Contains("\"active error\">password"))
                            {
                                NoOfNonCreatedAccounts++;
                                tempCount_passwordCheckLoop = 0;
                                if (Password.Count() > 8)
                                {
                                    Password = Password.Remove(8); //Removes the extra characters
                                }
                                Password = Password + RandomStringGenerator.RandomString(3);
                                if (Password.Count() > 12)
                                {
                                    Password = Password.Remove(12); //Removes the extra characters
                                }
                                tempCount_passwordCheckLoop++;
                                if (tempCount_passwordCheckLoop < 5)
                                {
                                    goto usernameCheckLoop;
                                }
                                //Password = Password + RandomStringGenerator.RandomString(3);
                                Log("[ " + DateTime.Now + " ] => [ Please Create Accounts With Secure Password ]");
                                Log("[ " + DateTime.Now + " ] => [ Password is too obvious ]");
                                Log("[ " + DateTime.Now + " ] => [ Email : Password --> " + Email + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword + " ]");
                                goto usernameCheckLoop;
                                //return;
                            }
                            else if (AccountCreatePageSource.Contains("/sessions/destroy") && AccountCreatePageSource.Contains("/signup"))
                            {
                                lock (Lock_notCreatedaccounts)
                                {
                                    GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_FailedCreatedAccounts);
                                    GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password, Globals.path_FailedCreatedAccountsOnlyEmailPass);
                                }
                                NoOfNonCreatedAccounts++;
                                NoOfNonCreatedAccountsIP++;
                                Log("[ " + DateTime.Now + " ] => [ You can't do that right now. ]");
                                Log("[ " + DateTime.Now + " ] => [ Sorry, please try again later ]");
                                Log("[ " + DateTime.Now + " ] => [ and Change IP to create more accounts. ]");

                                Globals.EnquequeDataForSignUp(new object[] { emailData, username, name, IP });

                                return;
                            }
                            else
                            {
                                Globals.EnquequeDataForSignUp(new object[] { emailData, username, name, IP });
                                lock (Lock_notCreatedaccounts)
                                {
                                    GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_FailedCreatedAccounts);
                                    GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password, Globals.path_FailedCreatedAccountsOnlyEmailPass);
                                }
                                NoOfNonCreatedAccounts++;
                                Log("[ " + DateTime.Now + " ] => [ Couldn't create Account ]");
                                Log("[ " + DateTime.Now + " ] => [ Email : Password --> " + Email + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword + " ]");
                            }
                            //if (Created)
                            //{
                            //    Log("Going for Email Verification : " + Email);
                            //    Thread.Sleep(5000);

                            //    ClsEmailActivator EmailActivate = new ClsEmailActivator();
                            //    bool verified = EmailActivate.EmailVerification(Email.Replace(" ", ""), Password, ref globusHelper);
                            //    if (verified)
                            //    {
                            //        GlobusFileHelper.AppendStringToTextfileNewLine(emailData, Globals.path_SuccessfulCreatedAccounts);
                            //        Log("Account Verified : " + Email);
                            //    }
                            //    else
                            //    {
                            //        GlobusFileHelper.AppendStringToTextfileNewLine(emailData, Globals.path_NonEmailVerifiedAccounts);
                            //        Log("Account Couldn't be Email Verified : " + Email);
                            //    }
                            //}
                        }
                        else
                        {
                            NoOfNonCreatedAccounts++;

                            if (EmailCheck.Contains("Email has already been taken. An email can only be used on one Twitter account at a time"))
                            {
                                NoOfAlreadyCreatedAccounts++;
                                Log("[ " + DateTime.Now + " ] => [ " + Email + " : Email has already been taken. ]");
                                Log("[ " + DateTime.Now + " ] => [ An email can only be used on one Twitter account at a time ]");
                                GlobusFileHelper.AppendStringToTextfileNewLine(emailData.Replace("\0", ""), Globals.path_EmailAlreadyTaken);
                            }
                            else if (Usernamecheck.Contains("Username has already been taken"))
                            {
                                Log("[ " + DateTime.Now + " ] => [ " + username + " : Username has already been taken ]");
                                Globals.EnquequeDataForSignUp(new object[] { emailData, username, name, IP });
                            }
                            else if (EmailCheck.Contains("You cannot have a blank email address"))
                            {
                                Log("[ " + DateTime.Now + " ] => [ " + Email + " : You cannot have a blank email address ]");
                                Globals.EnquequeDataForSignUp(new object[] { emailData, username, name, IP });
                            }
                            else
                            {
                                ExportFailedAccounts(Email, Password, IPAddress, IPPort, IPUsername, IPpassword);
                                Globals.EnquequeDataForSignUp(new object[] { emailData, username, name, IP });
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        NoOfNonCreatedAccounts++;
                        lock (Lock_notCreatedaccounts)
                        {
                            GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_FailedCreatedAccounts);
                            GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password, Globals.path_FailedCreatedAccountsOnlyEmailPass);
                        }
                        GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- Posting data --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                        GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- Posting data >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);

                        Globals.EnquequeDataForSignUp(new object[] { emailData, username, name, IP });
                    }
                }
                catch (Exception ex)
                {
                    NoOfNonCreatedAccounts++;
                    lock (Lock_notCreatedaccounts)
                    {
                        GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_FailedCreatedAccounts);
                        GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password, Globals.path_FailedCreatedAccountsOnlyEmailPass);
                    }
                    //GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_FailedCreatedAccounts);
                    //Console.WriteLine("4 : " + ex.Message);
                    GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- SignupMultiThreaded Start --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                    GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- SignupMultiThreaded Start >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);

                    Globals.EnquequeDataForSignUp(new object[] { emailData, username, name, IP });
                }
                finally
                {
                    CountOfAccounts++;
                    if (CountOfAccounts >= TotalEmailUploaded)
                    {
                        Log("[ " + DateTime.Now + " ] => [ Account Creation Finished ]");
                        Log("[ " + DateTime.Now + " ] => [ No Of SuccessFully Created Accounts : " + NoOfSuccessfullyCreatedAccount + " ]");
                        Log("[ " + DateTime.Now + " ] => [ No Of Non Created Accounts : " + NoOfNonCreatedAccounts + " ]");
                    }

                    //Log("SuccessFully Created Accounts Count: " + NoOfSuccessfullyCreatedAccount);
                    //Log("Failed Accounts Count: " + NoOfNonCreatedAccounts);
                    //Log("Already Created Accounts Count: " + NoOfAlreadyCreatedAccounts);
                    //Log("Failed Proxies Count: " + NoOfNonCreatedAccountsIP);
                }
                
            }
            catch
            {
            }
        }
        public void Login()
        {
            try
            {
                Log("[ " + DateTime.Now + " ] => [ Logging in with Account : " + Username + " ]");

                string ts = GenerateTimeStamp();
                string get_twitter_first = string.Empty;
                try
                {
                    get_twitter_first = globusHttpHelper.getHtmlfromUrlIP(new Uri("https://twitter.com/"), IPAddress, IPPort, IPUsername, IPpassword, string.Empty, string.Empty);
                }
                catch (Exception ex)
                {
                    Thread.Sleep(1000);
                    get_twitter_first = globusHttpHelper.getHtmlfromUrlIP(new Uri("https://twitter.com/"), IPAddress, IPPort, IPUsername, IPpassword, string.Empty, string.Empty);
                }

                try
                {
                    postAuthenticityToken = PostAuthenticityToken(get_twitter_first, "postAuthenticityToken");
                }
                catch { }

                try
                {
                    string get_twitter_second = globusHttpHelper.postFormData(new Uri("https://twitter.com/scribe"), "log%5B%5D=%7B%22event_name%22%3A%22web%3Amobile_gallery%3Agallery%3A%3A%3Aimpression%22%2C%22noob_level%22%3Anull%2C%22internal_referer%22%3Anull%2C%22context%22%3A%22mobile_gallery%22%2C%22event_info%22%3A%22mobile_app_download%22%2C%22user_id%22%3A0%2C%22page%22%3A%22mobile_gallery%22%2C%22_category_%22%3A%22client_event%22%2C%22ts%22%3A" + ts + "%7D", "https://twitter.com/?lang=en&logged_out=1#!/download", "", "", "", "");//globusHttpHelper.getHtmlfromUrl(new Uri("https://twitter.com/account/bootstrap_data?r=0.21632839148912897"), "https://twitter.com/", string.Empty);

                    string get2nd = globusHttpHelper.getHtmlfromUrlIP(new Uri("http://twitter.com/account/bootstrap_data?r=0.21632839148912897"), "https://twitter.com/", IPAddress, IPPort, IPUsername, IPpassword);

                    string get_api = globusHttpHelper.getHtmlfromUrl(new Uri("http://api.twitter.com/receiver.html"), "https://twitter.com/", "");
                }
                catch { }

                string postData = "session%5Busername_or_email%5D=" + Uri.EscapeDataString(Username) + "&session%5Bpassword%5D=" + Uri.EscapeDataString(Password) + "&scribe_log=&redirect_after_login=&authenticity_token=" + postAuthenticityToken + "";

                string response_Login = globusHttpHelper.postFormData(new Uri("https://twitter.com/sessions"), postData, "https://twitter.com/", IPAddress, IPPort, IPUsername, IPpassword);

                if (response_Login.Contains("अपनी पहचान सत्यापित करें") || response_Login.Contains("आपके खाते को सुरक्षित रखेने में हमें मदद करें.") || response_Login.Contains("Help us keep your account safe.") || response_Login.Contains("Verify your identity"))
                {
                    try
                    {
                        string temp_user_id = string.Empty;
                        string challenge_id = string.Empty;
                        challenge_id = response_Login.Substring(response_Login.IndexOf("name=\"challenge_id\" value="), (response_Login.IndexOf("/>", response_Login.IndexOf("name=\"challenge_id\" value=")) - response_Login.IndexOf("name=\"challenge_id\" value="))).Replace("name=\"challenge_id\" value=", string.Empty).Replace("\"", "").Trim();
                        temp_user_id = response_Login.Substring(response_Login.IndexOf("name=\"user_id\" value="), (response_Login.IndexOf("/>", response_Login.IndexOf("name=\"user_id\" value=")) - response_Login.IndexOf("name=\"user_id\" value="))).Replace("name=\"user_id\" value=", string.Empty).Replace("\"", "").Trim();
                        if (response_Login.Contains(" name=\"challenge_type\" value=\"RetypeEmail") && response_Login.Contains("@"))
                        {
                            postData       = "authenticity_token=" + postAuthenticityToken + "&challenge_id=" + challenge_id + "&user_id=" + temp_user_id + "&challenge_type=RetypeEmail&platform=web&redirect_after_login=&remember_me=true&challenge_response=" + Screen_name;
                            response_Login = globusHttpHelper.postFormData(new Uri("https://twitter.com/account/login_challenge"), postData, "https://twitter.com/account/login_challenge?platform=web&user_id=" + temp_user_id + "&challenge_type=RetypeEmail&remember_me=true", IPAddress, IPPort, IPUsername, IPpassword);
                        }
                        else
                        {
                            postData       = "authenticity_token=" + postAuthenticityToken + "&challenge_id=" + challenge_id + "&user_id=" + temp_user_id + "&challenge_type=RetypeScreenName&platform=web&redirect_after_login=&remember_me=true&challenge_response=" + Screen_name;
                            response_Login = globusHttpHelper.postFormData(new Uri("https://twitter.com/account/login_challenge"), postData, "https://twitter.com/account/login_challenge?platform=web&user_id=" + temp_user_id + "&challenge_type=RetypeScreenName&remember_me=true", IPAddress, IPPort, IPUsername, IPpassword);
                        }
                    }
                    catch { }
                }

                if (response_Login.Contains("signout"))
                {
                    postAuthenticityToken = PostAuthenticityToken(response_Login, "postAuthenticityToken");

                    try
                    {
                        int startIndx = response_Login.IndexOf("data-user-id=\"") + "data-user-id=\"".Length;
                        int endIndx   = response_Login.IndexOf("\"", startIndx);
                        userID = response_Login.Substring(startIndx, endIndx - startIndx);
                    }
                    catch { }

                    if (string.IsNullOrEmpty(userID))
                    {
                        userID = string.Empty;
                        string[] useridarr = System.Text.RegularExpressions.Regex.Split(response_Login, "data-user-id=");
                        foreach (string useridarr_item in useridarr)
                        {
                            if (useridarr_item.Contains("data-screen-name="))
                            {
                                userID = useridarr_item.Substring(0 + 1, useridarr_item.IndexOf("data-screen-name=") - 3);
                                break;
                            }
                        }
                    }

                    string responseURI = globusHttpHelper.gResponse.ResponseUri.ToString().ToLower();

                    if (responseURI.Contains("error"))
                    {
                        //Log("[ " + DateTime.Now + " ] => [ Login Error with " + Username + " ]");
                        GlobusFileHelper.AppendStringToTextfileNewLine(Username + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_FailedLoginAccounts);
                        return;
                    }
                    else if (responseURI.Contains("captcha"))
                    {
                        Log("[ " + DateTime.Now + " ] => [ Asking Captcha with " + Username + " ]");
                        GlobusFileHelper.AppendStringToTextfileNewLine(Username + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_AskingCaptchaAccounts);
                        return;
                    }

                    IsLoggedIn = true;

                    Log("[ " + DateTime.Now + " ] => [ Logged in with Account : " + Username + " ]");
                    GetScreen_name();
                    GetFollowercount();
                    //clsDBQueryManager Db = new clsDBQueryManager();
                    //Db.InsertScreenNameFollower(Screen_name, FollowerCount, Username);
                }
                else
                {
                    IsLoggedIn = false;
                    Log("[ " + DateTime.Now + " ] => [ Logging failed from Account : " + Username + " ]");
                }
            }
            catch (Exception ex)
            {
                Log("[ " + DateTime.Now + " ] => [ Error in Login : "******" ]");
                GlobusFileHelper.AppendStringToTextfileNewLine(Username + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_FailedLoginAccounts);
                Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> Login() --> " + Username + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword + " --> " + ex.Message, Globals.Path_TweetAccountManager);
                return;
            }
        }
示例#3
0
        //Added By abhishek 

        public System.Collections.Specialized.NameValueCollection SignupManual(object parameters, GlobusHttpHelper globusHelper)
        {
            Array paramsArray = new object[4];
            paramsArray = (Array)parameters;

            System.Collections.Specialized.NameValueCollection nvc = new System.Collections.Specialized.NameValueCollection();

            string DBCUsername = BaseLib.Globals.DBCUsername;
            string DBCPAssword = BaseLib.Globals.DBCPassword;
            //GlobusHttpHelper globusHelper = new GlobusHttpHelper();


            string ImageURL = string.Empty;
            string authenticitytoken = string.Empty;
            string capcthavalue = string.Empty;



            string Email = string.Empty;//"*****@*****.**";
            string Password = string.Empty;//"1JESUS11";

            string IPAddress = string.Empty;
            string IPPort = string.Empty;
            string IPUsername = string.Empty;
            string IPpassword = string.Empty;

            string emailData = (string)paramsArray.GetValue(0);
            string username = (string)paramsArray.GetValue(1);
            string name = (string)paramsArray.GetValue(2);
            string IP = (string)paramsArray.GetValue(3);
            bool Created = true;

            try
            {

                int Count = emailData.Split(':').Length;
                if (Count == 1)
                {
                    Log("[ " + DateTime.Now + " ] => [ Uploaded Emails Not In correct Format ]");
                    Log("[ " + DateTime.Now + " ] => [ " + emailData + " ]");
                }
                if (Count == 2)
                {
                    Email = emailData.Split(':')[0].Replace("\0", "");
                    Password = emailData.Split(':')[1].Replace("\0", "");
                }
                else if (Count == 4)
                {
                    Email = emailData.Split(':')[0].Replace("\0", "");
                    Password = emailData.Split(':')[1].Replace("\0", "");
                    IPAddress = emailData.Split(':')[2];
                    IPPort = emailData.Split(':')[3];
                }
                else if (Count == 6)
                {
                    Email = emailData.Split(':')[0].Replace("\0", "");
                    Password = emailData.Split(':')[1].Replace("\0", "");
                    IPAddress = emailData.Split(':')[2];
                    IPPort = emailData.Split(':')[3];
                    IPUsername = emailData.Split(':')[4];
                    IPpassword = emailData.Split(':')[5];
                }
                else
                {
                    Log("[ " + DateTime.Now + " ] => [ Uploaded Emails Not In correct Format ]");
                    Log("[ " + DateTime.Now + " ] => [ " + emailData + " ]");
                }
            }
            catch (Exception ex)
            {
                Log(ex.Message); Console.WriteLine("8 :" + ex.StackTrace);
                GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- Email Pass --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- Email Pass >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
            }

            try
            {
                RaiseEvent_AddToDictionary(Email);
            }
            catch (Exception ex) { Console.WriteLine(ex.StackTrace); }

            try
            {
                if (IP.Split(':').Length == 4)
                {
                    IPAddress = IP.Split(':')[0];
                    IPPort = IP.Split(':')[1];
                    IPUsername = IP.Split(':')[2];
                    IPpassword = IP.Split(':')[3];
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("7 :" + ex.StackTrace);
                GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- IP Split --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- IP Split >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
            }

            string url = "https://twitter.com/users/email_available?suggest=1&username=&full_name=&email=" + Email.Replace("@", "%40").Replace(" ", "") + "&suggest_on_username=true&context=signup";
            string EmailCheck = globusHelper.getHtmlfromUrlIP(new Uri(url), IPAddress, IPPort, IPUsername, IPpassword, "https://twitter.com/signup", "");
            if (EmailCheck.Contains("\"taken\":true"))
            {
                Log("[ " + DateTime.Now + " ] => [ Email : " + Email + " has already been taken. An email can only be used on one Twitter account at a time ]");
                Created = false;
                GlobusFileHelper.AppendStringToTextfileNewLine(emailData.Replace("\0", ""), Globals.path_EmailAlreadyTaken);
                nvc.Clear();
                return nvc;
            }


            //Get User name .....
            try
            {
                username = username.Replace("\0", "");
                Password = Password.Replace("\0", "");
                if (!(username.Count() < 15 || Password.Count() > 6))
                {
                    if (username.Count() > 15)
                    {
                        Log("[ " + DateTime.Now + " ] => [ Username Must Not be greater than 15 character ]");
                        username = username.Remove(13); //Removes the extra characters
                    }
                    else if (Password.Count() < 6)
                    {
                        Log("[ " + DateTime.Now + " ] => [ Password Must Not be less than 6 char ]");
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("6 :" + ex.StackTrace);
                GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- Check Username --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- Check Username >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
            }



            Random randm = new Random();
            double cachestop = randm.NextDouble();
            string pagesource2 = string.Empty;
            string textUrl = string.Empty;


            try
            {
                textUrl = globusHelper.getHtmlfromUrlIP(new Uri("https://twitter.com/signup"), IPAddress, IPPort, IPUsername, IPpassword, "", "");
                string pagesource1 = globusHelper.getHtmlfromUrlIP(new Uri("https://www.google.com/recaptcha/api/js/recaptcha_ajax.js"), IPAddress, IPPort, IPUsername, IPpassword, "", "");
                pagesource2 = globusHelper.getHtmlfromUrlIP(new Uri("https://www.google.com/recaptcha/api/challenge?k=6LfbTAAAAAAAAE0hk8Vnfd1THHnn9lJuow6fgulO&ajax=1&cachestop=" + cachestop + "&lang=en"), IPAddress, IPPort, IPUsername, IPpassword, "", "");
            }
            catch (Exception ex)
            {
                Console.WriteLine("5 :" + ex.StackTrace);
                GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- Getting Signup PageSource --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- Getting Signup PageSource >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
            }



            try
            {
                int IndexStart = pagesource2.IndexOf("challenge :");
                if (IndexStart > 0)
                {
                    string Start = pagesource2.Substring(IndexStart);
                    int IndexEnd = Start.IndexOf("',");
                    string End = Start.Substring(0, IndexEnd).Replace("challenge :", "").Replace("'", "").Replace(" ", "");
                    capcthavalue = End;
                    ImageURL = "https://www.google.com/recaptcha/api/image?c=" + End;
                }
                else
                {
                    Log("[ " + DateTime.Now + " ] => [ Cannot Find challenge Captcha on Page. Email : Password --> " + Email + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword + " ]");
                    GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.Path_CaptchaRequired);
                    nvc.Clear();
                    return nvc;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("1 :" + ex.StackTrace);
                GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- Getting Image Url --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- Getting Image Url >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
            }


            WebClient webclient = new WebClient();
            try
            {
                int intIPPort = 80;
                if (!string.IsNullOrEmpty(IPPort) && GlobusRegex.ValidateNumber(IPPort))
                {
                    intIPPort = int.Parse(IPPort);
                }
                ChangeIP_WebClient(IPAddress, intIPPort, IPUsername, IPpassword, ref webclient);
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- ChangeIP_WebClient() --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- ChangeIP_WebClient() >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
            }

            try
            {
                int StartIndex = textUrl.IndexOf("phx-signup-form");
                if (StartIndex > 0)
                {
                    string Start = textUrl.Substring(StartIndex);
                    int EndIndex = Start.IndexOf("name=\"authenticity_token");
                    string End = Start.Substring(0, EndIndex).Replace("phx-signup-form", "").Replace("method=\"POST\"", "").Replace("action=\"https://twitter.com/account/create\"", "");
                    authenticitytoken = End.Replace("class=\"\">", "").Replace("<input type=\"hidden\"", "").Replace("class=\"\">", "").Replace("value=\"", "").Replace("\n", "").Replace("\"", "").Replace(" ", "");
                }
                else
                {
                    Log("[ " + DateTime.Now + " ] => [ Cannot find Authenticity Token On Page ]");
                    nvc.Clear();
                    return nvc;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("2 :" + ex.StackTrace);
                GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- Getting Authenticity --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- Getting Authenticity >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
            }


            string postData_SignUp = "user%5Bname%5D=" + username + "&user%5Bemail%5D=" + Email + "&user%5Buser_password%5D=" + Password + "&context=front&authenticity_token=" + authenticitytoken + "";
            string res_PostSignUp = globusHelper.postFormData(new Uri("https://twitter.com/signup"), postData_SignUp, "", "", "", "", "");

            int tempCount_usernameCheckLoop = 0;
        usernameCheckLoop:
            int tempCount_passwordCheckLoop = 0;

            if (username.Contains(" "))
            {
                username = username.Replace(" ", "_");
            }

            string headr = globusHelper.gResponse.Headers.ToString();
            string Usernamecheck = globusHelper.getHtmlfromUrlIP(new Uri("https://twitter.com/users/username_available?suggest=1&username="******"&full_name=" + name + "&email=&suggest_on_username=true&context=signup"), IPAddress, IPPort, IPUsername, IPpassword, "https://twitter.com/signup", "");

            //if (EmailCheck.Contains("\"taken\":true")
            //    || res_PostSignUp.Contains("You already have an account with this username and password"))
            //{
            //    Log("Email : " + Email + " has already been taken. An email can only be used on one Twitter account at a time");
            //    Created = false;
            //    GlobusFileHelper.AppendStringToTextfileNewLine(emailData.Replace("\0", ""), Globals.path_EmailAlreadyTaken);
            //}
            //else 
            if (Usernamecheck.Contains("Username has already been taken"))
            {
                //Created = false;
                Log("[ " + DateTime.Now + " ] => [ Username : "******" has already been taken ]");
                if (username.Count() > 12)
                {
                    username = username.Remove(8); //Removes the extra characters
                }

                if (UsernameType == "String")
                {
                    Log("[ " + DateTime.Now + " ] => [ Adding String To Username ]");
                    username = username + RandomStringGenerator.RandomString(5);
                }
                else if (UsernameType == "Numbers")
                {
                    Log("[ " + DateTime.Now + " ] => [ Adding Numbers To Username ]");
                    username = username + RandomStringGenerator.RandomNumber(5);
                }
                else
                {
                    Log("[ " + DateTime.Now + " ] => [ Adding Strings & Numbers To Username ]");
                    username = username + RandomStringGenerator.RandomStringAndNumber(5);
                    Log("[ " + DateTime.Now + " ] => [ New user name :- " + username + " ]");
                }

                if (username.Count() > 15)
                {
                    username = username.Remove(13); //Removes the extra characters
                }
                tempCount_usernameCheckLoop++;
                if (tempCount_usernameCheckLoop < 5)
                {
                    goto usernameCheckLoop;
                }
            }
            else if (EmailCheck.Contains("You cannot have a blank email address"))
            {
                Log("[ " + DateTime.Now + " ] => [ Email Address is Blank ]");
                Created = false;
            }


            if (Created)
            {
                nvc.Add("Email", Email);
                nvc.Add("username", username);
                nvc.Add("name", name);
                nvc.Add("Password", Password);
                nvc.Add("authenticitytoken", authenticitytoken);
                nvc.Add("IPAddress", IPAddress);
                nvc.Add("IPpassword", IPpassword);
                nvc.Add("IPPort", IPPort);
                nvc.Add("IPUsername", IPUsername);
                nvc.Add("IPpassword", IPpassword);
                nvc.Add("capcthavalue", capcthavalue);
                nvc.Add("ImageURL", ImageURL);
                //nvc.Add("globusHelper", globusHelper);
            }

            return nvc;
        }
示例#4
0
        private void btnTestPublicIP_Click(object sender, EventArgs e)
        {
            CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable();

            if (CheckNetConn)
            {
                try
                {
                    workingproxiesCount = 0;
                    AddToIPsLogs("[ " + DateTime.Now + " ] => [ Existing Proxies Saved To : ]");
                    AddToIPsLogs("[ " + DateTime.Now + " ] => [ " + Globals.Path_ExsistingProxies + " ]");
                    List<string> lstProxies = new List<string>();
                    if (chkboxUseUrlIP.Checked && !string.IsNullOrEmpty(txtIPUrl.Text))
                    {
                        GlobusHttpHelper HttpHelper = new GlobusHttpHelper();
                        string pageSource = HttpHelper.getHtmlfromUrlIP(new Uri(txtIPUrl.Text), "", "", "", "", "");
                        string[] array = Regex.Split(pageSource, "\n");
                        foreach (string item in array)
                        {
                            string IP = item.Replace("\r", "");
                            lstProxies.Add(item);
                        }
                    }
                    else if (!string.IsNullOrEmpty(txtPublicIP.Text.Trim()))
                    {
                        lstProxies = GlobusFileHelper.ReadFiletoStringList(txtPublicIP.Text);
                    }
                    else
                    {
                        AddToIPsLogs("[ " + DateTime.Now + " ] => [ Please Upload Either Url or Load IP Files ]");
                        return;
                    }
                    //lstProxies = Globussoft.GlobusFileHelper.ReadFiletoStringList(txtPublicIP.Text);
                    AddToIPsLogs("[ " + DateTime.Now + " ] => [ " + lstProxies.Count() + " Public Proxies Uploaded ]");
                    new Thread(() =>
                    {
                        GetValidProxies(lstProxies);
                    }).Start();
                }
                catch (Exception)
                {

                }
            }
            else
            {
                MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection...");
                AddToIPsLogs("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]");
            }
        }
示例#5
0
        private void ThreadMethod_CheckEmails(object parameters)
        {
            try
            {
                Array paramsArray = new object[2];
                paramsArray = (Array)parameters;

                string Email = string.Empty;//"*****@*****.**";

                string IPAddress = string.Empty;
                string IPPort = string.Empty;
                string IPUsername = string.Empty;
                string IPpassword = string.Empty;

                string emailData = (string)paramsArray.GetValue(0);
                string IP = (string)paramsArray.GetValue(1);

                Email = emailData.Split(':')[0];

                if (!string.IsNullOrEmpty(IP))
                {
                    try
                    {
                        string[] IPData = IP.Split(':');
                        if (IPData.Count() == 2)
                        {
                            IPAddress = IPData[0];
                            IPPort = IPData[1];
                        }
                        if (IPData.Count() == 4)
                        {
                            IPAddress = IPData[0];
                            IPPort = IPData[1];
                            IPUsername = IPData[2];
                            IPpassword = IPData[3];
                        }
                    }
                    catch (Exception)
                    {
                    }
                }
                GlobusHttpHelper gHttpHelpr = new GlobusHttpHelper();

                string res_MainPage = gHttpHelpr.getHtmlfromUrlIP(new Uri("https://twitter.com/account/resend_password"), "", IPAddress, IPPort, IPUsername, IPpassword);

                string postAuthenticityToken = TweetAccountManager.PostAuthenticityToken(res_MainPage, "postAuthenticityToken");

                string postData = "authenticity_token=" + postAuthenticityToken + "&email_or_phone=" + Uri.EscapeDataString(Email) + "&screen_name=";

                string postResponse = gHttpHelpr.postFormData(new Uri("https://twitter.com/account/resend_password"), postData, "", "", "", "", "");

                string responseURL = gHttpHelpr.gResponse.ResponseUri.AbsoluteUri;

                responseURL = responseURL.ToLower();

                //if (responseURL.Contains(DateTime.Now + " twitter.com/account/password_reset_sent ]"))
                if (responseURL.Contains("twitter.com/account/password_reset_sent"))
                {
                    //has account
                    GlobusFileHelper.AppendStringToTextfileNewLine(Email, Globals.path_DesktopFolder + "\\ExistingEmail_EmailChecker.txt");
                    AddToListAccountsLogs("[ " + DateTime.Now + " ] => [ Existing Email : " + Email + " ]");
                }
                else if (responseURL.Contains("captcha") || responseURL.Contains("security"))
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine(Email, Globals.path_DesktopFolder + "\\AskingSecurityEmail_EmailChecker.txt");
                    AddToListAccountsLogs("[ " + DateTime.Now + " ] => [ Asking Security with Email : " + Email + " ]");
                }
                else if (responseURL.Contains("twitter.com/account/resend_password") && postResponse.Contains("robots"))
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine(Email, Globals.path_DesktopFolder + "\\TemporarilyLocked_EmailChecker.txt");
                    AddToListAccountsLogs("[ " + DateTime.Now + " ] => [ We've temporarily locked your ability to reset passwords. Please chillax for a few, then try again. : " + Email + " ]");
                }
                else if (postResponse.Contains("प्रतीत होता है की आपने एक अबैध ईमेल पता या फ़ोन नंबर भरा है. कृपया पुनः प्रयास करें.") || postResponse.Contains("It looks like you entered an invalid email address or phone number. Please try again."))
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine(Email, Globals.path_DesktopFolder + "\\TemporarilyLocked_EmailChecker.txt");
                    AddToListAccountsLogs("[ " + DateTime.Now + " ] => [ invalid email address: " + Email + " ]");
                }
                else
                {
                    //no account
                    GlobusFileHelper.AppendStringToTextfileNewLine(Email, Globals.path_DesktopFolder + "\\NonExistingEmail_EmailChecker.txt");
                    AddToListAccountsLogs("[ " + DateTime.Now + " ] => [ NON Existing Email : " + Email + " ]");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
        }
示例#6
0
        public void AccountCreator(object objemailpass)
        {
            try
            {
                string emailData = (string)objemailpass;

                //emailData = "[email protected]:vAq8YqxSad";

                string[] arr = Regex.Split(emailData, ":");
                string email = string.Empty;
                string pass = string.Empty;

                string IPAddress = string.Empty;
                string IPPort = string.Empty;
                string IPUsername = string.Empty;
                string IPpassword = string.Empty;

                string username = string.Empty;
                string name = string.Empty;
                string mobileagent = string.Empty;
                string capcthaResponse = "";
                string capcthaChallenge = "";
                string Tweet = "";
                string URl = "";
                string Location = "";
                string Bio = "";

                string IPItem = string.Empty;

                GlobusHttpHelper HttpHelper = new GlobusHttpHelper();

                lock (lockr_queueRunningProxies_Mobile)
                {
                    if (qRunningIP_Mobile.Count > 0)
                    {
                        try
                        {
                            IPItem = qRunningIP_Mobile.Dequeue();
                        }
                        catch
                        {
                        }
                    }
                    else
                    {
                        CheckAndFillIPInQueue();
                    }
                }

                if (arr.Length == 2)
                {
                    email = arr[0];
                    pass = arr[1];
                    AddToMobileLogs("[ " + DateTime.Now + " ] => [ Starting Email : " + email + " ]");
                }
                if (arr.Length == 1)
                {
                    return;
                }
                if (arr.Length == 2)
                {
                    email = emailData.Split(':')[0].Replace("\0", "");
                    pass = emailData.Split(':')[1].Replace("\0", "");
                }
                else if (arr.Length == 4)
                {
                    email = emailData.Split(':')[0].Replace("\0", "");
                    pass = emailData.Split(':')[1].Replace("\0", "");
                    IPAddress = emailData.Split(':')[2];
                    IPPort = emailData.Split(':')[3];
                }
                else if (arr.Length == 6)
                {
                    email = emailData.Split(':')[0].Replace("\0", "");
                    pass = emailData.Split(':')[1].Replace("\0", "");
                    IPAddress = emailData.Split(':')[2];
                    IPPort = emailData.Split(':')[3];
                    IPUsername = emailData.Split(':')[4];
                    IPpassword = emailData.Split(':')[5];
                }
                else
                {
                    AddToMobileLogs("[ " + DateTime.Now + " ] => [ " + emailData + " Not In correct Format ]");
                    return;
                }


                if (!string.IsNullOrEmpty(IPItem))
                {
                    try
                    {
                        IPAddress = IPItem.Split(':')[0];
                        IPPort = IPItem.Split(':')[1];
                        IPUsername = IPItem.Split(':')[2];
                        IPpassword = IPItem.Split(':')[3];
                    }
                    catch
                    {
                    }
                }


                if (CountUsername >= lstMobUsername.Count)
                {
                    CountUsername = 0;
                }
                username = lstMobUsername[CountUsername];
                CountUsername++;


                if (CountName >= lstMobName.Count)
                {
                    CountName = 0;
                }
                name = lstMobName[CountName];
                CountName++;

                if (CountMobAgent >= lstMobUserAgent.Count)
                {
                    CountMobAgent = 0;
                }
                mobileagent = lstMobUserAgent[CountMobAgent];
                CountMobAgent++;

                if (CountTweet >= lstMobTweet.Count)
                {
                    CountTweet = 0;
                }
                Tweet = lstMobTweet[CountTweet];
                CountTweet++;


                if (CountUrl >= lstMobUrl.Count)
                {
                    CountUrl = 0;
                }
                URl = lstMobUrl[CountUrl];
                CountUrl++;

                if (CountLocation >= lstMobLocation.Count)
                {
                    CountUrl = 0;
                }
                Location = lstMobLocation[CountLocation];
                CountUrl++;

                if (CountBio >= lstMobBio.Count)
                {
                    CountBio = 0;
                }
                Bio = lstMobBio[CountBio];
                CountBio++;



                int tempCount_usernameCheckLoop = 0;
            usernameCheckLoop:
                string url1 = "https://twitter.com/users/email_available?suggest=1&username=&full_name=&email=" + Uri.EscapeDataString(email.Replace(" ", "")) + "&suggest_on_username=true&context=signup";
                string EmailCheck = HttpHelper.getHtmlfromUrlIP(new Uri(url1), IPAddress, IPPort, IPUsername, IPpassword, "https://twitter.com/signup,", "", mobileagent);
                string Usernamecheck = HttpHelper.getHtmlfromUrlIP(new Uri("https://twitter.com/users/username_available?suggest=1&username="******"&full_name=" + name + "&email=&suggest_on_username=true&context=signup"), IPAddress, IPPort, IPUsername, IPpassword, "https://twitter.com/signup,", "", mobileagent);

                if (EmailCheck.Contains("Email has already been taken. An email can only be used on one Twitter account at a time"))
                {
                    AddToMobileLogs("[ " + DateTime.Now + " ] => [ Email : " + email + " has already been taken. An email can only be used on one Twitter account at a time ]");
                    return;
                }
                else if (Usernamecheck.Contains("Username has already been taken"))
                {
                    //Created = false;
                    AddToMobileLogs("[ " + DateTime.Now + " ] => [ Username : "******" has already been taken ]");
                    if (username.Count() > 12)
                    {
                        username = username.Remove(8); //Removes the extra characters
                    }

                    if (username.Count() > 15)
                    {
                        username = username.Remove(13); //Removes the extra characters
                    }

                    username = username + RandomStringGenerator.RandomStringAndNumber(5);

                    tempCount_usernameCheckLoop++;
                    if (tempCount_usernameCheckLoop < 5)
                    {
                        goto usernameCheckLoop;
                    }
                }
                else if (EmailCheck.Contains("You cannot have a blank email address"))
                {
                    AddToMobileLogs("[ " + DateTime.Now + " ] => [ You cannot have a blank email address ]");
                }
                AddToMobileLogs("[ " + DateTime.Now + " ] => [ Redirecting To Twitter Signup ]");
                string url = "https://mobile.twitter.com/signup";

                string pagesource1 = HttpHelper.getHtmlfromUrlIP(new Uri(url), IPAddress, IPPort, IPUsername, IPpassword, "https://twitter.com/signup,", "", mobileagent);

                string authenticity_token = string.Empty;
                AddToMobileLogs("[ " + DateTime.Now + " ] => [ Getting Captcha Chanllenge ]");

                capcthaChallenge = GetCaptchaMobSrc(capcthaChallenge, pagesource1);

                int tempCaptchaCounter = 0;

            getCaptcha:


                AddToMobileLogs("[ " + DateTime.Now + " ] => [ Getting Authenticity Token ]");

                try
                {
                    int startindex = pagesource1.IndexOf("authenticity_token");
                    string start = pagesource1.Substring(startindex);
                    int endindex = start.IndexOf("\" />");
                    string end = start.Substring(0, endindex).Replace("authenticity_token\" type=\"hidden\" value=\"", "");
                    authenticity_token = end;
                }
                catch (Exception ex)
                {
                    Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> AccountCreator() --> Authenticity token --> " + ex.Message, Globals.Path_ScrapeUsersErroLog);
                }

                #region Captcha Solving

                AddToMobileLogs("[ " + DateTime.Now + " ] => [ Download Captcha Image ]");

                WebClient webclient = new WebClient();
                byte[] args = webclient.DownloadData(capcthaChallenge);
                string[] arr1 = new string[] { BaseLib.Globals.DBCUsername, BaseLib.Globals.DBCPassword, "" };
                AddToMobileLogs("[ " + DateTime.Now + " ] => [ Getting Captcha Response ]");

                DeathByCaptcha.Client clnt = null;
                DeathByCaptcha.Captcha captcha = null;

                capcthaResponse = DecodeDBC(arr1, args, out clnt, out captcha);

                if (string.IsNullOrEmpty(capcthaResponse))
                {
                    Thread.Sleep(1000);
                    capcthaResponse = DecodeDBC(arr1, args, out clnt, out captcha);

                    if (string.IsNullOrEmpty(capcthaResponse))
                    {
                        AddToMobileLogs("[ " + DateTime.Now + " ] => [ Empty Captcha Returned from Decaptcher ]");

                        // Report an incorrectly solved CAPTCHA.
                        // Make sure the CAPTCHA was in fact incorrectly solved, do not
                        // just report it at random, or you might be banned as abuser.
                        if (captcha != null)
                        {
                            if (clnt.Report(captcha))
                            {
                                Console.WriteLine("Reported as incorrectly solved");
                            }
                            else
                            {
                                Console.WriteLine("Failed reporting as incorrectly solved");
                            }
                        }
                        else
                        {
                            AddToMobileLogs("[ " + DateTime.Now + " ] => [ Captcha Null ]");
                        }
                    }
                }

                #endregion

                string postdata = "authenticity_token=" + authenticity_token + "&oauth_signup_client%5Bfullname%5D=" + username + "&oauth_signup_client%5Bphone_number%5D=" + email.Split('@')[0].Replace("+", "%2B") + "%40" + email.Split('@')[1] + "&oauth_signup_client%5Bpassword%5D=" + pass + "&captcha_response_field=" + capcthaResponse + "&captcha_method=2&captcha_challenge_field=" + capcthaChallenge.Replace("https://mobile.twitter.com/signup/captcha/", "").Replace(".gif", "") + "&commit=Sign+up+for+Twitter";
                string pagfinal = HttpHelper.postFormDataMobileData(new Uri("https://mobile.twitter.com/signup"), postdata, "https://mobile.twitter.com/signup", "", "", "", "", mobileagent);
                string pagfinal2 = HttpHelper.getHtmlfromUrlMobile(new Uri("http://mobile.twitter.com/home"), "https://mobile.twitter.com/signup", "", mobileagent);
                #region Tweet

                bool temp_IsCreated = false;

                if (pagfinal.Contains("signout") || pagfinal.Contains("https://mobile.twitter.com/signup/screen_name") || pagfinal.Contains("/signup/screen_name") || !pagfinal2.Contains("http://mobile.twitter.com/welcome/interests"))
                {
                    if (pagfinal.Contains("https://mobile.twitter.com/signup/screen_name"))
                    {
                        string screenName = GlobusHttpHelper.GetParamValue(pagfinal, "settings[screen_name]");
                        string secondPostData = "authenticity_token=" + authenticity_token + "&suggestion=0%3A&settings%5Bscreen_name%5D=" + screenName + "&commit=Continue";
                        string res_secondPost = HttpHelper.postFormDataMobileData(new Uri("https://mobile.twitter.com/signup/screen_name "), secondPostData, "https://mobile.twitter.com/signup/screen_name", "", "", "", "", mobileagent);
                    }

                    AddToMobileLogs("[ " + DateTime.Now + " ] => [ Account Created : " + email + " ]");
                    GlobusFileHelper.AppendStringToTextfileNewLine(email + ":" + pass + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, BaseLib.Globals.Path_MobEmailCreator);
                    int counter_profile = 0;
                profilling:
                    string pageProfileData = HttpHelper.getHtmlfromUrl(new Uri("https://mobile.twitter.com/settings/profile"), "https://mobile.twitter.com/account", "");
                    string postdataProfile = "authenticity_token=" + authenticity_token + "&settings%5Bfullname%5D=" + name + "&settings%5Burl%5D=" + url + "&settings%5Blocation%5D=" + Location + "&settings%5Bdescription%5D=" + Bio + "&commit=Save";
                    string postProfileData = HttpHelper.postFormDataMobileData(new Uri("https://mobile.twitter.com/settings/profile"), postdataProfile, "https://mobile.twitter.com/settings/profile", "", "", "", "", mobileagent);
                    pageProfileData = HttpHelper.getHtmlfromUrl(new Uri("https://mobile.twitter.com/settings/profile"), "https://mobile.twitter.com/account", "");
                    string PostUrl = GlobusHttpHelper.GetParamValue(pageProfileData, "settings[url]");
                    if (!string.IsNullOrEmpty(PostUrl))
                    {
                        AddToMobileLogs("[ " + DateTime.Now + " ] => [ Account :" + email + " Profiled ]");
                        GlobusFileHelper.AppendStringToTextfileNewLine(email + ":" + pass, BaseLib.Globals.Path_MobEmailProfiled);
                    }
                    else
                    {
                        if (counter_profile <= 5)
                        {
                            Thread.Sleep(5000);
                            AddToMobileLogs("[ " + DateTime.Now + " ] => [ Trying Profiling Once Again for Account : " + email + " ]");
                            counter_profile++;
                            goto profilling;

                        }
                        AddToMobileLogs("[ " + DateTime.Now + " ] => [ Account :" + email + " Not Profiled ]");
                        GlobusFileHelper.AppendStringToTextfileNewLine(email + ":" + pass, BaseLib.Globals.Path_NotMobEmailProfiled);
                    }


                    string pagesource3 = HttpHelper.getHtmlfromUrlIP(new Uri("https://mobile.twitter.com/compose/tweet"), IPAddress, IPPort, IPUsername, IPpassword, "https://mobile.twitter.com/compose/tweet", "", mobileagent);
                    string TweetPost = "authenticity_token=" + authenticity_token + "&tweet%5Btext%5D=" + Uri.EscapeDataString(Tweet) + "&commit=Tweet";
                    string pagesourcepost = HttpHelper.postFormDataMobileData(new Uri("https://mobile.twitter.com/"), TweetPost, "https://mobile.twitter.com/compose/tweet", "", "", "", "", mobileagent);
                    string secondpagesourcepost = HttpHelper.getHtmlfromUrl(new Uri("https://mobile.twitter.com/"), "https://mobile.twitter.com/", "", mobileagent);

                    if (pagesourcepost.Contains("Tweet sent!") || secondpagesourcepost.Contains("Tweet sent!") || pagesourcepost.Contains(Tweet))
                    {
                        AddToMobileLogs("[ " + DateTime.Now + " ] => [ Tweeted " + Tweet + " From " + email + " ]");
                        GlobusFileHelper.AppendStringToTextfileNewLine(email + ":" + Tweet, BaseLib.Globals.Path_MobTweeted);
                    }
                    else if (secondpagesourcepost.Contains("Whoops! You already tweeted that") || pagesourcepost.Contains("Whoops! You already tweeted that…"))
                    {
                        AddToMobileLogs("[ " + DateTime.Now + " ] => [ You Already Tweeted " + Tweet + " From " + email + " ]");
                        GlobusFileHelper.AppendStringToTextfileNewLine(email + ":" + Tweet, BaseLib.Globals.Path_NotMobEmailTweeted);
                    }
                    else
                    {
                        AddToMobileLogs("[ " + DateTime.Now + " ] => [ Not Tweeted " + Tweet + " From " + email + " ]");
                        GlobusFileHelper.AppendStringToTextfileNewLine(email + ":" + Tweet, BaseLib.Globals.Path_NotMobEmailTweeted);
                    }
                    temp_IsCreated = true;
                    return;
                }
                else if (pagfinal.Contains("Redirecting to: <a href=\"https://mobile.twitter.com/signup/screen_name"))
                {
                    Thread.Sleep(300);
                    pagfinal = HttpHelper.getHtmlfromUrlIP(new Uri("https://mobile.twitter.com/signup/screen_name"), IPAddress, IPPort, IPUsername, IPpassword, "https://mobile.twitter.com/compose/tweet", "", mobileagent);
                }
                else if (pagfinal.Contains("captcha invalid-field invalid-captcha-response-field")) //wrong captcha
                {
                    tempCaptchaCounter++;
                    AddToMobileLogs("[ " + DateTime.Now + " ] => [ Wrong Captcha : " + email + " ]");

                    // Report an incorrectly solved CAPTCHA.
                    // Make sure the CAPTCHA was in fact incorrectly solved, do not
                    // just report it at random, or you might be banned as abuser.
                    if (captcha != null)
                    {
                        if (clnt.Report(captcha))
                        {
                            Console.WriteLine("Reported as incorrectly solved");
                        }
                        else
                        {
                            Console.WriteLine("Failed reporting as incorrectly solved");
                        }
                    }

                    if (tempCaptchaCounter <= 3)
                    {
                        capcthaChallenge = GetCaptchaMobSrc("", pagfinal);
                        goto getCaptcha;
                    }
                }

                if (pagfinal.Contains("settings[screen_name]") && !temp_IsCreated)
                {
                    string screenName = GlobusHttpHelper.GetParamValue(pagfinal, "settings[screen_name]");

                    string secondPostData = "authenticity_token=" + authenticity_token + "&suggestion=0%3A&settings%5Bscreen_name%5D=" + screenName + "&commit=Continue";
                    string res_secondPost = HttpHelper.postFormDataMobileData(new Uri("https://mobile.twitter.com/signup/screen_name "), secondPostData, "https://mobile.twitter.com/signup/screen_name", "", "", "", "", mobileagent);

                    #region Profile and tweet

                    AddToMobileLogs("[ " + DateTime.Now + " ] => [ Account Created : " + email + " ]");
                    GlobusFileHelper.AppendStringToTextfileNewLine(email + ":" + pass + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, BaseLib.Globals.Path_MobEmailCreator);
                    int counter_profile = 0;
                profilling:
                    string pageProfileData = HttpHelper.getHtmlfromUrl(new Uri("https://mobile.twitter.com/settings/profile"), "https://mobile.twitter.com/account", "");
                    string postdataProfile = "authenticity_token=" + authenticity_token + "&settings%5Bfullname%5D=" + name + "&settings%5Burl%5D=" + url + "&settings%5Blocation%5D=" + Location + "&settings%5Bdescription%5D=" + Bio + "&commit=Save";
                    string postProfileData = HttpHelper.postFormDataMobileData(new Uri("https://mobile.twitter.com/settings/profile"), postdataProfile, "https://mobile.twitter.com/settings/profile", "", "", "", "", mobileagent);
                    pageProfileData = HttpHelper.getHtmlfromUrl(new Uri("https://mobile.twitter.com/settings/profile"), "https://mobile.twitter.com/account", "");
                    string PostUrl = GlobusHttpHelper.GetParamValue(pageProfileData, "settings[url]");
                    if (!string.IsNullOrEmpty(PostUrl))
                    {
                        AddToMobileLogs("[ " + DateTime.Now + " ] => [ Account :" + email + " Profiled ]");
                        GlobusFileHelper.AppendStringToTextfileNewLine(email + ":" + pass, BaseLib.Globals.Path_MobEmailProfiled);
                    }
                    else
                    {
                        if (counter_profile <= 5)
                        {
                            Thread.Sleep(5000);
                            AddToMobileLogs("[ " + DateTime.Now + " ] => [ Trying Profiling Once Again for Account : " + email + " ]");
                            counter_profile++;
                            goto profilling;

                        }

                        AddToMobileLogs("[ " + DateTime.Now + " ] => [ Account :" + email + " Not Profiled ]");
                        GlobusFileHelper.AppendStringToTextfileNewLine(email + ":" + pass, BaseLib.Globals.Path_NotMobEmailProfiled);
                    }

                    string pagesource3 = HttpHelper.getHtmlfromUrlIP(new Uri("https://mobile.twitter.com/compose/tweet"), IPAddress, IPPort, IPUsername, IPpassword, "https://mobile.twitter.com/compose/tweet", "", mobileagent);
                    string TweetPost = "authenticity_token=" + authenticity_token + "&tweet%5Btext%5D=" + Uri.EscapeDataString(Tweet) + "&commit=Tweet";
                    string pagesourcepost = HttpHelper.postFormDataMobileData(new Uri("https://mobile.twitter.com/"), TweetPost, "https://mobile.twitter.com/compose/tweet", "", "", "", "", mobileagent);
                    string secondpagesourcepost = HttpHelper.getHtmlfromUrl(new Uri("https://mobile.twitter.com/"), "https://mobile.twitter.com/", "", mobileagent);
                    if (pagesourcepost.Contains("Tweet sent!") || secondpagesourcepost.Contains("Tweet sent!") || pagesourcepost.Contains(Tweet))
                    {
                        AddToMobileLogs("[ " + DateTime.Now + " ] => [ Tweeted " + Tweet + " From " + email + " ]");
                        GlobusFileHelper.AppendStringToTextfileNewLine(email + ":" + Tweet, BaseLib.Globals.Path_MobTweeted);
                    }
                    else if (secondpagesourcepost.Contains("Whoops! You already tweeted that") || pagesourcepost.Contains("Whoops! You already tweeted that"))
                    {
                        AddToMobileLogs("[ " + DateTime.Now + " ] => [ You Already Tweeted " + Tweet + " From " + email + " ]");
                        GlobusFileHelper.AppendStringToTextfileNewLine(email + ":" + Tweet, BaseLib.Globals.Path_NotMobEmailTweeted);
                    }
                    else
                    {
                        AddToMobileLogs("[ " + DateTime.Now + " ] => [ Not Tweeted " + Tweet + " From " + email + " ]");
                        GlobusFileHelper.AppendStringToTextfileNewLine(email + ":" + Tweet, BaseLib.Globals.Path_NotMobEmailTweeted);
                    }
                    #endregion
                }
                else
                {
                    AddToMobileLogs("[ " + DateTime.Now + " ] => [ Account Not Created : " + email + " ]");
                    GlobusFileHelper.AppendStringToTextfileNewLine(email + ":" + pass, BaseLib.Globals.Path_NotMobEmailCreator);
                }
                #endregion
            }
            catch (Exception ex)
            {
                if (ex.Message == "Unable to connect to remote server")
                {
                    //AddToMobileLogs(ex.Message);
                }
                Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> AccountCreator() --> " + ex.Message, Globals.Path_ScrapeUsersErroLog);
            }
            finally
            {
                counter++;
                if (AccountCounter == counter)
                {
                    MessageBox.Show("Finished Account Creation");
                }
            }
        }
示例#7
0
        private void chkboxImportPublicIP_CheckedChanged(object sender, EventArgs e)
        {
            try
            {
                if (chkboxImportPublicIP.Checked)
                {
                    if (chkboxUseUrlIP.Checked && !string.IsNullOrEmpty(txtIPUrl.Text))
                    {
                        GlobusHttpHelper HttpHelper = new GlobusHttpHelper();
                        string pageSource = HttpHelper.getHtmlfromUrlIP(new Uri(txtIPUrl.Text), "", "", "", "", "");
                        string[] array = Regex.Split(pageSource, "\n");
                        foreach (string item in array)
                        {
                            lstPublicIPWOTest.Add(item.Replace("\r", ""));
                        }
                    }
                    else if (!string.IsNullOrEmpty(txtPublicIP.Text))
                    {
                        lstPublicIPWOTest = GlobusFileHelper.ReadFiletoStringList(txtPublicIP.Text);
                    }
                    else
                    {
                        AddToIPsLogs("[ " + DateTime.Now + " ] => [ Please Upload Either Url or Load IP Files ]");
                        return;
                    }

                    AddToIPsLogs("[ " + DateTime.Now + " ] => [ " + lstPublicIPWOTest.Count + " Public Proxies Loaded ]");
                    if (lstPublicIPWOTest.Count > 0)
                    {
                        new Thread(() =>
                        {
                            foreach (string item in lstPublicIPWOTest)
                            {
                                ImportingIP(item);
                            }
                        }
                        ).Start();
                    }
                    else
                    {
                        AddToIPsLogs("[ " + DateTime.Now + " ] => [ Sorry No Proxies Available ]");
                    }
                }
            }
            catch (Exception)
            {

            }
        }