コード例 #1
0
        private void VerifyAccountMultiThread(object Parameter)
        {
            string account   = string.Empty;
            string tempEmail = string.Empty;

            try
            {
                if (!IsStop)
                {
                    lstThread_AccountVerification.Add(Thread.CurrentThread);
                    lstThread_AccountVerification.Distinct().ToList();
                    Thread.CurrentThread.IsBackground = true;
                }
                if (IsStop)
                {
                    return;
                }
            }
            catch
            {
            }

            try
            {
                string post        = string.Empty;
                Array  paramsArray = new object[1];

                paramsArray = (Array)Parameter;

                //KeyValuePair<string, LinkedInMaster> item = (KeyValuePair<string, LinkedInMaster>)paramsArray.GetValue(0);

                string item = paramsArray.GetValue(0).ToString();

                account = item;//item.Key;
                GlobusHttpHelper HttpHelper = new GlobusHttpHelper();
                LinkedinLogin    Login      = new LinkedinLogin();

                try
                {
                    string[] arrItem = Regex.Split(item, ":");
                    tempEmail = arrItem[0];
                    if (arrItem.Length == 2)
                    {
                        Login.accountUser = arrItem[0]; //item.Key;
                        Login.accountPass = arrItem[1]; //item.Value._Password;
                    }
                    else if (arrItem.Length == 4)
                    {
                        Login.accountUser  = arrItem[0]; //item.Key;
                        Login.accountPass  = arrItem[1]; //item.Value._Password;
                        Login.proxyAddress = arrItem[2]; //item.Value._ProxyAddress;
                        Login.proxyPort    = arrItem[3];
                    }
                    else if (arrItem.Length == 6)
                    {
                        Login.accountUser   = arrItem[0]; //item.Key;
                        Login.accountPass   = arrItem[1]; //item.Value._Password;
                        Login.proxyAddress  = arrItem[2]; //item.Value._ProxyAddress;
                        Login.proxyPort     = arrItem[3]; //item.Value._ProxyPort;
                        Login.proxyUserName = arrItem[4]; //item.Value._ProxyUsername;
                        Login.proxyPassword = arrItem[5]; //item.Value._ProxyPassword;
                    }
                    else
                    {
                        AddAccountVerificationLogger("[ " + DateTime.Now + " ] => [ Wrong Format For Email Password ]");
                        return;
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Error >>> " + ex.StackTrace);
                }

                ClsEmailActivator obj_ClsEmailActivator = new ClsEmailActivator(Login.accountUser, Login.accountPass, Login.proxyAddress, Login.proxyPort, Login.proxyUserName, Login.proxyPassword);

                Login.logger.addToLogger += new EventHandler(AccountVerificationLogEvents_addToLogger);
                //obj_StatusUpdate.logger.addToLogger += new EventHandler(logger_StatusUpdateaddToLogger);

                if (!Login.IsLoggedIn)
                {
                    Login.LoginHttpHelper(ref HttpHelper);
                }

                if (!Login.IsLoggedIn)
                {
                    AddAccountVerificationLogger("[ " + DateTime.Now + " ] => [ Couldn't Login With Username >>> " + Login.accountUser + " ]");
                    return;
                }
                if (Login.IsLoggedIn)
                {
                    bool isActivated = obj_ClsEmailActivator.EmailVerification(Login.accountUser, Login.accountPass, ref HttpHelper);

                    if (isActivated)
                    {
                        AddAccountVerificationLogger("[ " + DateTime.Now + " ] => [ Account Activated With Username : "******" ]");
                        GlobusFileHelper.AppendStringToTextfileNewLine(Login.accountUser + ":" + Login.accountPass + ":" + Login.proxyAddress + ":" + Login.proxyPort + ":" + Login.proxyUserName + ":" + Login.proxyPassword, Globals.path_VerifiedAccounts);
                    }
                    else
                    {
                        AddAccountVerificationLogger("[ " + DateTime.Now + " ] => [ Account Couldn't Activated With Username >>> " + Login.accountUser + " ]");
                        GlobusFileHelper.AppendStringToTextfileNewLine(Login.accountUser + ":" + Login.accountPass + ":" + Login.proxyAddress + ":" + Login.proxyPort + ":" + Login.proxyUserName + ":" + Login.proxyPassword, Globals.path_NonVerifiedAccounts);
                    }

                    Login.logger.addToLogger -= new EventHandler(AccountVerificationLogEvents_addToLogger);
                }
                AddAccountVerificationLogger("[ " + DateTime.Now + " ] => [ Process Completed With Username : "******" ]");
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error >>> " + ex.StackTrace);
            }
            finally
            {
                counter_AccVerification--;
                if (counter_AccVerification == 0)
                {
                    btnAccountVerification_AccountVerification.Invoke(new MethodInvoker(delegate
                    {
                        AddAccountVerificationLogger("[ " + DateTime.Now + " ] => [ PROCESS COMPLETED ]");
                        AddAccountVerificationLogger("--------------------------------------------------------------------------------------------------------------------------");
                        btnAccountVerification_AccountVerification.Cursor = Cursors.Default;
                    }));
                }
            }
        }
コード例 #2
0
        public void SignupMultiThreaded(object parameters)
        {
            Array paramsArray = new object[3];

            paramsArray = (Array)parameters;

            string Email    = string.Empty;
            string Password = string.Empty;

            string proxyAddress  = string.Empty;
            string proxyPort     = string.Empty;
            string proxyUsername = string.Empty;
            string proxyPassword = string.Empty;

            string emailData = (string)paramsArray.GetValue(0);
            string username  = (string)paramsArray.GetValue(1);
            string name      = (string)paramsArray.GetValue(2);

            try
            {
                Email    = emailData.Split(':')[0];
                Password = emailData.Split(':')[1];
            }
            catch (Exception ex) { AddToListBox(ex.Message); }

            if (emailData.Split(':').Length > 5)
            {
                proxyAddress  = emailData.Split(':')[2];
                proxyPort     = emailData.Split(':')[3];
                proxyUsername = emailData.Split(':')[4];
                proxyPassword = emailData.Split(':')[5];
            }
            else if (emailData.Split(':').Length == 4)
            {
                proxyAddress = emailData.Split(':')[2];
                proxyPort    = emailData.Split(':')[3];
            }

            try
            {
                if (!(username.Count() < 15 || Password.Count() > 6))
                {
                    if (username.Count() > 15)
                    {
                        AddToListBox("Username Must Not be greater than 15 char");
                    }
                    else if (Password.Count() < 6)
                    {
                        AddToListBox("Password Must Not be less than 6 char");
                    }
                }
            }
            catch { }

            Random randm     = new Random();
            double cachestop = randm.NextDouble();

            string textUrl     = globusHelper.getHtmlfromUrlProxy(new Uri("https://twitter.com/signup"), proxyAddress, proxyPort, proxyUsername, proxyPassword, "", "");
            string pagesource1 = globusHelper.getHtmlfromUrl(new Uri("https://www.google.com/recaptcha/api/js/recaptcha_ajax.js"), "", "");
            string pagesource2 = globusHelper.getHtmlfromUrl(new Uri("https://www.google.com/recaptcha/api/challenge?k=6LfbTAAAAAAAAE0hk8Vnfd1THHnn9lJuow6fgulO&ajax=1&cachestop=" + cachestop + "&lang=en"), "", "");

            try
            {
                int    IndexStart = pagesource2.IndexOf("challenge :");
                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;
            }
            catch (Exception ex)
            {
                Console.WriteLine("1 :" + ex.StackTrace);
            }

            WebClient webclient = new WebClient();

            webclient.DownloadFile(ImageURL, Application.LocalUserAppDataPath + "\\Image.jpg");

            try
            {
                int    StartIndex = textUrl.IndexOf("phx-signup-form");
                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(" ", "");
            }
            catch (Exception ex)
            {
                Console.WriteLine("2 :" + ex.StackTrace);
            }
            try
            {
                bool   Created       = true;
                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.getHtmlfromUrl(new Uri(url), "https://twitter.com/signup", "");
                string Usernamecheck = globusHelper.getHtmlfromUrl(new Uri("https://twitter.com/users/username_available?suggest=1&username="******"&full_name=" + name + "&email=&suggest_on_username=true&context=signup"), "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"))
                {
                    Created = false;
                }
                else if (Usernamecheck.Contains("Username has already been taken"))
                {
                    Created = false;
                }
                else if (EmailCheck.Contains("You cannot have a blank email address"))
                {
                    Created = false;
                }

                if (Created)
                {
                    byte[] args = webclient.DownloadData(ImageURL);

                    string[] arr1 = new string[] { "indianbill007", "sumit1234", "" };

                    string captchaText             = DecodeDBC(arr1, args);
                    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=&recaptcha_challenge_field=" + capcthavalue + "&recaptcha_response_field=" + HttpUtility.UrlEncode(captchaText) + "&user%5Bdiscoverable_by_email%5D=1&user%5Bsend_email_newsletter%5D=1";
                    string AccountcraetePageSource = globusHelper.postFormData(new Uri("https://twitter.com/account/create"), postdata, "https://twitter.com/signup", "", "", "", "");

                    if (AccountcraetePageSource.Contains("id=\"signout-form\"") && AccountcraetePageSource.Contains("/logout"))
                    {
                        MessageBox.Show("Account created");
                    }


                    if (Created)
                    {
                        ClsEmailActivator EmailActivate = new ClsEmailActivator();
                        bool verified = EmailActivate.EmailVerification(Email.Replace(" ", ""), Password, ref globusHelper);
                        if (verified)
                        {
                            AddToListBox("Account Verified");
                        }
                    }
                }
                else
                {
                    if (EmailCheck.Contains("Email has already been taken. An email can only be used on one Twitter account at a time"))
                    {
                        AddToListBox("Email has already been taken. An email can only be used on one Twitter account at a time");
                    }
                    else if (Usernamecheck.Contains("Username has already been taken"))
                    {
                        AddToListBox("Username has already been taken");
                    }
                    else if (EmailCheck.Contains("You cannot have a blank email address"))
                    {
                        AddToListBox("You cannot have a blank email address");
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("3 :" + ex.StackTrace);
            }
        }
コード例 #3
0
        public void StartResendEmailForVerification(object parameters)
        {
            try
            {
                lstEmailVarificationThread.Add(Thread.CurrentThread);
                lstEmailVarificationThread.Distinct().ToList();
                Thread.CurrentThread.IsBackground = true;

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

                string Email              = string.Empty;
                string Password           = string.Empty;
                string username           = string.Empty;
                string IPAddress          = string.Empty;
                string IPPort             = string.Empty;
                string IPUsername         = string.Empty;
                string IPpassword         = string.Empty;
                string IP                 = string.Empty;
                string tempEmail          = string.Empty;
                string postdataPageSource = string.Empty;

                counter = Lst_NonVerifiedEmailAccount.Count();
                string item = paramsArray.GetValue(0).ToString();


                try
                {
                    string[] arrItem = Regex.Split(item, ":");
                    tempEmail = arrItem[0];
                    if (arrItem.Length == 2)
                    {
                        Email    = arrItem[0]; //item.Key;
                        Password = arrItem[1]; //item.Value._Password;
                    }
                    else if (arrItem.Length == 4)
                    {
                        Email     = arrItem[0]; //item.Key;
                        Password  = arrItem[1]; //item.Value._Password;
                        IPAddress = arrItem[2]; //item.Value._IPAddress;
                        IPPort    = arrItem[3];
                    }
                    else if (arrItem.Length == 6)
                    {
                        Email      = arrItem[0]; //item.Key;
                        Password   = arrItem[1]; //item.Value._Password;
                        IPAddress  = arrItem[2]; //item.Value._IPAddress;
                        IPPort     = arrItem[3]; //item.Value._IPPort;
                        IPUsername = arrItem[4]; //item.Value._IPUsername;
                        IPpassword = arrItem[5]; //item.Value._IPpassword;
                    }
                    else
                    {
                        AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ Wrong Format For Email Password ]");
                        return;
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Error >>> " + ex.StackTrace);
                }


                Globussoft.GlobusHttpHelper globusHelper   = new Globussoft.GlobusHttpHelper();
                TweetAccountManager         Accountmanager = new TweetAccountManager();

                Accountmanager.logEvents.addToLogger += new EventHandler(logEvents_addToLogger);

                ClsEmailActivator EmailActivate = new ClsEmailActivator();

                try
                {
                    Accountmanager.globusHttpHelper = globusHelper;
                    Accountmanager.Username         = Email.Replace(" ", "").Replace("\0", "");
                    Accountmanager.Password         = Password;
                    Accountmanager.IPAddress        = IPAddress;
                    Accountmanager.IPPort           = IPPort;
                    Accountmanager.IPUsername       = IPUsername;
                    Accountmanager.IPpassword       = IPpassword;
                    Accountmanager.Login();

                    if (Accountmanager.IsLoggedIn)
                    {
                        string postData = ("authenticity_token=" + Accountmanager.postAuthenticityToken).Trim();
                        postdataPageSource = Accountmanager.globusHttpHelper.postFormData(new Uri("https://twitter.com/account/resend_confirmation_email"), postData, "	https://twitter.com/", "", "", "", "");
                    }
                }
                catch { };


                if (postdataPageSource.Contains("A confirmation email has been sent to you."))
                {
                    AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ Email send to confirmation for Account : " + Email + " ]");
                }

                else
                {
                    Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password + ":" + username + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_VerificationFailedAccounts);
                    AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ Email not send to confirmation for Account : " + Email + " ]");
                }
            }
            catch (Exception ex)
            {
                //AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ " + ex.Message + " ]");
            }
            finally
            {
                counter--;
                if (counter == 0)
                {
                    AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ PROCESS COMPLETED ]");
                    AddToEmailVerificationLog("------------------------------------------------------------------------------------------------------------------------------------------");
                }
            }
        }
コード例 #4
0
        public void StartVerification(object parameters)
        {
            try
            {
                lstEmailVarificationThread.Add(Thread.CurrentThread);
                lstEmailVarificationThread.Distinct().ToList();
                Thread.CurrentThread.IsBackground = true;

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

                string Email      = string.Empty;
                string Password   = string.Empty;
                string username   = string.Empty;
                string IPAddress  = string.Empty;
                string IPPort     = string.Empty;
                string IPUsername = string.Empty;
                string IPpassword = string.Empty;
                string IP         = string.Empty;
                string tempEmail  = string.Empty;


                #region commented by prabhat 07.12.13
                //string emailData = (string)paramsArray.GetValue(0);
                //if (paramsArray.Length>1)
                //{
                //    IP = (string)paramsArray.GetValue(1);
                //}

                //if (!emailData.Contains(':'))
                //{
                //    AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ Wrong Format Of Emails :- " + emailData + " ]");
                //    return;
                //}


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

                //AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ Going for Email Verification : " + Email + " ]");

                //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)
                //    {
                //    }
                //}
                #endregion

                counter = Lst_NonVerifiedEmailAccount.Count();
                string item = paramsArray.GetValue(0).ToString();


                try
                {
                    string[] arrItem = Regex.Split(item, ":");
                    tempEmail = arrItem[0];
                    if (arrItem.Length == 2)
                    {
                        Email    = arrItem[0]; //item.Key;
                        Password = arrItem[1]; //item.Value._Password;
                    }
                    else if (arrItem.Length == 4)
                    {
                        Email     = arrItem[0]; //item.Key;
                        Password  = arrItem[1]; //item.Value._Password;
                        IPAddress = arrItem[2]; //item.Value._IPAddress;
                        IPPort    = arrItem[3];
                    }
                    else if (arrItem.Length == 6)
                    {
                        Email      = arrItem[0]; //item.Key;
                        Password   = arrItem[1]; //item.Value._Password;
                        IPAddress  = arrItem[2]; //item.Value._IPAddress;
                        IPPort     = arrItem[3]; //item.Value._IPPort;
                        IPUsername = arrItem[4]; //item.Value._IPUsername;
                        IPpassword = arrItem[5]; //item.Value._IPpassword;
                    }
                    else
                    {
                        AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ Wrong Format For Email Password ]");
                        return;
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Error >>> " + ex.StackTrace);
                }


                Globussoft.GlobusHttpHelper globusHelper   = new Globussoft.GlobusHttpHelper();
                TweetAccountManager         Accountmanager = new TweetAccountManager();

                Accountmanager.logEvents.addToLogger += new EventHandler(logEvents_addToLogger);

                ClsEmailActivator EmailActivate = new ClsEmailActivator();

                try
                {
                    Accountmanager.globusHttpHelper = globusHelper;
                    Accountmanager.Username         = Email.Replace(" ", "").Replace("\0", "");
                    Accountmanager.Password         = Password;
                    Accountmanager.IPAddress        = IPAddress;
                    Accountmanager.IPPort           = IPPort;
                    Accountmanager.IPUsername       = IPUsername;
                    Accountmanager.IPpassword       = IPpassword;
                    Accountmanager.Login();

                    if (Accountmanager.IsLoggedIn)
                    {
                        string postData           = ("authenticity_token=" + Accountmanager.postAuthenticityToken).Trim();
                        string postdataPageSource = Accountmanager.globusHttpHelper.postFormData(new Uri("https://twitter.com/account/resend_confirmation_email"), postData, "	https://twitter.com/", "", "", "", "");
                    }
                }
                catch { };


                bool verified = EmailActivate.EmailVerification(Email, Password, ref globusHelper);

                if (verified)
                {
                    try
                    {
                        string pageresponce = Accountmanager.globusHttpHelper.getHtmlfromUrl(new Uri("https://twitter.com/"), "", "");

                        //if (pageresponce.Contains("btn resend-confirmation-email-link"))
                        //{
                        //    verified = false;
                        //}
                    }
                    catch (Exception)
                    {
                        AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ Verified Account  login Failed  : " + Email + " ]");
                    }
                }
                if (verified && Accountmanager.IsLoggedIn)
                {
                    Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password + ":" + username + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_SuccessfullyVerifiedAccounts);
                    AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ Account Verified : " + Email + " ]");
                }
                else
                {
                    Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password + ":" + username + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_VerificationFailedAccounts);
                    AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ Account Couldn't be Email Verified : " + Email + " ]");
                }
            }
            catch (Exception ex)
            {
                //AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ " + ex.Message + " ]");
            }
            finally
            {
                counter--;
                if (counter == 0)
                {
                    AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ PROCESS COMPLETED ]");
                    AddToEmailVerificationLog("------------------------------------------------------------------------------------------------------------------------------------------");
                }
            }
        }
コード例 #5
0
        public void StartResendEmailForVerification(object parameters)
        {
            try
            {
                lstEmailVarificationThread.Add(Thread.CurrentThread);
                lstEmailVarificationThread.Distinct().ToList();
                Thread.CurrentThread.IsBackground = true;

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

                string Email = string.Empty;
                string Password = string.Empty;
                string username = string.Empty;
                string IPAddress = string.Empty;
                string IPPort = string.Empty;
                string IPUsername = string.Empty;
                string IPpassword = string.Empty;
                string IP = string.Empty;
                string tempEmail = string.Empty;
                string postdataPageSource = string.Empty;
                        
                counter = Lst_NonVerifiedEmailAccount.Count();
                string item = paramsArray.GetValue(0).ToString();


                try
                {
                    string[] arrItem = Regex.Split(item, ":");
                    tempEmail = arrItem[0];
                    if (arrItem.Length == 2)
                    {
                        Email = arrItem[0]; //item.Key;
                        Password = arrItem[1];//item.Value._Password;
                    }
                    else if (arrItem.Length == 4)
                    {
                        Email = arrItem[0]; //item.Key;
                        Password = arrItem[1];//item.Value._Password;
                        IPAddress = arrItem[2];//item.Value._IPAddress;
                        IPPort = arrItem[3];
                    }
                    else if (arrItem.Length == 6)
                    {
                        Email = arrItem[0]; //item.Key;
                        Password = arrItem[1];//item.Value._Password;
                        IPAddress = arrItem[2];//item.Value._IPAddress;
                        IPPort = arrItem[3];//item.Value._IPPort;
                        IPUsername = arrItem[4];//item.Value._IPUsername;
                        IPpassword = arrItem[5];//item.Value._IPpassword;
                    }
                    else
                    {
                        AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ Wrong Format For Email Password ]");
                        return;
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Error >>> " + ex.StackTrace);
                }


                Globussoft.GlobusHttpHelper globusHelper = new Globussoft.GlobusHttpHelper();
                TweetAccountManager Accountmanager = new TweetAccountManager();

                Accountmanager.logEvents.addToLogger += new EventHandler(logEvents_addToLogger);

                ClsEmailActivator EmailActivate = new ClsEmailActivator();

                try
                {
                    Accountmanager.globusHttpHelper = globusHelper;
                    Accountmanager.Username = Email.Replace(" ", "").Replace("\0", "");
                    Accountmanager.Password = Password;
                    Accountmanager.IPAddress = IPAddress;
                    Accountmanager.IPPort = IPPort;
                    Accountmanager.IPUsername = IPUsername;
                    Accountmanager.IPpassword = IPpassword;
                    Accountmanager.Login();

                    if (Accountmanager.IsLoggedIn)
                    {
                        string postData = ("authenticity_token=" + Accountmanager.postAuthenticityToken).Trim();
                        postdataPageSource = Accountmanager.globusHttpHelper.postFormData(new Uri("https://twitter.com/account/resend_confirmation_email"), postData, "	https://twitter.com/", "", "", "", "");
                    }
                }
                catch { };


                if (postdataPageSource.Contains("A confirmation email has been sent to you."))
                {
                    AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ Email send to confirmation for Account : " + Email + " ]");
                }
                
                else
                {
                    Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password + ":" + username + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_VerificationFailedAccounts);
                    AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ Email not send to confirmation for Account : " + Email + " ]");
                }
            }
            catch (Exception ex)
            {
                //AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ " + ex.Message + " ]");
            }
            finally
            {
                counter--;
                if (counter == 0)
                {
                    AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ PROCESS COMPLETED ]");
                    AddToEmailVerificationLog("------------------------------------------------------------------------------------------------------------------------------------------");
                }
            }
        }
コード例 #6
0
        public void StartVerification(object parameters )
        {
            try
            {
                lstEmailVarificationThread.Add(Thread.CurrentThread);
                lstEmailVarificationThread.Distinct().ToList();
                Thread.CurrentThread.IsBackground = true;

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

                string Email = string.Empty;
                string Password = string.Empty;
                string username = string.Empty;
                string IPAddress = string.Empty;
                string IPPort = string.Empty;
                string IPUsername = string.Empty;
                string IPpassword = string.Empty;
                string IP = string.Empty;
                string tempEmail = string.Empty;


                #region commented by prabhat 07.12.13
                //string emailData = (string)paramsArray.GetValue(0);
                //if (paramsArray.Length>1)
                //{
                //    IP = (string)paramsArray.GetValue(1);
                //}

                //if (!emailData.Contains(':'))
                //{
                //    AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ Wrong Format Of Emails :- " + emailData + " ]");
                //    return;
                //}


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

                //AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ Going for Email Verification : " + Email + " ]");

                //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)
                //    {
                //    }
                //} 
                #endregion

                counter = Lst_NonVerifiedEmailAccount.Count();
                string item = paramsArray.GetValue(0).ToString();


                try
                {
                    string[] arrItem = Regex.Split(item, ":");
                    tempEmail = arrItem[0];
                    if (arrItem.Length == 2)
                    {
                        Email = arrItem[0]; //item.Key;
                        Password = arrItem[1];//item.Value._Password;
                    }
                    else if (arrItem.Length == 4)
                    {
                        Email = arrItem[0]; //item.Key;
                        Password = arrItem[1];//item.Value._Password;
                        IPAddress = arrItem[2];//item.Value._IPAddress;
                        IPPort = arrItem[3];
                    }
                    else if (arrItem.Length == 6)
                    {
                        Email = arrItem[0]; //item.Key;
                        Password = arrItem[1];//item.Value._Password;
                        IPAddress = arrItem[2];//item.Value._IPAddress;
                        IPPort = arrItem[3];//item.Value._IPPort;
                        IPUsername = arrItem[4];//item.Value._IPUsername;
                        IPpassword = arrItem[5];//item.Value._IPpassword;
                    }
                    else
                    {
                        AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ Wrong Format For Email Password ]");
                        return;
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Error >>> " + ex.StackTrace);
                }


                Globussoft.GlobusHttpHelper globusHelper = new Globussoft.GlobusHttpHelper();
                TweetAccountManager Accountmanager = new TweetAccountManager();

                Accountmanager.logEvents.addToLogger += new EventHandler(logEvents_addToLogger);

                ClsEmailActivator EmailActivate = new ClsEmailActivator();

                try
                {
                    Accountmanager.globusHttpHelper = globusHelper;
                    Accountmanager.Username = Email.Replace(" ", "").Replace("\0", "");
                    Accountmanager.Password = Password;
                    Accountmanager.IPAddress = IPAddress;
                    Accountmanager.IPPort = IPPort;
                    Accountmanager.IPUsername = IPUsername;
                    Accountmanager.IPpassword = IPpassword;
                    Accountmanager.Login();

                    if (Accountmanager.IsLoggedIn)
                    {
                        string postData = ("authenticity_token=" + Accountmanager.postAuthenticityToken).Trim();
                        string postdataPageSource = Accountmanager.globusHttpHelper.postFormData(new Uri("https://twitter.com/account/resend_confirmation_email"), postData, "	https://twitter.com/", "", "", "", "");
                    }
                }
                catch { };


                bool verified = EmailActivate.EmailVerification(Email, Password, ref globusHelper);

                if (verified)
                {
                    try
                    {
                        string pageresponce = Accountmanager.globusHttpHelper.getHtmlfromUrl(new Uri("https://twitter.com/"), "", "");

                        //if (pageresponce.Contains("btn resend-confirmation-email-link"))
                        //{
                        //    verified = false;
                        //}
                    }
                    catch (Exception)
                    {
                        AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ Verified Account  login Failed  : " + Email + " ]");
                    }
                }
                if (verified && Accountmanager.IsLoggedIn)
                {

                    Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password + ":" + username + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_SuccessfullyVerifiedAccounts);
                    AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ Account Verified : " + Email + " ]");
                }
                else
                {
                    Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password + ":" + username + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_VerificationFailedAccounts);
                    AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ Account Couldn't be Email Verified : " + Email + " ]");
                }
            }
            catch (Exception ex)
            {
                //AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ " + ex.Message + " ]");
            }
            finally 
            {
                counter--;
                if (counter == 0)
                {
                    AddToEmailVerificationLog("[ " + DateTime.Now + " ] => [ PROCESS COMPLETED ]");
                    AddToEmailVerificationLog("------------------------------------------------------------------------------------------------------------------------------------------");
                }
            }
        }
コード例 #7
0
ファイル: TwitterSignUp.cs プロジェクト: prog-moh/twtboard
        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
            {
            }
        }