public static void AddingLinkedInDataToCSVFileWithoutGoingToMainProfile(string Data, string FileName)
        {
            try
            {
                string LinkedInAppData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "LinkedInScraper\\" + FileName + ".csv");
                string LinkedInDeskTop = Globals.DesktopFolder + "\\LinkedInScraper" + FileName + ".csv";

                #region LinkedIn Writer
                if (!File.Exists(LinkedInAppData))
                {
                    string Header = "ProfileUrl" + "," + "FirstName" + "," + "LastName" + "," + "HeadlineTitle" + "," + "Location" + "," + "Industry" + "," + "CurrentTitle" + "," + "PastTitle" + "," + "degreeOfConnection" + ",";
                    GlobusFileHelper.AppendStringToTextfileNewLine(Header, LinkedInAppData);
                }

                //Checking File Exixtance
                if (!File.Exists(LinkedInDeskTop))
                {
                    string Header = "ProfileUrl" + "," + "FirstName" + "," + "LastName" + "," + "HeadlineTitle" + "," + "Location" + "," + "Industry" + "," + "CurrentTitle" + "," + "PastTitle" + "," + "degreeOfConnection" + ",";
                    GlobusFileHelper.AppendStringToTextfileNewLine(Header, LinkedInDeskTop);
                }

                if (!string.IsNullOrEmpty(Data))
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine(Data, LinkedInDeskTop);
                }
                #endregion
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
        public static void SalesNavigatorScraperWriteToCSV(string Data, string Header, string FileName)
        {
            try
            {
                string LinkedInAppData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "LinkedInScraper\\" + FileName + ".csv");
                string LinkedInDeskTop = Globals.DesktopFolder + "\\" + FileName + ".csv";

                #region LinkedIn Writer
                if (!File.Exists(LinkedInAppData))
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine(Header, LinkedInAppData);
                }

                //Checking File Exixtance
                if (!File.Exists(LinkedInDeskTop))
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine(Header, LinkedInDeskTop);
                }

                if (!string.IsNullOrEmpty(Data))
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine(Data, LinkedInDeskTop);
                }
                #endregion
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
        public static void AddingLinkedInDataToCSVFile(string Data, string FileName)
        {
            try
            {
                string LinkedInAppData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "LinkedInScraper\\" + FileName + ".csv");
                string LinkedInDeskTop = Globals.DesktopFolder + "\\LinkedInScraper" + FileName + ".csv";

                #region LinkedIn Writer
                if (!File.Exists(LinkedInAppData))
                {
                    string Header = "ProfileType" + "," + "UserProfileLink" + "," + "ProfileID" + "," + "FirstName" + "," + "LastName" + "," + "HeadLineTitle" + "," + "CurrentTitle" + "," + "Current Company" + "," + "Current Company Url" + "," + "Description of all Company" + "," + "Background - Summary" + "," + "Connection" + "," + "Recommendations " + "," + "SkillAndExpertise " + "," + "Experience " + "," + " Education" + "," + "Groups" + "," + "UserEmail" + "," + "UserContactNumber" + "," + "PastTitles" + "," + "PastCompany" + "," + "Location" + "," + "Country" + "," + "Industry" + "," + "WebSites" + "," + "LinkedInLoginID" + "," + "AccountType" + "," + "Email" + "," + "ProfilePhoneNumber" + "," + "CurrentComapnyName" + "," + "CompanyPhoneNumber" + ",";
                    GlobusFileHelper.AppendStringToTextfileNewLine(Header, LinkedInAppData);
                }

                //Checking File Exixtance
                if (!File.Exists(LinkedInDeskTop))
                {
                    string Header = "ProfileType" + "," + "UserProfileLink" + "," + "ProfileID" + "," + "FirstName" + "," + "LastName" + "," + "HeadLineTitle" + "," + "CurrentTitle" + "," + "Company" + "," + "Current Company Url" + "," + "Background - Summary" + "," + "Connection" + "," + "Recommendations " + "," + "SkillAndExpertise " + "," + "Experience " + "," + " Education" + "," + "Groups" + "," + "UserEmail" + "," + "UserContactNumber" + "," + "PastTitles" + "," + "PastCompany" + "," + "Location" + "," + "Country" + "," + "Industry" + "," + "WebSites" + "," + "LinkedInLoginID" + "," + "AccountType" + "," + "Email" + "," + "ProfilePhoneNumber" + "," + "CurrentComapnyName" + "," + "CompanyPhoneNumber" + ",";
                    GlobusFileHelper.AppendStringToTextfileNewLine(Header, LinkedInDeskTop);
                }

                if (!string.IsNullOrEmpty(Data))
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine(Data, LinkedInDeskTop);
                }
                #endregion
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
Esempio n. 4
0
 public static void AddToErrorLogText(string message)
 {
     try
     {
         GlobusFileHelper.AppendStringToTextfileNewLine(message, path_ErrorTextFile);
     }
     catch { }
 }
 public static void AddLoggerFile(string Item)
 {
     try
     {
         GlobusFileHelper.AppendStringToTextfileNewLine(Item, FilePath.Path_LinkedinErrorLogs);
         GlobusFileHelper.AppendStringToTextfileNewLine(Item, Globals.DesktopFolder);
     }
     catch (Exception ex)
     {
     }
 }
Esempio n. 6
0
 /// <summary>
 /// Write Failed Accounts to FailedAccounts.txt on Desktop
 /// </summary>
 private void WriteToTextFile()
 {
     try
     {
         GlobusFileHelper.AppendStringToTextfileNewLine(Username + ":" + Password, failedAccountsFilePath);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
Esempio n. 7
0
        public bool CheckProxy()
        {
            try
            {
                int    Working    = 0;
                string LoggedInIp = string.Empty;

                //BaseLib.ChilkatHttpHelpr HttpHelper = new BaseLib.ChilkatHttpHelpr();
                //string pageSource = HttpHelper.GetHtmlProxy("http://www.linkedin.com/", proxyAddress, proxyPort, proxyUsername, proxyPassword);

                GlobusHttpHelper HttpHelper = new GlobusHttpHelper();
                string           pageSource = HttpHelper.getHtmlfromUrlProxy(new Uri("http://www.linkedin.com/"), proxyAddress, int.Parse(proxyPort), proxyUsername, proxyPassword);

                if (string.IsNullOrEmpty(pageSource))//(string.IsNullOrEmpty(pageSource) && string.IsNullOrEmpty(PgSrcHome))
                {
                    Thread.Sleep(500);
                    pageSource = HttpHelper.getHtmlfromUrlProxy(new Uri("http://www.linkedin.com/"), proxyAddress, int.Parse(proxyPort), proxyUsername, proxyPassword);
                    if (string.IsNullOrEmpty(pageSource))
                    {
                        return(false);
                    }
                }
                ///Logic to check...
                if (pageSource.Contains("LinkedIn") && (pageSource.Contains("Sign Up")))
                {
                    try
                    {
                        using (SQLiteConnection con = new SQLiteConnection(DataBaseHandler.CONstr))
                        {
                            using (SQLiteDataAdapter ad = new SQLiteDataAdapter())
                            {
                                Working = 1;
                                string InsertQuery = "Insert into tb_Proxies values('" + proxyAddress + "','" + proxyPort + "','" + proxyUsername + "','" + proxyPassword + "', " + Working + "," + IsPublic + " , '" + LoggedInIp + "')";
                                DataBaseHandler.InsertQuery(InsertQuery, "tb_Proxies");
                                GlobusFileHelper.AppendStringToTextfileNewLine(proxyAddress + ":" + proxyPort + ":" + proxyUsername + ":" + proxyPassword, Globals.Path_ExsistingProxies);
                            }
                        }
                    }
                    catch { }

                    return(true);
                }

                return(false);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                return(false);
            }
        }
Esempio n. 8
0
        private bool LoginAccount(string Username, string Password, string proxyAddress, string proxyPort, string proxyUserName, string proxyPassword)
        {
            bool   IsLoggedIn     = false;
            string _Username      = string.Empty;
            string _Password      = string.Empty;
            string _ProxyAddress  = string.Empty;
            string _ProxyPort     = string.Empty;
            string _ProxyUsername = string.Empty;
            string _ProxyPassword = string.Empty;

            try
            {
                _Username      = Username;
                _Password      = Password;
                _ProxyAddress  = proxyAddress;
                _ProxyPort     = proxyPort;
                _ProxyUsername = proxyUserName;
                _ProxyPassword = proxyPassword;

                if (string.IsNullOrEmpty(proxyPort) && !NumberHelper.ValidateNumber(proxyPort))
                {
                    _ProxyPort = "80";
                }

                Log("[ " + DateTime.Now + " ] => [ Logging in with : " + _Username + " ]");


                string Url = "https://www.linkedin.com/";

                string pageSrcLogin = HttpHelper.getHtmlfromUrlProxy(new Uri(Url), _ProxyAddress, Convert.ToInt32(_ProxyPort), _ProxyUsername, _ProxyPassword);


                string postdata     = string.Empty;
                string postUrl      = string.Empty;
                string ResLogin     = string.Empty;
                string csrfToken    = string.Empty;
                string sourceAlias  = string.Empty;
                string regCsrfParam = string.Empty;

                if (pageSrcLogin.Contains("csrfToken"))
                {
                    try
                    {
                        int    startIndex = pageSrcLogin.IndexOf("name=\"csrfToken\"");
                        string start      = pageSrcLogin.Substring(startIndex).Replace("name=\"csrfToken\"", "");
                        int    endIndex   = start.IndexOf("\" ");
                        string end        = start.Substring(0, endIndex).Replace("value=\"", "").Trim();
                        csrfToken = end;
                        csrfToken = csrfToken.Replace("ajax:", "");
                    }
                    catch (Exception ex)
                    {
                    }
                }

                try
                {
                    if (csrfToken.Contains("&"))
                    {
                        string[] Arr = csrfToken.Split('&');
                        csrfToken = Arr[0].Replace("\"", string.Empty);
                    }
                }
                catch { }

                SearchCriteria.CsrToken = csrfToken;
                if (pageSrcLogin.Contains("sourceAlias"))
                {
                    try
                    {
                        sourceAlias = pageSrcLogin.Substring(pageSrcLogin.IndexOf("sourceAlias"), 100);
                        string[] Arr = sourceAlias.Split('"');
                        sourceAlias = Arr[2].Replace("\\", string.Empty);
                    }
                    catch { }
                }

                try
                {
                    int SourceAliasStart = pageSrcLogin.IndexOf("regCsrfParam");
                    if (SourceAliasStart > 0)
                    {
                        try
                        {
                            regCsrfParam = pageSrcLogin.Substring(pageSrcLogin.IndexOf("regCsrfParam"), 100);
                            string[] Arr = regCsrfParam.Split('"');
                            regCsrfParam = Arr[2].Replace(@"\", string.Empty).Replace("//", string.Empty);
                        }
                        catch
                        {
                        }
                    }
                }
                catch { }


                //postUrl = "https://www.linkedin.com/uas/login-submit";
                //postdata = "session_key=" + Uri.EscapeDataString(_Username) + "&session_password="******"&source_app=&trk=guest_home_login&session_redirect=&csrfToken=" + csrfToken + "&sourceAlias=" + sourceAlias;
                //ResLogin = HttpHelper.postFormData(new Uri(postUrl), postdata);

                postUrl  = "https://www.linkedin.com/uas/login-submit";
                postdata = "isJsEnabled=true&source_app=&tryCount=&session_key=" + Uri.EscapeDataString(_Username) + "&session_password="******"&signin=Sign%20In&session_redirect=&loginCsrfParam=" + regCsrfParam + "&csrfToken=" + csrfToken + "&sourceAlias=" + sourceAlias;

                try
                {
                    ResLogin = HttpHelper.postFormDataProxy(new Uri(postUrl), postdata, _ProxyPassword, Convert.ToInt32(_ProxyPort), _ProxyUsername, _ProxyPassword);//HttpHelper.postFormDataRef(new Uri(postUrl), postdata, "http://www.linkedin.com/uas/login?goback=&trk=hb_signin", "", "");
                }
                catch { }


                if (ResLogin.Contains("Your LinkedIn account has been temporarily restricted") || ResLogin.Contains("Change your password") || ResLogin.Contains("Please confirm your email address"))
                {
                    if (ResLogin.Contains("Your LinkedIn account has been temporarily restricted"))
                    {
                        try
                        {
                            Log("[ " + DateTime.Now + " ] => [ Your LinkedIn account has been temporarily restricted : " + _Username + " ]");

                            GlobusFileHelper.AppendStringToTextfileNewLine(_Username, Globals.Path_TemporarilyRestrictedAccount_AccountChecker);
                        }
                        catch
                        {
                        }
                    }
                    if (ResLogin.Contains("Change your password"))
                    {
                        try
                        {
                            Log("[ " + DateTime.Now + " ] => [ Change your password : "******" ]");

                            GlobusFileHelper.AppendStringToTextfileNewLine(_Username, Globals.Path_ChangeYourPassword_AccountChecker);
                        }
                        catch
                        {
                        }
                    }
                    if (ResLogin.Contains("Please confirm your email address"))
                    {
                        try
                        {
                            Log("[ " + DateTime.Now + " ] => [ Please confirm your email address : " + _Username + " ]");

                            GlobusFileHelper.AppendStringToTextfileNewLine(_Username, Globals.Path_ConfirmYourEmailAddress_AccountChecker);
                        }
                        catch
                        {
                        }
                    }
                }

                if (ResLogin.Contains("The email address or password you provided does not match our records"))
                {
                    try
                    {
                        Log("[ " + DateTime.Now + " ] => [ The email address or password you provided does not match our records : " + _Username + " ]");

                        GlobusFileHelper.AppendStringToTextfileNewLine(_Username, Globals.Path_EmailAddressOrPasswordDoesNotMatch_AccountChecker);
                    }
                    catch
                    {
                    }
                }

                if (ResLogin.Contains("Security Verification"))
                {
                    try
                    {
                        Log("[ " + DateTime.Now + " ] => [ Security Verification : " + _Username + " ]");

                        GlobusFileHelper.AppendStringToTextfileNewLine(_Username, Globals.Path_SecurityVerification_AccountChecker);
                    }
                    catch
                    {
                    }
                }

                if (ResLogin.Contains("One or more of your email addresses needs confirmation"))
                {
                    try
                    {
                        Log("[ " + DateTime.Now + " ] => [ One or more of your email addresses needs confirmation : " + _Username + " ]");

                        GlobusFileHelper.AppendStringToTextfileNewLine(_Username, Globals.Path_ConfirmYourEmailAddress_AccountChecker);
                    }
                    catch
                    {
                    }
                }

                if (ResLogin.Contains("Sign Out") && !ResLogin.Contains("Your LinkedIn account has been temporarily restricted") && !ResLogin.Contains("Please confirm your email address"))
                {
                    IsLoggedIn = true;
                }

                string CheckedAccount = _Username + ":" + _Password;

                if (IsLoggedIn)
                {
                    try
                    {
                        Log("[ " + DateTime.Now + " ] => [ Successfully Logged In with : " + _Username + " ]");
                        GlobusFileHelper.AppendStringToTextfileNewLine(CheckedAccount, Globals.Path_WorkingAccount_AccountChecker);
                    }
                    catch
                    {
                    }
                }
                else
                {
                    try
                    {
                        Log("[ " + DateTime.Now + " ] => [ Failed to Login with : " + _Username + " ]");
                        GlobusFileHelper.AppendStringToTextfileNewLine(CheckedAccount, Globals.Path_NonWorkingAccount_AccountChecker);
                    }
                    catch
                    {
                    }
                }
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine("Module Name >>> AccountChecker, UserName >>> " + _Email + " , ex.Message >>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace + " , ex.StackTrace >>> " + ex.StackTrace + "  , Date Time >>> " + DateTime.Now, Globals.Path_ErrorFile_AccountChecker);
            }

            return(IsLoggedIn);
        }
Esempio n. 9
0
        private void CheckEmail(string Username, string Password, string proxyAddress, string proxyPort, string proxyUserName, string proxyPassword)
        {
            string _Username = string.Empty;

            try
            {
                string _Password      = string.Empty;
                string _ProxyAddress  = string.Empty;
                string _ProxyPort     = string.Empty;
                string _ProxyUsername = string.Empty;
                string _ProxyPassword = string.Empty;

                _Username      = Username;
                _Password      = Password;
                _ProxyAddress  = proxyAddress;
                _ProxyPort     = proxyPort;
                _ProxyUsername = proxyUserName;
                _ProxyPassword = proxyPassword;

                if (_Username.Length < 1)
                {
                    return;
                }

                Log("[ " + DateTime.Now + " ] => [ Starting To Check Email With UserName : "******" ]");

                if (string.IsNullOrEmpty(proxyPort) && !NumberHelper.ValidateNumber(proxyPort))
                {
                    _ProxyPort = "80";
                }

                string Url          = "https://www.linkedin.com/";
                string pageSrcLogin = HttpHelper.getHtmlfromUrlProxy(new Uri(Url), _ProxyAddress, Convert.ToInt32(_ProxyPort), _ProxyUsername, _ProxyPassword);

                string postdata    = string.Empty;
                string postUrl     = string.Empty;
                string ResLogin    = string.Empty;
                string csrfToken   = string.Empty;
                string sourceAlias = string.Empty;

                if (pageSrcLogin.Contains("csrfToken"))
                {
                    try
                    {
                        csrfToken = pageSrcLogin.Substring(pageSrcLogin.IndexOf("csrfToken"), 100);
                        string[] Arr = csrfToken.Split('"');
                        csrfToken = Arr[2].Replace("\\", string.Empty);
                    }
                    catch
                    {
                        try
                        {
                            csrfToken = pageSrcLogin.Substring(pageSrcLogin.IndexOf("csrfToken"), 100);
                            if (csrfToken.Contains("&"))
                            {
                                string[] Arr = csrfToken.Split('&');
                                csrfToken = Arr[0].Replace("\\", string.Empty).Replace("csrfToken=", string.Empty);
                            }
                            else if (csrfToken.Contains(","))
                            {
                                string[] Arr = csrfToken.Split(',');
                                csrfToken = Arr[0].Replace("\\", string.Empty);
                            }
                        }
                        catch { }
                    }
                }
                SearchCriteria.CsrToken = csrfToken;
                if (pageSrcLogin.Contains("sourceAlias"))
                {
                    try
                    {
                        sourceAlias = pageSrcLogin.Substring(pageSrcLogin.IndexOf("sourceAlias"), 100);
                        string[] Arr = sourceAlias.Split('"');
                        sourceAlias = Arr[2].Replace("\\", string.Empty);
                    }
                    catch { }
                }

                string getReqForCheckEmail = HttpHelper.getHtmlfromUrl1(new Uri("https://www.linkedin.com/uas/request-password-reset?session_redirect="));
                postUrl = "https://www.linkedin.com/uas/request-password-reset-submit";

                postdata = "email=" + Uri.EscapeDataString(_Username) + "&request=Submit+Address&sessionRedirect=&csrfToken=" + csrfToken + "&sourceAlias=" + sourceAlias + "";
                ResLogin = HttpHelper.postFormData(new Uri(postUrl), postdata);

                if (ResLogin.Contains("We couldn't find a LinkedIn account associated with " + _Username))
                {
                    try
                    {
                        Log("[ " + DateTime.Now + " ] => [ We couldn't find a LinkedIn account associated with " + _Username + " ]");
                        GlobusFileHelper.AppendStringToTextfileNewLine(_Username, Globals.Path_NonExistingEmail_EmailChecker);
                    }
                    catch
                    {
                    }
                }

                else if (ResLogin.Contains("Please check your email"))
                {
                    try
                    {
                        Log("[ " + DateTime.Now + " ] => [ Please check your email with : " + _Username + " ]");
                        GlobusFileHelper.AppendStringToTextfileNewLine(_Username, Globals.Path_ExistingEmail_EmailChecker);
                    }
                    catch
                    {
                    }
                }
                else if (ResLogin.Contains("Security Verification"))
                {
                    try
                    {
                        Log("[ " + DateTime.Now + " ] => [ Security Verification : " + _Username + " ]");

                        GlobusFileHelper.AppendStringToTextfileNewLine(_Username, Globals.Path_SecurityVerification_EmailChecker);
                    }
                    catch
                    {
                    }
                }
                else
                {
                    Log("[ " + DateTime.Now + " ] => [ There is some problem with : " + _Username + " ]");
                    GlobusFileHelper.AppendStringToTextfileNewLine(_Username, Globals.Path_OtherProblem_EmailChecker);
                }
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine("Module Name >>> EmailChecker, UserName >>> " + _Username + " , ex.Message >>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace + " , ex.StackTrace >>> " + ex.StackTrace + "  , Date Time >>> " + DateTime.Now, Globals.Path_ErrorFile_EmailChecker);
            }

            Log("[ " + DateTime.Now + " ] => [ PROCESS COMPLETED With UserName : "******" ]");
        }
Esempio n. 10
0
        public string DecodeDBC(string[] args, byte[] imageBytes)
        {
            try
            {
                // Put your DBC username & password here:
                DeathByCaptcha.Client client = (DeathByCaptcha.Client) new DeathByCaptcha.SocketClient(args[0], args[1]);
                client.Verbose = true;

                Console.WriteLine("Your balance is {0:F2} US cents", client.Balance);//Log("Your balance is " + client.Balance + " US cents ");

                if (!client.User.LoggedIn)
                {
                    Log("[ " + DateTime.Now + " ] => [ Please check your DBC Account Details ]");
                    return(null);
                }
                if (client.Balance == 0.0)
                {
                    Log("[ " + DateTime.Now + " ] => [ You have 0 Balance in your DBC Account ]");
                    return(null);
                }

                for (int i = 2, l = args.Length; i < l; i++)
                {
                    Console.WriteLine("Solving CAPTCHA {0}", args[i]);

                    // Upload a CAPTCHA and poll for its status.  Put the CAPTCHA image
                    // file name, file object, stream, or a vector of bytes, and desired
                    // solving timeout (in seconds) here:
                    DeathByCaptcha.Captcha captcha = client.Decode(imageBytes, 2 * DeathByCaptcha.Client.DefaultTimeout);
                    if (null != captcha)
                    {
                        Console.WriteLine("CAPTCHA {0:D} solved: {1}", captcha.Id, captcha.Text);

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

                        return(captcha.Text);
                    }
                    else
                    {
                        Log("[ " + DateTime.Now + " ] => [ CAPTCHA was not solved ]");
                        Console.WriteLine("CAPTCHA was not solved");
                        return(null);
                    }
                }
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- DecodeDBC()  --> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  DecodeDBC() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace + " || DateTime :- " + DateTime.Now, Globals.Path_LinkedinAccountCraetionErrorLogs);
            }
            return(null);
        }
        /// <summary>
        /// Assigns "accountsPerProxy" number of proxies to accounts in Database, only picks up only those accounts where ProxyAddress is Null or Empty
        /// </summary>
        #region AssignProxiesToAccounts
        public void AssignProxiesToAccounts(List <string> lstProxies, int noOfAccountsPerProxy)
        {
            try
            {
                DataSet ds = new DataSet();

                if (noOfAccountsPerProxy > 0)
                {
                    accountsPerProxy = noOfAccountsPerProxy;
                }
                else
                {
                    MessageBox.Show("You entered invalid Accounts per Proxy... Default value \"10\" Set");
                }

                using (SQLiteConnection con = new SQLiteConnection(DataBaseHandler.CONstr))
                {
                    foreach (string item in lstProxies)
                    {
                        try
                        {
                            ds.Clear();

                            string account = item;

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

                            int DataCount = account.Split(':').Length;

                            if (DataCount == 2)
                            {
                                proxyAddress = account.Split(':')[0];
                                proxyPort    = account.Split(':')[1];
                            }
                            else if (DataCount > 2)
                            {
                                proxyAddress  = account.Split(':')[0];
                                proxyPort     = account.Split(':')[1];
                                proxyUserName = account.Split(':')[2];
                                proxyPassword = account.Split(':')[3];
                            }

                            //using (SQLiteDataAdapter ad = new SQLiteDataAdapter("SELECT * FROM tb_FBAccount WHERE ProxyAddress = '" + proxyAddress + "'", con))
                            using (SQLiteDataAdapter ad = new SQLiteDataAdapter("SELECT * FROM tb_LinkedInAccount WHERE IPAddress = '" + proxyAddress + "' and IPPort = '" + proxyPort + "'", con))
                            {
                                ad.Fill(ds);
                                if (ds.Tables[0].Rows.Count == 0)
                                {
                                    ds.Clear();
                                    using (SQLiteDataAdapter ad1 = new SQLiteDataAdapter("SELECT * FROM tb_LinkedInAccount WHERE IPAddress = '" + "" + "' OR IPAddress = '" + null + "'", con))
                                    {
                                        ad1.Fill(ds);

                                        int count = accountsPerProxy;  //Set count = accountsPerProxy so that it sets max this number of accounts to each proxy
                                        if (ds.Tables[0].Rows.Count < count)
                                        {
                                            count = ds.Tables[0].Rows.Count;
                                        }
                                        for (int i = 0; i < count; i++)
                                        {
                                            string UpdateQuery = "Update tb_LinkedInAccount Set IPAddress='" + proxyAddress + "', IPPort='" + proxyPort + "', IPUserName='******', IPPassword='******' WHERE UserName='******'";
                                            DataBaseHandler.UpdateQuery(UpdateQuery, "tb_LinkedInAccount");
                                        }
                                    }
                                }
                            }
                        }
                        catch
                        {
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> ProxyUtillitesFromDB -- AssignProxiesToAccounts() --> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_ProxySettingErroLog);
                GlobusFileHelper.AppendStringToTextfileNewLine("Error --> ProxyUtillitesFromDB -- AssignProxiesToAccounts() --> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
            }
        }
Esempio n. 12
0
        //public bool CheckLogin(string response, string username, string password)
        //{
        //    this.Username = username;
        //    this.Password = password;

        //    if (!string.IsNullOrEmpty(response))
        //    {
        //        if (response.ToLower().Contains("unusual login activity"))
        //        {
        //            Console.WriteLine("Unusual Login Activity: " + username);
        //            PumpMessage("Unusual Login Activity: " + username);
        //            return false;
        //        }
        //        if (response.ToLower().Contains("incorrect username"))
        //        {
        //            Console.WriteLine("Incorrect username: "******"Incorrect username: "******"Choose a verification method".ToLower()))
        //        {
        //            Console.WriteLine("Choose a verification method: " + username);
        //            PumpMessage("Choose a verification method: " + username);
        //            return false;
        //        }
        //        if (response.ToLower().Contains("not logged in".ToLower()))
        //        {
        //            Console.WriteLine("not logged in: " + username);
        //            PumpMessage("not logged in: " + username);
        //            return false;
        //        }
        //        if (response.Contains("Please log in to continue".ToLower()))
        //        {
        //            Console.WriteLine("Please log in to continue: " + username);
        //            PumpMessage("Please log in to continue: " + username);
        //            return false;
        //        }
        //        if (response.Contains("re-enter your password"))
        //        {
        //            Console.WriteLine("Wrong password for: " + username);
        //            PumpMessage("Wrong password for: " + username);
        //            return false;
        //        }
        //        if (response.Contains("Incorrect Email"))
        //        {
        //            Console.WriteLine("Incorrect email: " + username);
        //            PumpMessage("Incorrect email: " + username);
        //            return false;
        //        }
        //        if (response.Contains("have been blocked"))
        //        {
        //            Console.WriteLine("you have been blocked: " + username);
        //            PumpMessage("you have been blocked: " + username);
        //            return false;
        //        }
        //        if (response.Contains("account has been disabled"))
        //        {
        //            Console.WriteLine("your account has been disabled: " + username);
        //            PumpMessage("your account has been disabled: " + username);
        //            return false;
        //        }
        //        if (response.Contains("Please complete a security check"))
        //        {
        //            Console.WriteLine("Please complete a security check: " + username);
        //            PumpMessage("Use a phone to verify your account : " + username);
        //            InsertUpdateDatabase(AccountStatus.Status(ProfileStatus.AccountCreated));
        //            return false;
        //        }
        //        if (response.Contains("Please complete a security check"))
        //        {
        //            Console.WriteLine("You must log in to see this page: " + username);
        //            PumpMessage("required phone verification : " + username);
        //            return false;
        //        }
        //        if (response.Contains("Your account is temporarily locked"))
        //        {
        //            Console.WriteLine("Your account is temporarily locked: " + username);
        //            PumpMessage("your account has been disabled: " + username);
        //            return false;
        //        }
        //        if (response.Contains("You must log in to see this page"))
        //        {
        //            Console.WriteLine("You must log in to see this page: " + username);
        //            PumpMessage("You must log in to see this page: " + username);
        //            return false;
        //        }
        //        if (response.Contains("Suspicious activity has been detected on your Facebook account"))
        //        {
        //            Console.WriteLine("Suspicious activity: " + username);
        //            PumpMessage("Suspicious activity: " + username);
        //            return false;
        //        }

        //    }
        //    else
        //    {
        //        return false;
        //    }
        //    return true;
        //}
        #endregion


        /// <summary>
        /// Checks if account is valid
        /// </summary>
        public bool CheckLogin(string response, string username, string password, string proxyAddress, string proxyPort, string proxyUsername, string proxyPassword)
        {
            this.Username = username;
            this.Password = password;

            this.proxyAddress  = proxyAddress;
            this.proxyPort     = proxyPort;
            this.proxyUsername = proxyUsername;
            this.proxyPassword = proxyPassword;

            if (!string.IsNullOrEmpty(response))
            {
                if (response.ToLower().Contains("unusual login activity"))
                {
                    Console.WriteLine("Unusual Login Activity: " + username);
                    PumpMessage("Unusual Login Activity: " + username);
                    return(false);
                }
                if (response.ToLower().Contains("incorrect username"))
                {
                    Console.WriteLine("Incorrect username: "******"Incorrect username: "******"Choose a verification method".ToLower()))
                {
                    Console.WriteLine("Choose a verification method: " + username);
                    PumpMessage("Choose a verification method: " + username);
                    return(false);
                }
                if (response.ToLower().Contains("not logged in".ToLower()))
                {
                    Console.WriteLine("not logged in: " + username);
                    PumpMessage("not logged in: " + username);
                    return(false);
                }
                if (response.Contains("Please log in to continue".ToLower()))
                {
                    Console.WriteLine("Please log in to continue: " + username);
                    PumpMessage("Please log in to continue: " + username);
                    return(false);
                }
                if (response.Contains("re-enter your password"))
                {
                    Console.WriteLine("Wrong password for: " + username);
                    PumpMessage("Wrong password for: " + username);
                    return(false);
                }
                if (response.Contains("Incorrect Email"))
                {
                    Console.WriteLine("Incorrect email: " + username);

                    try
                    {
                        ///Write Incorrect Emails in text file
                        GlobusFileHelper.AppendStringToTextfileNewLine(username + ":" + password, incorrectEmailFilePath);
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.Message);
                    }

                    InsertUpdateDatabase(AccountStatus.Status(ProfileStatus.IncorrectEmail));
                    PumpMessage("Incorrect email: " + username);
                    return(false);
                }
                if (response.Contains("have been blocked"))
                {
                    Console.WriteLine("you have been blocked: " + username);
                    WriteToTextFile();
                    InsertUpdateDatabase(AccountStatus.Status(ProfileStatus.AccountDisabled));
                    PumpMessage("you have been blocked: " + username);
                    return(false);
                }
                if (response.Contains("account has been disabled"))
                {
                    Console.WriteLine("your account has been disabled: " + username);
                    WriteToTextFile();
                    InsertUpdateDatabase(AccountStatus.Status(ProfileStatus.AccountDisabled));
                    PumpMessage("your account has been disabled: " + username);
                    return(false);
                }
                if (response.Contains("Please complete a security check"))
                {
                    Console.WriteLine("Please complete a security check: " + username);
                    PumpMessage("Use a phone to verify your account : " + username);
                    InsertUpdateDatabase(AccountStatus.Status(ProfileStatus.AccountCreated));
                    return(false);
                }
                if (response.Contains("Please complete a security check"))
                {
                    Console.WriteLine("You must log in to see this page: " + username);
                    InsertUpdateDatabase(AccountStatus.Status(ProfileStatus.AccountCreated));
                    PumpMessage("required phone verification : " + username);
                    return(false);
                }
                if (response.Contains("<input value=\"Sign Up\" onclick=\"RegistrationBootloader.bootloadAndValidate();"))
                {
                    Console.WriteLine("Not logged in with: " + username);
                    //InsertUpdateDatabase(AccountStatus.Status(ProfileStatus.AccountCreated));
                    PumpMessage("Not logged in with: " + username);
                    return(false);
                }
                if (response.Contains("Account Not Confirmed"))
                {
                    Console.WriteLine("Account Not Confirmed " + Username);
                    PumpMessage("Account Not Confirmed " + Username);
                    return(false);
                }
                if (response.Contains("Your account is temporarily locked"))
                {
                    Console.WriteLine("Your account is temporarily locked: " + username);
                    WriteToTextFile();
                    PumpMessage("your account has been disabled: " + username);
                    return(false);
                }
                if (response.Contains("You must log in to see this page"))
                {
                    Console.WriteLine("You must log in to see this page: " + username);
                    WriteToTextFile();
                    PumpMessage("You must log in to see this page: " + username);
                    return(false);
                }
                if (response.Contains("Suspicious activity has been detected on your Facebook account"))
                {
                    Console.WriteLine("Suspicious activity: " + username);
                    WriteToTextFile();
                    PumpMessage("Suspicious activity: " + username);
                    return(false);
                }
            }
            else
            {
                return(false);
            }
            return(true);
        }
Esempio n. 13
0
        public void CreateFileLikeDeskTop(string Content, string CheckData)
        {
            //string strPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\FaceDominatorLikeAccount";
            string strPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\FaceDominatorFbAccount";

            try
            {
                #region Commented
                //if (Directory.Exists(strPath))
                //{
                //    if (CheckLike=="Like")
                //    {
                //        GlobusFileHelper.AppendStringToTextfileNewLine(Content, strPath + "\\LikedFbAccount.txt");
                //    }
                //    if (CheckLike == "UnLike")
                //    {
                //        GlobusFileHelper.AppendStringToTextfileNewLine(Content, strPath + "\\UnLikedFbAccount.txt");
                //    }
                //}
                //else
                //{
                //    Directory.CreateDirectory(strPath);
                //    if (CheckLike == "Like")
                //    {
                //        GlobusFileHelper.AppendStringToTextfileNewLine(Content, strPath + "\\LikedFbAccount.txt");
                //    }
                //    if (CheckLike == "UnLike")
                //    {
                //        GlobusFileHelper.AppendStringToTextfileNewLine(Content, strPath + "\\UnLikedFbAccount.txt");
                //    }
                //}
                #endregion
                if (!Directory.Exists(strPath))
                {
                    Directory.CreateDirectory(strPath);
                }
                if (CheckData == "FriendProfileUrl")
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine(Content, strPath + "\\FriendProfileUrl.txt");
                }
                else if (CheckData == "DisableFbAccount")
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine(Content, strPath + "\\DisableFbAccount.txt");
                }
                else if (CheckData == "IncorrectFbAccount")
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine(Content, strPath + "\\IncorrectFbAccount.txt");
                }
                else if (CheckData == "PhoneVerifyFbAccount")
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine(Content, strPath + "\\PhoneVerifyFbAccount.txt");
                }
                else if (CheckData == "CorrectFbAccount")
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine(Content, strPath + "\\CorrectFbAccount.txt");
                }
                else if (CheckData == "TemporarilyFbAccount")
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine(Content, strPath + "\\TemporarilyFbAccount.txt");
                }
                else if (CheckData == "AccountNotConfirmed")
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine(Content, strPath + "\\AccountNotConfirmed.txt");
                }
                else if (CheckData == "NotCorrectFbAccount")
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine(Content, strPath + "\\NotCorrectFbAccount.txt");
                }
                //GlobusFileHelper.WriteListtoTextfile(listDisabledFbAccount, strPath + "\\DisableFbAccount.txt");
                //    GlobusFileHelper.WriteListtoTextfile(listIncorrectFbAccount, strPath + "\\IncorrectFbAccount.txt");
                //    GlobusFileHelper.WriteListtoTextfile(listPhoneVerifyFbAccount, strPath + "\\PhoneVerifyFbAccount.txt");
                //    GlobusFileHelper.WriteListtoTextfile(listCorrectFbAccount, strPath + "\\CorrectFbAccount.txt");
                //    GlobusFileHelper.WriteListtoTextfile(listTemporarilyFbAccount, strPath + "\\TemporarilyFbAccount.txt");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }