예제 #1
0
        public void FillCaptcha()
        {
            try
            {
                string captcha = string.Empty;
                if (!string.IsNullOrEmpty(CurrentCaptchaUserName) && !string.IsNullOrEmpty(CurrentCaptchaPassword) && CheckDbcUserNamePassword)
                {
                    captcha = ResolveCaptchaByCaptchaService(imageBytes, CurrentCaptchaSetting, CurrentCaptchaUserName, CurrentCaptchaPassword);

                }
                else
                {
                   captcha= txtCaptcha.Text;
                }
               

                if (string.IsNullOrEmpty(captcha))
                {
                    MessageBox.Show("Please enter the Captcha Value Which you see on Captcha Image");
                    return;
                }


                Emails.EmailFactory hotemail = new Emails.HotmailFactory();

                Emails.Email email = hotemail.createEmail(ref webHotmail, captcha, lstFname, lstLname);

                Username = email.username;
                Password = email.password;
                hotmailerStatus = HotmailerStatus.checkforAccountCreation;
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
            }
        }
예제 #2
0
        public void VerifiyAccount(string email, string password, string proxyAddress, string proxyPort, string proxyUser, string proxyPassword, string DOB, ref GlobusHttpHelper HttpHelper, string registrationstatus)
        {
            if (email.Contains("%"))
            {
                email = email.Replace("%40","@");
            }

            try
            {

                if (email.Contains("@gmail"))
                {
                    EmailFactory objEmailFactory = new GmailFactory();
                    objEmailFactory.readEmail(email, password, proxyAddress, proxyPort, proxyUser, proxyPassword, DOB, ref  HttpHelper, registrationstatus);

                    int delayInSeconds = Utils.GenerateRandom(minDelayAccountVerification * 1000, maxDelayAccountVerification * 1000);
                    GlobusLogHelper.log.Info("Delaying for " + delayInSeconds / 1000 + " Seconds With email : " + email);
                    GlobusLogHelper.log.Debug("Delaying for " + delayInSeconds / 1000 + " Seconds With email : " + email);
                    Thread.Sleep(delayInSeconds);
                }

                else if (email.Contains("@yahoo"))
                {
                    EmailFactory objEmailFactory = new YahooFactory();
                    objEmailFactory.readEmail(email, password, proxyAddress, proxyPort, proxyUser, proxyPassword, DOB, ref  HttpHelper, registrationstatus);

                    int delayInSeconds = Utils.GenerateRandom(minDelayAccountVerification * 1000, maxDelayAccountVerification * 1000);
                    GlobusLogHelper.log.Info("Delaying for " + delayInSeconds / 1000 + " Seconds With email : " + email);
                    GlobusLogHelper.log.Debug("Delaying for " + delayInSeconds / 1000 + " Seconds With email : " + email);
                    Thread.Sleep(delayInSeconds);
                }

                else if (email.Contains("@hotmail"))
                {
                    EmailFactory objEmailFactory = new HotmailFactory();
                    objEmailFactory.readEmail(email, password, proxyAddress, proxyPort, proxyUser, proxyPassword, DOB, ref  HttpHelper, registrationstatus);

                    int delayInSeconds = Utils.GenerateRandom(minDelayAccountVerification * 1000, maxDelayAccountVerification * 1000);
                    GlobusLogHelper.log.Info("Delaying for " + delayInSeconds / 1000 + " Seconds With email : " + email);
                    GlobusLogHelper.log.Debug("Delaying for " + delayInSeconds / 1000 + " Seconds With email : " + email);
                    Thread.Sleep(delayInSeconds);
                }

                else if (email.Contains("@live"))
                {
                    EmailFactory objEmailFactory = new LiveFactory();
                    objEmailFactory.readEmail(email, password, proxyAddress, proxyPort, proxyUser, proxyPassword, DOB, ref  HttpHelper, registrationstatus);

                    int delayInSeconds = Utils.GenerateRandom(minDelayAccountVerification * 1000, maxDelayAccountVerification * 1000);
                    GlobusLogHelper.log.Info("Delaying for " + delayInSeconds / 1000 + " Seconds With email : " + email);
                    GlobusLogHelper.log.Debug("Delaying for " + delayInSeconds / 1000 + " Seconds With email : " + email);
                    Thread.Sleep(delayInSeconds);
                }

                else if (email.Contains("@aol"))
                {
                    EmailFactory objEmailFactory = new AolFactory();
                    objEmailFactory.readEmail(email, password, proxyAddress, proxyPort, proxyUser, proxyPassword, DOB, ref  HttpHelper, registrationstatus);

                    int delayInSeconds = Utils.GenerateRandom(minDelayAccountVerification * 1000, maxDelayAccountVerification * 1000);
                    GlobusLogHelper.log.Info("Delaying for " + delayInSeconds / 1000 + " Seconds With email : " + email);
                    GlobusLogHelper.log.Debug("Delaying for " + delayInSeconds / 1000 + " Seconds With email : " + email);
                    Thread.Sleep(delayInSeconds);
                }

                else
                {
                    GlobusLogHelper.log.Info("Email : " + email + " Not Recognised !");

                    int delayInSeconds = Utils.GenerateRandom(minDelayAccountVerification * 1000, maxDelayAccountVerification * 1000);
                    GlobusLogHelper.log.Info("Delaying for " + delayInSeconds / 1000 + " Seconds With email : " + email);
                    GlobusLogHelper.log.Debug("Delaying for " + delayInSeconds / 1000 + " Seconds With email : " + email);
                    Thread.Sleep(delayInSeconds);
                }


            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error(ex.StackTrace);
            }
            finally
            {
                //Write to text file
                //Also insert in Database
                try
                {
                    if (registrationstatus == "registration_succeeded")
                    {
                        //GlobusFileHelper.AppendStringToTextfileNewLine(realEmail + ":" + password + ":" + proxyAddress + ":" + proxyPort + ":" + proxyUser + ":" + proxyPassword + "<>" + DOB, Path.Combine(Globals.FD_DesktopPath, "CreatedAccounts.txt"));
                        // DataBaseHandler.InsertQuery("Insert into tb_FBAccount values('" + realEmail + "','" + password + "','" + proxyAddress + "','" + proxyPort + "','" + proxyUser + "','" + proxyPassword + "','" + "" + "','" + "" + "','" + AccountStatus.Status(ProfileStatus.AccountCreated) + "')", "tb_FBAccount");
                    }
                    if (registrationstatus == "alredy_exist")
                    {
                        //GlobusFileHelper.AppendStringToTextfileNewLine(realEmail + ":" + password + ":" + proxyAddress + ":" + proxyPort + ":" + proxyUser + ":" + proxyPassword + "<>" + DOB, Path.Combine(Globals.FD_DesktopPath, "AlreadyCreatedAccounts.txt"));

                    }
                }
                catch (Exception ex)
                {
                    GlobusLogHelper.log.Error(ex.StackTrace);

                }
            }
        }