public List <string> GetAllBoardNames_new(ref PinInterestUser objPinInUser) { List <string> BoardNames = new List <string>(); BaseLib.GlobusRegex rgx = new GlobusRegex(); Globussoft.GlobusHttpHelper httpHelper = new Globussoft.GlobusHttpHelper(); string UserUrl = "http://pinterest.com/" + objPinInUser.Username; string BoardPage = httpHelper.getHtmlfromUrl(new Uri(UserUrl), "", "", objPinInUser.UserAgent); string[] Items = Regex.Split(BoardPage, "item"); int counter = 0; foreach (string item in Items) { try { if (item.Contains("id=\\\"Board") && item.Contains("boardLinkWrapper")) { //if (counter == 1) { string[] Data = System.Text.RegularExpressions.Regex.Split(item, "boardLinkWrapper"); foreach (string Dataitem in Data) { if (Dataitem.Contains("-end-")) { continue; } if (Dataitem.Contains("boardName")) { int startIndex = Dataitem.IndexOf("title"); int LastPoint = Dataitem.IndexOf("<h4"); string Board = Dataitem.Substring(startIndex, LastPoint).Replace("\\n", string.Empty).Replace("\"", "").Replace("<div class=\\b", string.Empty).Replace(" ", string.Empty).Replace("\"title\"", "").Replace("</div", ""); Board = rgx.StripTagsRegex(Board); try { Board = Board.Split('>')[1]; } catch { } if (!BoardNames.Contains(Board)) { BoardNames.Add(Board); } } } } counter++; } } catch (Exception ex) { GlobusLogHelper.log.Error(" Error :" + ex.StackTrace); } } return(BoardNames); }
/// <summary> /// Makes Http Request to Confirmation URL from Mail, also requests other JS, CSS URLs /// </summary> /// <param name="ConfemUrl"></param> /// <param name="gif"></param> /// <param name="logpic"></param> public void LoginVerfy(string ConfemUrl, string gif, string logpic) { Globussoft.GlobusHttpHelper HttpHelper = new Globussoft.GlobusHttpHelper(); int intProxyPort = 80; Regex IdCheck = new Regex("^[0-9]*$"); if (!string.IsNullOrEmpty(_proxyPort) && IdCheck.IsMatch(_proxyPort)) { intProxyPort = int.Parse(_proxyPort); } string PageSourse1 = HttpHelper.getHtmlfromUrlProxy(new Uri(ConfemUrl), _proxyAddress, intProxyPort, _proxyUsername, _proxyPassword); //string PageSourse1 = HttpHelper.getHtmlfromUrlProxy(new Uri(url), "127.0.0.1", 8888, "", ""); string valueLSD = "name=" + "\"lsd\""; string pageSource = HttpHelper.getHtmlfromUrl(new Uri("https://www.facebook.com/login.php")); int startIndex = pageSource.IndexOf(valueLSD) + 18; string value = pageSource.Substring(startIndex, 5); //Log("Logging in with " + Username); //string ResponseLogin = HttpHelper.postFormData(new Uri("https://www.facebook.com/login.php?login_attempt=1"), "charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + "&locale=en_US&email=" + Email.Split('@')[0] + "%40" + Email.Split('@')[1] + "&pass="******"&persistent=1&default_persistent=1&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + ""); string ResponseLogin = HttpHelper.postFormDataProxy(new Uri("https://www.facebook.com/login.php?login_attempt=1"), "charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + "&locale=en_US&email=" + _Email.Split('@')[0] + "%40" + _Email.Split('@')[1] + "&pass="******"&persistent=1&default_persistent=1&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + "", _proxyAddress, intProxyPort, _proxyUsername, _proxyPassword); //string ResponseLogin = HttpHelper.postFormData(new Uri("https://www.facebook.com/login.php?login_attempt=1"), "charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + "&locale=en_US&email=" + "rani.khanna" + "%40" + "hotmail.com" + "&pass="******"s15121985" + "&persistent=1&default_persistent=1&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + ""); /////ssss gif &s=a parse com &s=a////////////////////////// string PageSourse12 = HttpHelper.getHtmlfromUrl(new Uri(ConfemUrl)); string PageSourse13 = HttpHelper.getHtmlfromUrl(new Uri(gif)); string PageSourse14 = HttpHelper.getHtmlfromUrl(new Uri(logpic + "&s=a")); string PageSourse15 = HttpHelper.getHtmlfromUrl(new Uri(logpic)); string PageSourceConfirmed = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/?email_confirmed=1")); string pageSourceCheck = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=contact_importer")); //** FB Account Check email varified or not ***********************************************************************************// #region FB Account Check email varified or not string pageSrc1 = string.Empty; string pageSrc2 = string.Empty; string pageSrc3 = string.Empty; string pageSrc4 = string.Empty; string substr1 = string.Empty; if (pageSourceCheck.Contains("Are your friends already on Facebook?") && pageSourceCheck.Contains("Skip this step")) { pageSrc1 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=classmates_coworkers")); } if (pageSrc1.Contains("Fill out your Profile Info") && pageSrc1.Contains("Skip")) { pageSrc2 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=upload_profile_pic")); } if (pageSrc2.Contains("Set your profile picture") && pageSrc2.Contains("Skip")) { pageSrc3 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=summary")); } if (pageSrc3.Contains("complete the sign-up process")) { //LoggerWallPoste("not varified through " + Username); } if (pageSourceCheck.Contains("complete the sign-up process")) { //LoggerWallPoste("not varified through Email" + Username); } #endregion //** FB Account Check email varified or not ***********************************************************************************// string pageSourceHome = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/home.php")); //** User Id ***************////////////////////////////////// string UsreId = string.Empty; string ProFilePost = string.Empty; ////**Post Message For User***********************///////////////////////////////////////////////////// int count = 0; if (pageSourceHome.Contains("http://www.facebook.com/profile.php?id=")) { string[] arrUser = Regex.Split(pageSourceHome, "href"); foreach (String itemUser in arrUser) { if (!itemUser.Contains("<!DOCTYPE")) { if (itemUser.Contains("http://www.facebook.com/profile.php?id=")) { string[] arrhre = itemUser.Split('"'); ProFilePost = arrhre[1]; break; } } } } if (ProFilePost.Contains("http://www.facebook.com/profile.php?id=")) { UsreId = ProFilePost.Replace("http://www.facebook.com/profile.php?id=", ""); } //*** User Id **************////////////////////////////////// //*** Post Data **************////////////////////////////////// string fb_dtsg = pageSourceHome.Substring(pageSourceHome.IndexOf("fb_dtsg") + 16, 8); string post_form_id = pageSourceHome.Substring(pageSourceHome.IndexOf("post_form_id"), 200); string[] Arr = post_form_id.Split('"'); post_form_id = Arr[4]; post_form_id = post_form_id.Replace("\\", ""); post_form_id = post_form_id.Replace("\\", ""); post_form_id = post_form_id.Replace("\\", ""); //string Response1 = HttpHelper.postFormData(new Uri("http://www.facebook.com/desktop/notifier/transfer.php?__a=1"), "post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&lsd&post_form_id_source=AsyncRequest&__user="******"http://www.facebook.com/desktop/notifier/transfer.php?__a=1"), "post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&lsd&post_form_id_source=AsyncRequest&__user="******"http://www.facebook.com/ajax/httponly_cookies.php?dc=snc2&__a=1"), "keys[0]=1150335208&post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&lsd&post_form_id_source=AsyncRequest&__user="******"http://www.facebook.com/ajax/contextual_help.php?__a=1&set_name=welcome&__user="******"http://www.facebook.com/")); pageSourceCheck1111 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/")); if (pageSourceCheck1111.Contains("complete the sign-up process")) { Console.WriteLine("Account is not verified for : " + _Email); AddToListBox("Account is not verified for : " + _Email); } string pageSource11 = HttpHelper.getHtmlfromUrl(new Uri("https://www.facebook.com/login.php")); startIndex = pageSource.IndexOf(valueLSD) + 18; value = pageSource.Substring(startIndex, 5); //Log("Logging in with " + Username); string ResponseLogin11 = HttpHelper.postFormDataProxy(new Uri("https://www.facebook.com/login.php?login_attempt=1"), "charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + "&locale=en_US&email=" + _Email.Split('@')[0] + "%40" + _Email.Split('@')[1] + "&pass="******"&persistent=1&default_persistent=1&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + "", _proxyAddress, intProxyPort, _proxyUsername, _proxyPassword); string PageSourceConfirmed11 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/?email_confirmed=1")); if (PageSourceConfirmed11.Contains("complete the sign-up process")) { Console.WriteLine("Account is not verified for : " + _Email); AddToListBox("Account is not verified for : " + _Email); } //LoggerVerify("Email verification completed for : " + Email); }
/// <summary> /// Returns Captcha Image from Facebook /// </summary> /// <param name="responseMessage"></param> /// <returns></returns> public string GetCaptchaImage(ref string responseMessage) { int intProxyPort = 80; Regex IdCheck = new Regex("^[0-9]*$"); if (!string.IsNullOrEmpty(_proxyPort) && IdCheck.IsMatch(_proxyPort)) { intProxyPort = int.Parse(_proxyPort); } AddToListBox("Fetching Captcha"); LogFacebookCreator("Fetching Captcha"); HttpHelper = new GlobusHttpHelper(); //Create new instance string pageSource = HttpHelper.getHtmlfromUrlProxy(new Uri("http://www.facebook.com/"), _proxyAddress, intProxyPort, _proxyUsername, _proxyPassword); #region CSS, JS, & Pixel requests to avoid Socket Detection ////**** update by ritesh 20-9-11 *****///////////////////////////////// #region Commented, done in next line ////CSS Request //foreach (string item in GetHrefsFromString(pageSource)) //{ // if (item.Contains(".css")) // { // string cssSource = item.Replace(" ", "").Trim(); // try // { // string res = HttpHelper.getHtmlfromUrl(new Uri(cssSource)); // } // catch (Exception) // { // } // } //} ////JS Request //string[] scriptArr = Regex.Split(pageSource, "/script>"); //foreach (string item in scriptArr) //{ // if (item.Contains("http://static.ak.fbcdn.net")) // { // int startIndx = item.LastIndexOf("src=") + "src=".Length + 1; // int endIndx = item.IndexOf(">", startIndx) - 1; // string jsSource = item.Substring(startIndx, endIndx - startIndx); // if (jsSource.StartsWith("http://static.ak.fbcdn.net")) // { // try // { // string res = HttpHelper.getHtmlfromUrl(new Uri(jsSource)); // } // catch (Exception) // { // } // } // } //} #endregion ///JS, CSS, Image Requests //RequestJSCSSIMG(pageSource, ref HttpHelper); RequestsJSCSSIMG.RequestJSCSSIMG(pageSource, ref HttpHelper); try { string req1 = HttpHelper.getHtmlfromUrl(new Uri("http://static.ak.fbcdn.net/rsrc.php/v1/yC/r/6n91uRFZJAi.js")); } catch (Exception) { } try { string req2 = HttpHelper.getHtmlfromUrl(new Uri("http://static.ak.fbcdn.net/rsrc.php/v1/yd/r/dpT-tcRYFZy.js")); } catch (Exception) { } ///Pixel request string reg_instanceValue = GetParamValue(pageSource, "reg_instance"); //string asyncSignal = RandomNumberGenerator.GenerateRandom(3000, 4000).ToString(); string asyncSignal = string.Empty; try { asyncSignal = RandomNumberGenerator.GenerateRandom(3000, 8000).ToString(); } catch (Exception) { } string pixel = HttpHelper.getHtmlfromUrl(new Uri("http://pixel.facebook.com/ajax/register/logging.php?action=form_focus®_instance=" + reg_instanceValue + "&asyncSignal=" + asyncSignal + "&__user=0")); #endregion //Delay after loading Sign Up //Thread.Sleep(12000); //string Response1 = HttpHelper.postFormDataProxy(new Uri("http://ocsp.digicert.com/"), "", proxyAddress, intProxyPort, proxyUsername, proxyPassword); //string Response12 = HttpHelper.postFormDataProxy(new Uri("http://ocsp.digicert.com/"), "", proxyAddress, intProxyPort, proxyUsername, proxyPassword); //string pageSource12 = HttpHelper.getHtmlfromUrlProxy(new Uri("http://static.ak.fbcdn.net/rsrc.php/v1/yS/r/STeWPW2kh0m.png"), proxyAddress, intProxyPort, proxyUsername, proxyPassword); //**** update by ritesh 20-9-11 *****///////////////////////////////// //*** For post_form_id ********//////////////////////////////////////////////// AddToListBox("searching the captcha data" + _Email); if (pageSource.Contains("post_form_id")) { string post_id = pageSource.Substring(pageSource.IndexOf("post_form_id"), 200); string[] Arr1 = post_id.Split('"'); post_form_id = Arr1[2]; } if (pageSource.Contains("lsd")) { string lsd_val = pageSource.Substring(pageSource.IndexOf("lsd"), 100); string[] Arr_lsd = lsd_val.Split('"'); lsd = Arr_lsd[2]; } if (pageSource.Contains("reg_instance")) { string reg_instance_val = pageSource.Substring(pageSource.IndexOf("reg_instance"), 200); string[] Arr_reg = reg_instance_val.Split('"'); reg_instance = Arr_reg[4]; } firstname = FirstName.Replace(" ", "%20"); lastname = LastName.Replace(" ", "%20"); reg_email__ = _Email.Replace("@", "%40"); reg_email_confirmation__ = _Email.Replace("@", "%40"); reg_passwd__ = _Password.Replace("@", "%40"); sex = SexSelect; birthday_month = RandomNumberGenerator.GenerateRandom(1, 12).ToString(); birthday_day = RandomNumberGenerator.GenerateRandom(1, 28).ToString(); birthday_year = RandomNumberGenerator.GenerateRandom(1980, 1990).ToString(); if (pageSource.Contains("captcha_persist_data")) { string captcha_persist_data_val = pageSource.Substring(pageSource.IndexOf("captcha_persist_data"), 500); string[] Arr_captcha_persist_data_val = captcha_persist_data_val.Split('"'); captcha_persist_data = Arr_captcha_persist_data_val[4]; } if (pageSource.Contains("captcha_session")) { string captcha_session_val = pageSource.Substring(pageSource.IndexOf("captcha_session"), 200); string[] Arr_captcha_session_val = captcha_session_val.Split('"'); captcha_session = Arr_captcha_session_val[4]; } if (pageSource.Contains("extra_challenge_params")) { string extra_challenge_params_val = pageSource.Substring(pageSource.IndexOf("extra_challenge_params"), 500); string[] Arr_extra_challenge_params_val = extra_challenge_params_val.Split('"'); authp_pisg_nonce_tt = Arr_extra_challenge_params_val[4]; extra_challenge_params = Arr_extra_challenge_params_val[4]; extra_challenge_params = extra_challenge_params.Replace("=", "%3D"); extra_challenge_params = extra_challenge_params.Replace("&", "%26"); } //AddToListBox("get the first url" + Email); ///Delay after filling info int delay = 0; try { delay = RandomNumberGenerator.GenerateRandom(minDelay, maxDelay)*1000; if (delay < 4000) { delay = RandomNumberGenerator.GenerateRandom(8000, 12000); } } catch (Exception) { } AddToListBox("Delaying for " + delay/1000 + " seconds"); Thread.Sleep(delay); ////////////////////////////////*****Gets Captcha URL****//////////////////////////////////////////////// string pageSourceCaptcha = HttpHelper.getHtmlfromUrl(new Uri("https://www.facebook.com/ajax/register.php?__a=3&post_form_id=" + post_form_id + "&lsd=" + lsd + "®_instance=" + reg_instance + "&locale=en_US&terms=on&abtest_registration_group=1&referrer=&md5pass=&validate_mx_records=1&ab_test_data=&firstname=" + firstname + "&lastname=" + lastname + "®_email__=" + reg_email__ + "®_email_confirmation__=" + reg_email_confirmation__ + "®_passwd__=" + reg_passwd__ + "&sex=" + sex + "&birthday_month=" + birthday_month + "&birthday_day=" + birthday_day + "&birthday_year=" + birthday_year + "&captcha_persist_data=" + captcha_persist_data + "&captcha_session=" + captcha_session + "&extra_challenge_params=" + extra_challenge_params + "&recaptcha_type=password&captcha_response=&ignore=captcha%7Cpc&__user=0")); //JS, CSS, Image Requests RequestsJSCSSIMG.RequestJSCSSIMG(pageSourceCaptcha, ref HttpHelper); if (!pageSourceCaptcha.Contains("There is an existing account associated with this email")) { if (pageSource.Contains("RegUtil.recaptcha_public_key")) { string recaptcha_public_key_val = pageSource.Substring(pageSource.IndexOf("RegUtil.recaptcha_public_key"), 200); string[] Arr_recaptcha_public_key = recaptcha_public_key_val.Split('"'); recaptcha_public_key = Arr_recaptcha_public_key[1]; } if (authp_pisg_nonce_tt != null) { string[] ArrpisgTemp = authp_pisg_nonce_tt.Split('='); authp = ArrpisgTemp[1]; authp = authp.Replace("&psig", ""); psig = ArrpisgTemp[2]; psig = psig.Replace("&nonce", ""); nonce = ArrpisgTemp[3]; nonce = nonce.Replace("&tt", ""); tt = ArrpisgTemp[4]; tt = tt.Replace("&time", ""); time = ArrpisgTemp[5]; time = time.Substring(0, 10); } AddToListBox("loading captcha" + _Email); string pageSourceCaptcha1 = HttpHelper.getHtmlfromUrl(new Uri("http://www.google.com/recaptcha/api/challenge?k=" + recaptcha_public_key + "&ajax=1&xcachestop=0.4159115800857506&authp=" + authp + "&psig=" + psig + "&nonce=" + nonce + "&tt=" + tt + "&time=" + time + "&new_audio_default=1")); ////JS, CSS, Image Requests //RequestsJSCSSIMG.RequestJSCSSIMG(pageSourceCaptcha1, ref HttpHelper); // string challenge = string.Empty; if (pageSourceCaptcha1.Contains("challenge")) { string challenge_val = pageSourceCaptcha1.Substring(pageSourceCaptcha1.IndexOf("challenge"), 300); string[] Arr_challenge = challenge_val.Split('\''); challenge = Arr_challenge[1]; } return "http://www.google.com/recaptcha/api/image?c=" + challenge; //string pageSourceCaptcha2 = HttpHelper.getHtmlfromUrlImage(new Uri("http://www.google.com/recaptcha/api/image?c=" + challenge)); } else { responseMessage = "There is an existing account with " + _Email; AddToListBox("There is an existing account with " + _Email); return null; } }
public List <string> GetAllBoardNames_new1(string screenName) { BaseLib.GlobusRegex rgx = new GlobusRegex(); Globussoft.GlobusHttpHelper httpHelper = new Globussoft.GlobusHttpHelper(); //GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Getting All Board Names ]"); string UserUrl = "http://pinterest.com/" + screenName; string BoardPage = httpHelper.getHtmlfromUrl(new Uri(UserUrl), "", "", ""); string[] data = Regex.Split(BoardPage, "is_collaborative"); foreach (var itemdata in data) { try { string boardUrl = Utils.Utils.getBetween(itemdata, ", \"url\":", ",").Replace("\"", "").Trim(); if (!lstBoardUrls.Contains(boardUrl) && !string.IsNullOrEmpty(boardUrl)) { lstBoardUrls.Add(boardUrl); } if (itemdata.Contains("board_id")) { string boardId = Utils.Utils.getBetween(itemdata, "board_id\":", ",").Replace("\"", "").Trim(); if (!lstBoardId.Contains(boardId)) { lstBoardId.Add(boardId); } } } catch (Exception ex) { GlobusLogHelper.log.Error("Error :" + ex.StackTrace); } } string[] Items = Regex.Split(BoardPage, "item"); int counter = 0; foreach (string item in Items) { try { if (item.Contains("id=\\\"Board") && item.Contains("boardLinkWrapper")) { //if (counter == 1) { string[] Data = System.Text.RegularExpressions.Regex.Split(item, "boardLinkWrapper"); foreach (string Dataitem in Data) { if (Dataitem.Contains("boardName")) { string BoardUrl = string.Empty; int startIndex = Dataitem.IndexOf("title"); int LastPoint = Dataitem.IndexOf("<h2"); string Board = Dataitem.Substring(startIndex, LastPoint).Replace("\\n", string.Empty).Replace("\"", "").Replace("<div class=\\b", string.Empty).Replace(" ", string.Empty).Replace("\"title\"", "").Replace("</div", ""); BoardUrl = rgx.StripTagsRegex(Board); try { Board = Utils.Utils.getBetween(BoardUrl, ">>", "<"); //modified done if (Board == "") { Board = Utils.Utils.getBetween(BoardUrl, "title=", ">").Replace("\\", "").Trim(); } } catch (Exception ex) { }; if (!BoardNames.Contains(Board)) { BoardNames.Add(Board); //DropDowenBox.Items.Add(Board); } } } } counter++; } } catch (Exception ex) { GlobusLogHelper.log.Error("Error :" + ex.StackTrace); } } return(BoardNames); }
public static void RequestJSCSSIMG(string pageSource, ref GlobusHttpHelper HttpHelper) { ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; List<string> listURLs = new List<string>(); try { //CSS Request foreach (string item in GetHrefsFromString(pageSource)) { if (item.Contains(".css")) { string cssSource = item.Replace(" ", "").Trim(); try { //string res = HttpHelper.getHtmlfromUrl(new Uri(cssSource)); listURLs.Add(cssSource); } catch (Exception) { Thread.Sleep(500); try { string res = HttpHelper.getHtmlfromUrl(new Uri(cssSource),"" ,""); } catch (Exception) { } } } } //JS Request string[] scriptArr = Regex.Split(pageSource, "/script>"); foreach (string item in scriptArr) { try { if (item.Contains("static.ak.") || item.Contains("profile.ak.")) { int startIndx = item.LastIndexOf("src=") + "src=".Length + 1; int endIndx = item.IndexOf(">", startIndx) - 1; string jsSource = item.Substring(startIndx, endIndx - startIndx); //if (jsSource.StartsWith("http://static.ak.") || jsSource.StartsWith("https://static.ak.") || jsSource.StartsWith("http://s-static.ak.") || jsSource.StartsWith("https://s-static.ak.")) if (jsSource.StartsWith("http://static.ak.") || jsSource.StartsWith("https://static.ak.") || jsSource.StartsWith("http://s-static.ak.") || jsSource.StartsWith("https://s-static.ak.") || jsSource.StartsWith("http://profile.ak.") || jsSource.StartsWith("https://profile.ak.") || jsSource.StartsWith("http://s-profile.ak.") || jsSource.StartsWith("https://s-profile.ak.")) { try { //string res = HttpHelper.getHtmlfromUrl(new Uri(jsSource)); listURLs.Add(jsSource); } catch (Exception) { Thread.Sleep(500); try { string res = HttpHelper.getHtmlfromUrl(new Uri(jsSource),"" ,""); } catch (Exception) { } } } } } catch (Exception) { } } string[] moreScriptArray = Regex.Split(pageSource, "\"src\":"); foreach (string item in moreScriptArray) { try { int startIndx = 1; int endIndx = item.IndexOf("\"", startIndx); string jsSource = item.Substring(startIndx, endIndx - startIndx).Replace("\\", ""); if (jsSource.Contains(".js")) { //string res = HttpHelper.getHtmlfromUrl(new Uri(jsSource)); listURLs.Add(jsSource); } } catch (Exception) { } } ///IMG Request string[] imageArr = Regex.Split(pageSource, "<img"); foreach (string item in imageArr) { try { if (item.Contains("static.ak.") || item.Contains("profile.ak.")) { int startIndx = item.IndexOf("src=") + "src=".Length + 1; int endIndx = item.IndexOf("\"", startIndx + 1); string jsSource = item.Substring(startIndx, endIndx - startIndx); //if (jsSource.StartsWith("http://static.ak.") || jsSource.StartsWith("https://static.ak.") || jsSource.StartsWith("http://s-static.ak.") || jsSource.StartsWith("https://s-static.ak.")) if (jsSource.StartsWith("http://static.ak.") || jsSource.StartsWith("https://static.ak.") || jsSource.StartsWith("http://s-static.ak.") || jsSource.StartsWith("https://s-static.ak.") || jsSource.StartsWith("http://profile.ak.") || jsSource.StartsWith("https://profile.ak.") || jsSource.StartsWith("http://s-profile.ak.") || jsSource.StartsWith("https://s-profile.ak.")) { if (jsSource.Contains(".png") || jsSource.Contains(".gif") || jsSource.Contains(".jpg") || jsSource.Contains(".jpeg")) { try { //string res = HttpHelper.getHtmlfromUrl(new Uri(jsSource)); listURLs.Add(jsSource); } catch (Exception) { Thread.Sleep(500); try { string res = HttpHelper.getHtmlfromUrl(new Uri(jsSource),"" ,""); } catch (Exception) { } } } } } } catch (Exception) { } } listURLs = listURLs.Distinct().ToList(); foreach (string item in listURLs) { try { string res = HttpHelper.getHtmlfromUrl(new Uri(item),"" ,""); } catch { }; } } catch { }; }
public void StartLikeMultiThreaded(object objparameters) { PinInterestUser objPinUser = new PinInterestUser(); try { if (!isStopLike) { try { lstThreadsLike.Add(Thread.CurrentThread); lstThreadsLike.Distinct().ToList(); Thread.CurrentThread.IsBackground = true; } catch (Exception ex) { GlobusLogHelper.log.Error("Error : " + ex.StackTrace); } try { Array paramsArray = new object[1]; paramsArray = (Array)objparameters; objPinUser = (PinInterestUser)paramsArray.GetValue(0); try { if (chkBox_Like_DivideData == true) { list_lstTargetLike_item = list_lstTargetLike[LstCounter_Like]; } else { list_lstTargetLike_item = ClGlobul.lstAddToBoardUserNames; } } catch { } #region Login if (!objPinUser.isloggedin) { GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Logging With " + objPinUser.Username + " ]"); if (string.IsNullOrEmpty(objPinUser.ProxyPort)) { objPinUser.ProxyPort = "80"; } bool checkLogin = ObjAccountManager.LoginPinterestAccount1forlee(ref objPinUser, objPinUser.Username, objPinUser.Password, objPinUser.ProxyAddress, objPinUser.ProxyPort, objPinUser.ProxyUsername, objPinUser.ProxyPassword, objPinUser.ScreenName); if (!checkLogin) { checkLogin = ObjAccountManager.LoginPinterestAccount1forlee(ref objPinUser, objPinUser.Username, objPinUser.Password, objPinUser.ProxyAddress, objPinUser.ProxyPort, objPinUser.ProxyUsername, objPinUser.ProxyPassword, objPinUser.ScreenName); if (!checkLogin) { GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Not Logged In With " + objPinUser.Username + " ]"); DeadAccCount++; objDelegateNoOfDeadAcc_Like(DeadAccCount); return; } } string checklogin = httpHelper.getHtmlfromUrl(new Uri("https://www.pinterest.com")); } if (objPinUser.isloggedin == true) { try { GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Logged In With : " + objPinUser.Username + " ]"); ActiveAccCount++; objDelegateNoOfActiveAcc_Like(ActiveAccCount); StartActionMultithreadLike(ref objPinUser, list_lstTargetLike_item); } catch (Exception ex) { GlobusLogHelper.log.Error("Error : " + ex.StackTrace); } } #endregion } catch (Exception ex) { GlobusLogHelper.log.Error("Error : " + ex.StackTrace); } } } catch (Exception ex) { GlobusLogHelper.log.Error("Error : " + ex.StackTrace); } finally { try { if (countThreadControllerLike > Nothread_Like) { lock (LikeObjThread) { Monitor.Pulse(LikeObjThread); } Likedata_count--; } } catch (Exception ex) { GlobusLogHelper.log.Error(" Error : " + ex.StackTrace); } countThreadControllerLike--; } }
//public List<string> GetHashTags_New(out string returnStatus) //{ // List<string> HashTags = new List<string>(); // string authenticityToken = string.Empty; // string Woeid = string.Empty; // try // { // //string pagesource = globushttpHelper.getHtmlfromUrl(new Uri("https://api.twitter.com/1/trends/daily.json"), "", ""); // Globussoft.GlobusHttpHelper HttpHelper = new Globussoft.GlobusHttpHelper(); // string twtPage = HttpHelper.getHtmlfromUrl(new Uri("https://twitter.com/"), "", ""); // try // { // int startindex = twtPage.IndexOf("name=\"authenticity_token\""); // string start = twtPage.Substring(startindex).Replace("name=\"authenticity_token\"", ""); // int endindex = start.IndexOf("\">"); // string end = start.Substring(0, endindex).Replace("value=\"", ""); // authenticityToken = end; // } // catch (Exception ex) // { // Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> GetHashTags_New() -- authenticityToken --> " + ex.Message, Globals.Path_TwitterDataScrapper); // Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> GetHashTags_New() -- authenticityToken --> " + ex.Message, Globals.Path_TwtErrorLogs); // } // string pagesource = HttpHelper.postFormData(new Uri("https://twitter.com/trends/dialog"), "authenticity_token=" + authenticityToken + "&pc=true&woeid=1", "https://twitter.com/", "", "", "", ""); // string[] arrayDataWoied = Regex.Split(pagesource, "data-woeid"); // arrayDataWoied = arrayDataWoied.Skip(1).ToArray(); // foreach (string item in arrayDataWoied) // { // try // { // int startindex = item.IndexOf("=\\\""); // string start = item.Substring(startindex).Replace("=\\\"", ""); // int endindex = start.IndexOf("\\\""); // string end = start.Substring(0, endindex).Replace("value=\"", ""); // Woeid = end; // } // catch (Exception ex) // { // Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> GetHashTags_New() -- Woeid --> " + ex.Message, Globals.Path_TwitterDataScrapper); // Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> GetHashTags_New() -- Woeid --> " + ex.Message, Globals.Path_TwtErrorLogs); // } // string HastagString = HttpHelper.getHtmlfromUrl(new Uri("https://twitter.com/trends?k=" + Woeid + "&pc=true&personalized=false&src=module&woeid=" + Woeid + ""), "https://twitter.com/", ""); // string[] datatrendname = Regex.Split(HastagString, "data-trend-name="); // datatrendname = datatrendname.Skip(1).ToArray(); // foreach (string trend in datatrendname) // { // try // { // if (!trend.Contains("#\\")) // { // int startindex = trend.IndexOf("\\\""); // string start = trend.Substring(startindex).Replace("\\\"", ""); // int endindex = start.IndexOf("\\"); // string end = start.Substring(0, endindex).Replace("value=\"", "").Replace("\\\"", ""); // if (!string.IsNullOrEmpty(end)) // { // HashTags.Add(end); // Log("[ " + DateTime.Now + " ] => [ " + end + " ]"); // } // } // } // catch (Exception ex) // { // Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> GetHashTags_New() -- Woeid --> " + ex.Message, Globals.Path_TwitterDataScrapper); // Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> GetHashTags_New() -- Woeid --> " + ex.Message, Globals.Path_TwtErrorLogs); // } // } // } // returnStatus = "No Error"; // return HashTags; // } // catch (Exception ex) // { // Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> GetHashTags_New() --> " + ex.Message, Globals.Path_TwitterDataScrapper); // Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> GetHashTags_New() --> " + ex.Message, Globals.Path_TwtErrorLogs); // returnStatus = "Error"; // return HashTags; // } //} #endregion public List <string> GetHashTags_New(out string returnStatus) { List <string> HashTags = new List <string>(); string authenticityToken = string.Empty; string Woeid = string.Empty; List <string> lstWoeid = new List <string>(); Dictionary <string, string> dicRemoveDuplicate = new Dictionary <string, string>(); try { //string pagesource = globushttpHelper.getHtmlfromUrl(new Uri("https://api.twitter.com/1/trends/daily.json"), "", ""); Globussoft.GlobusHttpHelper HttpHelper = new Globussoft.GlobusHttpHelper(); string twtPage = HttpHelper.getHtmlfromUrl(new Uri("https://twitter.com/"), "", ""); try { int startindex = twtPage.IndexOf("name=\"authenticity_token\""); string start = twtPage.Substring(startindex).Replace("name=\"authenticity_token\"", ""); int endindex = start.IndexOf("\">"); string end = start.Substring(0, endindex).Replace("value=\"", ""); authenticityToken = end.Trim(); } catch (Exception ex) { Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> GetHashTags_New() -- authenticityToken --> " + ex.Message, Globals.Path_TwitterDataScrapper); Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> GetHashTags_New() -- authenticityToken --> " + ex.Message, Globals.Path_TwtErrorLogs); } string pagesource = HttpHelper.postFormData(new Uri("https://twitter.com/trends/dialog"), "authenticity_token=" + authenticityToken + "&pc=true&woeid=0", "https://twitter.com/", "", "", "", ""); string[] arrayDataWoied = Regex.Split(pagesource, "data-woeid"); arrayDataWoied = arrayDataWoied.Skip(1).ToArray(); foreach (string item in arrayDataWoied) { try { int startindex = item.IndexOf("=\\\""); string start = item.Substring(startindex).Replace("=\\\"", ""); int endindex = start.IndexOf("\\\""); string end = start.Substring(0, endindex).Replace("value=\"", ""); Woeid = end; lstWoeid.Add(Woeid); lstWoeid = lstWoeid.Distinct().ToList(); } catch (Exception ex) { Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> GetHashTags_New() -- Woeid --> " + ex.Message, Globals.Path_TwitterDataScrapper); Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> GetHashTags_New() -- Woeid --> " + ex.Message, Globals.Path_TwtErrorLogs); } } foreach (string tempWoeid in lstWoeid) { string HastagString = HttpHelper.getHtmlfromUrl(new Uri("https://twitter.com/trends?k=" + tempWoeid + "&pc=true&personalized=false&src=module&woeid=" + tempWoeid + ""), "https://twitter.com/", ""); //string HastagString = HttpHelper.getHtmlfromUrl(new Uri("https://twitter.com/trends?k=" + tempWoeid + "&pc=true&src=module"), "https://twitter.com/", ""); string[] datatrendname = Regex.Split(HastagString, "data-trend-name="); datatrendname = datatrendname.Skip(1).ToArray(); foreach (string trend in datatrendname) { try { if (!trend.Contains("#\\")) { int startindex = trend.IndexOf("\\\""); string start = trend.Substring(startindex).Replace("\\\"", ""); int endindex = start.IndexOf("\\"); string end = start.Substring(0, endindex).Replace("value=\"", "").Replace("\\\"", ""); if (!string.IsNullOrEmpty(end)) { try { dicRemoveDuplicate.Add(end, end); HashTags.Add(end); Log("[ " + DateTime.Now + " ] => [ " + end + " ]"); } catch (Exception) { } } } } catch (Exception ex) { Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> GetHashTags_New() -- Woeid --> " + ex.Message, Globals.Path_TwitterDataScrapper); Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> GetHashTags_New() -- Woeid --> " + ex.Message, Globals.Path_TwtErrorLogs); } } } //} returnStatus = "No Error"; return(HashTags); } catch (Exception ex) { Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> GetHashTags_New() --> " + ex.Message, Globals.Path_TwitterDataScrapper); Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> GetHashTags_New() --> " + ex.Message, Globals.Path_TwtErrorLogs); returnStatus = "Error"; return(HashTags); } }
public void StartInviteMultiThreaded(object objparameters) { PinInterestUser objPinUser = new PinInterestUser(); try { Globussoft.GlobusHttpHelper httpHelper = new Globussoft.GlobusHttpHelper(); Accounts Obj_AccountManager = new Accounts(); if (!isStopInvite) { try { lstThreadsInvite.Add(Thread.CurrentThread); lstThreadsInvite.Distinct().ToList(); Thread.CurrentThread.IsBackground = true; } catch (Exception ex) { }; try { Array paramsArray = new object[1]; paramsArray = (Array)objparameters; objPinUser = (PinInterestUser)paramsArray.GetValue(0); #region Login if (!objPinUser.isloggedin) { GlobusLogHelper.log.Info(" => [ Logging In With : " + objPinUser.Username + " ]"); bool checkLogin; if (string.IsNullOrEmpty(objPinUser.ProxyPort)) { objPinUser.ProxyPort = "80"; } try { //checkLogin = ObjAccountManager.LoginPinterestAccount1(ref objPinUser, objPinUser.Username, objPinUser.Password, objPinUser.ProxyAddress, objPinUser.ProxyPort, objPinUser.ProxyUsername, objPinUser.ProxyPassword, objPinUser.ScreenName); checkLogin = ObjAccountManager.LoginPinterestAccount1forlee(ref objPinUser, objPinUser.Username, objPinUser.Password, objPinUser.ProxyAddress, objPinUser.ProxyPort, objPinUser.ProxyUsername, objPinUser.ProxyPassword, objPinUser.ScreenName); if (!checkLogin) { GlobusLogHelper.log.Info(" => [ Logging UnSuccessfull : " + objPinUser.Username + " ]"); return; } string checklogin = httpHelper.getHtmlfromUrl(new Uri("https://www.pinterest.com")); //GlobusLogHelper.log.Info(" => [ Logged In With : " + objPinUser.Username + " ]"); //StartActionMultithreadInvite(ref objPinUser); } catch { }; } if (objPinUser.isloggedin == true) { try { GlobusLogHelper.log.Info(" => [ Logged In With : " + objPinUser.Username + " ]"); StartActionMultithreadInvite(ref objPinUser); } catch (Exception ex) { GlobusLogHelper.log.Error(" Error :" + ex.StackTrace); } } #endregion } catch (Exception ex) { GlobusLogHelper.log.Error(" Error :" + ex.StackTrace); } } } catch (Exception ex) { GlobusLogHelper.log.Error(" Error :" + ex.StackTrace); } finally { try { if (countThreadControllerInvite > Nothread_Invite) { lock (InviteObjThread) { Monitor.Pulse(InviteObjThread); } Invitedata_count--; } } catch (Exception ex) { GlobusLogHelper.log.Error(" Error : " + ex.StackTrace); } countThreadControllerInvite--; //if (Invitedata_count == 0) //|| DivideByUserinput < 0) //{ GlobusLogHelper.log.Info(" => [ PROCESS COMPLETED " + " For " + objPinUser.Username + " ]"); GlobusLogHelper.log.Info("---------------------------------------------------------------------------------------------------------------------------"); //} } }
public List<string> GetHashTags_New(out string returnStatus) { List<string> HashTags = new List<string>(); string authenticityToken = string.Empty; string Woeid = string.Empty; List<string> lstWoeid = new List<string>(); Dictionary<string, string> dicRemoveDuplicate = new Dictionary<string, string>(); try { //string pagesource = globushttpHelper.getHtmlfromUrl(new Uri("https://api.twitter.com/1/trends/daily.json"), "", ""); Globussoft.GlobusHttpHelper HttpHelper = new Globussoft.GlobusHttpHelper(); string twtPage = HttpHelper.getHtmlfromUrl(new Uri("https://twitter.com/"), "", ""); try { int startindex = twtPage.IndexOf("name=\"authenticity_token\""); string start = twtPage.Substring(startindex).Replace("name=\"authenticity_token\"", ""); int endindex = start.IndexOf("\">"); string end = start.Substring(0, endindex).Replace("value=\"", ""); authenticityToken = end.Trim(); } catch (Exception ex) { Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> GetHashTags_New() -- authenticityToken --> " + ex.Message, Globals.Path_TwitterDataScrapper); Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> GetHashTags_New() -- authenticityToken --> " + ex.Message, Globals.Path_TwtErrorLogs); } string pagesource = HttpHelper.postFormData(new Uri("https://twitter.com/trends/dialog"), "authenticity_token=" + authenticityToken + "&pc=true&woeid=0", "https://twitter.com/", "", "", "", ""); string[] arrayDataWoied = Regex.Split(pagesource, "data-woeid"); arrayDataWoied = arrayDataWoied.Skip(1).ToArray(); foreach (string item in arrayDataWoied) { try { int startindex = item.IndexOf("=\\\""); string start = item.Substring(startindex).Replace("=\\\"", ""); int endindex = start.IndexOf("\\\""); string end = start.Substring(0, endindex).Replace("value=\"", ""); Woeid = end; lstWoeid.Add(Woeid); lstWoeid = lstWoeid.Distinct().ToList(); } catch (Exception ex) { Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> GetHashTags_New() -- Woeid --> " + ex.Message, Globals.Path_TwitterDataScrapper); Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> GetHashTags_New() -- Woeid --> " + ex.Message, Globals.Path_TwtErrorLogs); } } foreach (string tempWoeid in lstWoeid) { string HastagString = HttpHelper.getHtmlfromUrl(new Uri("https://twitter.com/trends?k=" + tempWoeid + "&pc=true&personalized=false&src=module&woeid=" + tempWoeid + ""), "https://twitter.com/", ""); //string HastagString = HttpHelper.getHtmlfromUrl(new Uri("https://twitter.com/trends?k=" + tempWoeid + "&pc=true&src=module"), "https://twitter.com/", ""); string[] datatrendname = Regex.Split(HastagString, "data-trend-name="); datatrendname = datatrendname.Skip(1).ToArray(); foreach (string trend in datatrendname) { try { if (!trend.Contains("#\\")) { int startindex = trend.IndexOf("\\\""); string start = trend.Substring(startindex).Replace("\\\"", ""); int endindex = start.IndexOf("\\"); string end = start.Substring(0, endindex).Replace("value=\"", "").Replace("\\\"", ""); if (!string.IsNullOrEmpty(end)) { try { dicRemoveDuplicate.Add(end, end); HashTags.Add(end); Log("[ " + DateTime.Now + " ] => [ " + end + " ]"); } catch (Exception) { } } } } catch (Exception ex) { Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> GetHashTags_New() -- Woeid --> " + ex.Message, Globals.Path_TwitterDataScrapper); Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> GetHashTags_New() -- Woeid --> " + ex.Message, Globals.Path_TwtErrorLogs); } } } #region Old Code //pagesource = HttpHelper.postFormData(new Uri("https://twitter.com/trends/dialog"), "authenticity_token=" + authenticityToken + "&pc=true&woeid=" + Woeid, "https://twitter.com/", "", "", "", ""); //string[] datatrendname = Regex.Split(pagesource, "data-woeid="); //datatrendname = datatrendname.Skip(2).ToArray(); //foreach (string trend in datatrendname) //{ // try // { // int startindex = trend.IndexOf("\\\""); // string start = trend.Substring(startindex).Replace("\\\"", ""); // int endindex = start.IndexOf("\\"); // string end = start.Substring(0, endindex).Replace("value=\"", "").Replace("\\\"", ""); // String datawoeid = end; // //https://twitter.com/trends?k=23424848&pc=true&personalized=false&src=module&woeid=23424848 // string HastagString = HttpHelper.getHtmlfromUrl(new Uri("https://twitter.com/trends?k=" + Woeid + "&pc=true&personalized=false&src=module&woeid=" + Woeid + ""), "https://twitter.com/", ""); // if (!string.IsNullOrEmpty(end)) // { // HashTags.Add(end); // Log(end); // } // } // catch (Exception ex) // { // Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> GetHashTags_New() -- Woeid --> " + ex.Message, Globals.Path_TwitterDataScrapper); // Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> GetHashTags_New() -- Woeid --> " + ex.Message, Globals.Path_TwtErrorLogs); // } //} #endregion //} returnStatus = "No Error"; return HashTags; } catch (Exception ex) { Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> GetHashTags_New() --> " + ex.Message, Globals.Path_TwitterDataScrapper); Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> GetHashTags_New() --> " + ex.Message, Globals.Path_TwtErrorLogs); returnStatus = "Error"; return HashTags; } }
public static bool GetStatusLinks(string username) { int counter = 0; Globussoft.GlobusHttpHelper httpHelper = new Globussoft.GlobusHttpHelper(); string user_id = string.Empty; bool tooManyLinks = true; try { string text = string.Empty; string PageSource = string.Empty; //http://a0.twimg.com/sticky/default_profile_images/default_profile_0_normal.png if (!string.IsNullOrEmpty(username) && NumberHelper.ValidateNumber(username)) { PageSource = httpHelper.getHtmlfromUrl(new Uri("https://api.twitter.com/1/statuses/user_timeline.xml?include_entities=true&inc%E2%80%8C%E2%80%8Blude_rts=true&include_rts=1&user_id=" + username + "&count=" + noOfstatus), "", ""); } else { PageSource = httpHelper.getHtmlfromUrl(new Uri("https://api.twitter.com/1/statuses/user_timeline.xml?include_entities=true&inc%E2%80%8C%E2%80%8Blude_rts=true&include_rts=1&screen_name=" + username + "&count=" + noOfstatus), "", ""); } if (!string.IsNullOrEmpty(PageSource) && PageSource.Contains("Sorry, that page does not exist")) //https://api.twitter.com/1/statuses/user_timeline.xml?include_entities=true&inc%E2%80%8C%E2%80%8Blude_rts=true&include_rts=1&screen_name=vikas&count=20" + username + "&count=" + noOfstatus), "", "" { return tooManyLinks; } if (!string.IsNullOrEmpty(PageSource)) { string[] statusArray = Regex.Split(PageSource, "<status>"); statusArray = statusArray.Skip(1).ToArray(); foreach (string Status in statusArray) { try { int indexStart = Status.IndexOf("<text>"); if (Status.Contains("<profile_image_url>")) { string start = Status.Substring(indexStart); int endIndex = start.IndexOf("</text>"); string end = start.Substring(0, endIndex); text = end.Replace("<text>", ""); } List<string> GetHrefs = GlobusRegex.GetHrefsFromString(text); if (GetHrefs.Count >= 1) { counter++; } } catch (Exception ex) { Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> GetStatusLinks() -- " + username + " --> " + ex.Message, Globals.Path_TwitterDataScrapper); Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> GetStatusLinks() -- " + username + " --> " + ex.Message, Globals.Path_TwtErrorLogs); } } //FollowingsFollowersRatio_user_id = (count_Followings_user_id * 100) / count_Followers_user_id; int PerLinks = (counter * 100) / 20; //double PerLinks = a * 100; if (PerLinks > Percentage) { tooManyLinks = false; } } else { tooManyLinks = false; } } catch (Exception ex) { Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> GetStatusLinks() -- " + username + " --> " + ex.Message, Globals.Path_TwitterDataScrapper); Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> GetStatusLinks() -- " + username + " --> " + ex.Message, Globals.Path_TwtErrorLogs); } return tooManyLinks; }
/// <summary> /// Sends Http Request to URL sent and also sends Request to gif URL, and 2 more URLs /// </summary> /// <param name="ConfemUrl">Facebook Confirmation URL</param> /// <param name="gif"></param> /// <param name="logpic"></param> public void LoginVerfyOld(string ConfemUrl, string gif, string logpic) { Globussoft.GlobusHttpHelper HttpHelper = new Globussoft.GlobusHttpHelper(); int intProxyPort = 80; Regex IdCheck = new Regex("^[0-9]*$"); if (!string.IsNullOrEmpty(proxyPort) && IdCheck.IsMatch(proxyPort)) { intProxyPort = int.Parse(proxyPort); } string PageSourse1 = HttpHelper.getHtmlfromUrlProxy(new Uri(ConfemUrl), proxyAddress, intProxyPort, proxyUser, proxyPass); //string PageSourse1 = HttpHelper.getHtmlfromUrlProxy(new Uri(url), "127.0.0.1", 8888, "", ""); string valueLSD = "name=" + "\"lsd\""; string pageSource = HttpHelper.getHtmlfromUrl(new Uri("https://www.facebook.com/login.php")); int startIndex = pageSource.IndexOf(valueLSD) + 18; string value = pageSource.Substring(startIndex, 5); //Log("Logging in with " + Username); string ResponseLogin = HttpHelper.postFormData(new Uri("https://www.facebook.com/login.php?login_attempt=1"), "charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + "&locale=en_US&email=" + Username.Split('@')[0] + "%40" + Username.Split('@')[1] + "&pass="******"&persistent=1&default_persistent=1&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + ""); /////ssss gif &s=a parse com &s=a////////////////////////// string PageSourse12 = HttpHelper.getHtmlfromUrl(new Uri(ConfemUrl)); string PageSourse13 = HttpHelper.getHtmlfromUrl(new Uri(gif)); string PageSourse14 = HttpHelper.getHtmlfromUrl(new Uri(logpic + "&s=a")); string PageSourse15 = HttpHelper.getHtmlfromUrl(new Uri(logpic)); string PageSourse16 = HttpHelper.getHtmlfromUrl(new Uri(ConfemUrl)); string PageSourceConfirmed = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/?email_confirmed=1")); string pageSourceCheck = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=contact_importer")); //** FB Account Check email varified or not ***********************************************************************************// #region FB Account Check email varified or not string pageSrc1 = string.Empty; string pageSrc2 = string.Empty; string pageSrc3 = string.Empty; string pageSrc4 = string.Empty; string substr1 = string.Empty; if (pageSourceCheck.Contains("Are your friends already on Facebook?") && pageSourceCheck.Contains("Skip this step")) { pageSrc1 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=classmates_coworkers")); } if (pageSrc1.Contains("Fill out your Profile Info") && pageSrc1.Contains("Skip")) { pageSrc2 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=upload_profile_pic")); } if (pageSrc2.Contains("Set your profile picture") && pageSrc2.Contains("Skip")) { pageSrc3 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=summary")); } if (pageSrc3.Contains("complete the sign-up process")) { //LoggerWallPoste("not varified through " + Username); } if (pageSourceCheck.Contains("complete the sign-up process")) { //LoggerWallPoste("not varified through Email" + Username); } #endregion //** FB Account Check email varified or not ***********************************************************************************// string pageSourceHome = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/home.php")); //** User Id ***************////////////////////////////////// string UsreId = string.Empty; string ProFilePost = string.Empty; ////**Post Message For User***********************///////////////////////////////////////////////////// int count = 0; if (pageSourceHome.Contains("http://www.facebook.com/profile.php?id=")) { string[] arrUser = Regex.Split(pageSourceHome, "href"); foreach (String itemUser in arrUser) { if (!itemUser.Contains("<!DOCTYPE")) { if (itemUser.Contains("http://www.facebook.com/profile.php?id=")) { string[] arrhre = itemUser.Split('"'); ProFilePost = arrhre[1]; break; } } } } if (ProFilePost.Contains("http://www.facebook.com/profile.php?id=")) { UsreId = ProFilePost.Replace("http://www.facebook.com/profile.php?id=", ""); } //*** User Id **************////////////////////////////////// //*** Post Data **************////////////////////////////////// string fb_dtsg = pageSourceHome.Substring(pageSourceHome.IndexOf("fb_dtsg") + 16, 8); string post_form_id = pageSourceHome.Substring(pageSourceHome.IndexOf("post_form_id"), 200); string[] Arr = post_form_id.Split('"'); post_form_id = Arr[2]; post_form_id = post_form_id.Replace("\\", ""); post_form_id = post_form_id.Replace("\\", ""); post_form_id = post_form_id.Replace("\\", ""); fb_dtsg = Arr[6]; string Response1 = HttpHelper.postFormData(new Uri("http://www.facebook.com/desktop/notifier/transfer.php?__a=1"), "post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&lsd&post_form_id_source=AsyncRequest&__user="******"http://www.facebook.com/ajax/httponly_cookies.php?dc=snc2&__a=1"), "keys[0]=1150335208&post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&lsd&post_form_id_source=AsyncRequest&__user="******"http://www.facebook.com/ajax/contextual_help.php?__a=1&set_name=welcome&__user="******"http://www.facebook.com/")); pageSourceCheck1111 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/")); if (pageSourceCheck1111.Contains("complete the sign-up process")) { Console.WriteLine("the account is not verified"); //LoggerWallPoste("not varified through Email" + Username); } string pageSource11 = HttpHelper.getHtmlfromUrl(new Uri("https://www.facebook.com/login.php")); startIndex = pageSource.IndexOf(valueLSD) + 18; value = pageSource.Substring(startIndex, 5); //Log("Logging in with " + Username); string ResponseLogin11 = HttpHelper.postFormData(new Uri("https://www.facebook.com/login.php?login_attempt=1"), "charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + "&locale=en_US&email=" + Username.Split('@')[0] + "%40" + Username.Split('@')[1] + "&pass="******"&persistent=1&default_persistent=1&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + ""); string PageSourceConfirmed11 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/?email_confirmed=1")); if (PageSourceConfirmed11.Contains("complete the sign-up process")) { Console.WriteLine("the account is not verified"); //LoggerWallPoste("not varified through Email" + Username); } }
public void LoginVerfy(string ConfemUrl, string gif, string logpic) { Globussoft.GlobusHttpHelper HttpHelper = new Globussoft.GlobusHttpHelper(); int intProxyPort = 80; Regex IdCheck = new Regex("^[0-9]*$"); if (!string.IsNullOrEmpty(proxyPort) && IdCheck.IsMatch(proxyPort)) { intProxyPort = int.Parse(proxyPort); } string PageSourse1 = HttpHelper.getHtmlfromUrlProxy(new Uri(ConfemUrl), proxyAddress, intProxyPort, proxyUser, proxyPass); //string PageSourse1 = HttpHelper.getHtmlfromUrlProxy(new Uri(url), "127.0.0.1", 8888, "", ""); string valueLSD = "name=" + "\"lsd\""; string pageSource = HttpHelper.getHtmlfromUrl(new Uri("https://www.facebook.com/login.php")); int startIndex = pageSource.IndexOf(valueLSD) + 18; string value = pageSource.Substring(startIndex, 5); //Log("Logging in with " + Username); //string ResponseLogin = HttpHelper.postFormData(new Uri("https://www.facebook.com/login.php?login_attempt=1"), "charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + "&locale=en_US&email=" + Email.Split('@')[0] + "%40" + Email.Split('@')[1] + "&pass="******"&persistent=1&default_persistent=1&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + ""); string ResponseLogin = HttpHelper.postFormDataProxy(new Uri("https://www.facebook.com/login.php?login_attempt=1"), "charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + "&locale=en_US&email=" + Username.Split('@')[0] + "%40" + Username.Split('@')[1] + "&pass="******"&persistent=1&default_persistent=1&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + "", proxyAddress, intProxyPort, proxyUser, proxyPass); //string ResponseLogin = HttpHelper.postFormData(new Uri("https://www.facebook.com/login.php?login_attempt=1"), "charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + "&locale=en_US&email=" + "rani.khanna" + "%40" + "hotmail.com" + "&pass="******"s15121985" + "&persistent=1&default_persistent=1&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + ""); /////ssss gif &s=a parse com &s=a////////////////////////// string PageSourse12 = HttpHelper.getHtmlfromUrl(new Uri(ConfemUrl)); try { string PageSourse13 = HttpHelper.getHtmlfromUrl(new Uri(gif)); } catch (Exception) { } try { string PageSourse14 = HttpHelper.getHtmlfromUrl(new Uri(logpic + "&s=a")); } catch (Exception) { } try { string PageSourse15 = HttpHelper.getHtmlfromUrl(new Uri(logpic)); } catch (Exception) { } //** User Id ***************////////////////////////////////// string UsreId = string.Empty; string ProFilePost = string.Empty; //if (ResponseLogin.Contains("http://www.facebook.com/profile.php?id=")) //{ // string[] arrUser = Regex.Split(ResponseLogin, "href"); // foreach (String itemUser in arrUser) // { // if (!itemUser.Contains("<!DOCTYPE")) // { // if (itemUser.Contains("http://www.facebook.com/profile.php?id=")) // { // string[] arrhre = itemUser.Split('"'); // ProFilePost = arrhre[1]; // break; // } // } // } //} //if (ResponseLogin.Contains("http://www.facebook.com/profile.php?id=")) //{ // UsreId = ProFilePost.Replace("http://www.facebook.com/profile.php?id=", ""); //} if (string.IsNullOrEmpty(UsreId)) { UsreId = GlobusHttpHelper.ParseJson(ResponseLogin, "user"); } //*** User Id **************////////////////////////////////// //*** Post Data **************////////////////////////////////// string fb_dtsg = GlobusHttpHelper.GetParamValue(ResponseLogin, "fb_dtsg");//pageSourceHome.Substring(pageSourceHome.IndexOf("fb_dtsg") + 16, 8); if (string.IsNullOrEmpty(fb_dtsg)) { fb_dtsg = GlobusHttpHelper.ParseJson(ResponseLogin, "fb_dtsg"); } string post_form_id = GlobusHttpHelper.GetParamValue(ResponseLogin, "post_form_id");//pageSourceHome.Substring(pageSourceHome.IndexOf("post_form_id"), 200); if (string.IsNullOrEmpty(post_form_id)) { post_form_id = GlobusHttpHelper.ParseJson(ResponseLogin, "post_form_id"); } string PageSourceConfirmed = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/?email_confirmed=1")); string pageSourceCheck = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=contact_importer")); ///Code for skipping additional optional Page try { string postDataSkipFirstStep = "post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&step_name=friend_requests&next_step_name=contact_importer&skip=Skip&lsd&post_form_id_source=AsyncRequest&__user="******"&phstamp=16581681208511510848190"; string postRes = HttpHelper.postFormData(new Uri("http://www.facebook.com/ajax/growth/nux/wizard/steps.php?__a=1"), postDataSkipFirstStep); Thread.Sleep(1000); } catch (Exception) { } pageSourceCheck = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted/?step=contact_importer")); //** FB Account Check email varified or not ***********************************************************************************// #region FB Account Check email varified or not string pageSrc1 = string.Empty; string pageSrc2 = string.Empty; string pageSrc3 = string.Empty; string pageSrc4 = string.Empty; string substr1 = string.Empty; if (pageSourceCheck.Contains("Are your friends already on Facebook?") && pageSourceCheck.Contains("Skip this step")) { string newPostData = "post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&step_name=contact_importer&next_step_name=classmates_coworkers&previous_step_name=friend_requests&skip=Skip%20this%20step&lsd&post_form_id_source=AsyncRequest&__user="******"&phstamp=165816776847576104244"; string postRes = HttpHelper.postFormData(new Uri("http://www.facebook.com/ajax/growth/nux/wizard/steps.php?__a=1"), newPostData); pageSrc1 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=classmates_coworkers")); Thread.Sleep(1000); pageSrc1 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted/?step=classmates_coworkers")); } if ((pageSrc1.Contains("Fill out your Profile Info") || pageSrc1.Contains("Fill out your Profile info")) && pageSrc1.Contains("Skip")) { string newPostData = "post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&step_name=classmates_coworkers&next_step_name=upload_profile_pic&previous_step_name=contact_importer¤t_pane=info&hs[school][id][0]=&hs[school][text][0]=&hs[start_year][text][0]=-1&hs[year][text][0]=-1&hs[entry_id][0]=&college[entry_id][0]=&college[school][id][0]=0&college[school][text][0]=&college[start_year][text][0]=-1&college[year][text][0]=-1&college[type][0]=college&work[employer][id][0]=0&work[employer][text][0]=&work[entry_id][0]=&skip=Skip&lsd&post_form_id_source=AsyncRequest&__user="******"&phstamp=165816776847576104580"; string postRes = HttpHelper.postFormData(new Uri("http://www.facebook.com/ajax/growth/nux/wizard/steps.php?__a=1"), newPostData); //pageSrc2 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=upload_profile_pic")); ///Post Data Parsing Dictionary <string, string> lstfriend_browser_id = new Dictionary <string, string>(); string[] initFriendArray = Regex.Split(postRes, "FriendStatus.initFriend"); int tempCount = 0; foreach (string item in initFriendArray) { if (tempCount == 0) { tempCount++; continue; } if (tempCount > 0) { int startIndx = item.IndexOf("(\\") + "(\\".Length + 1; int endIndx = item.IndexOf("\\", startIndx); string paramValue = item.Substring(startIndx, endIndx - startIndx); lstfriend_browser_id.Add("friend_browser_id[" + (tempCount - 1) + "]=", paramValue); tempCount++; } } string partPostData = string.Empty; foreach (var item in lstfriend_browser_id) { partPostData = partPostData + item.Key + item.Value + "&"; } string newPostData1 = "post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&step_name=classmates_coworkers&next_step_name=upload_profile_pic&previous_step_name=contact_importer¤t_pane=pymk&hs[school][id][0]=&hs[school][text][0]=&hs[year][text][0]=-1&hs[entry_id][0]=&college[entry_id][0]=&college[school][id][0]=0&college[school][text][0]=&college[year][text][0]=-1&college[type][0]=college&work[employer][id][0]=0&work[employer][text][0]=&work[entry_id][0]=&skip=Skip&lsd&post_form_id_source=AsyncRequest&__user="******"&" + partPostData + "phstamp=1658167541109987992266";//"post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&step_name=classmates_coworkers&next_step_name=upload_profile_pic&previous_step_name=contact_importer¤t_pane=pymk&friend_browser_id[0]=100002869910855&friend_browser_id[1]=100001857152486&friend_browser_id[2]=575678600&friend_browser_id[3]=100003506761599&friend_browser_id[4]=563402235&friend_browser_id[5]=1268675170&friend_browser_id[6]=1701838026&friend_browser_id[7]=623640106&friend_browser_id[8]=648873235&friend_browser_id[9]=100000151781814&friend_browser_id[10]=657007597&friend_browser_id[11]=1483373867&friend_browser_id[12]=778266161&friend_browser_id[13]=1087830021&friend_browser_id[14]=100001333876108&friend_browser_id[15]=100000534308531&friend_browser_id[16]=1213205246&friend_browser_id[17]=45608778&friend_browser_id[18]=100003080150820&friend_browser_id[19]=892195716&friend_browser_id[20]=100001238774509&friend_browser_id[21]=45602360&friend_browser_id[22]=100000054900916&friend_browser_id[23]=100001308090108&friend_browser_id[24]=100000400766182&friend_browser_id[25]=100001159247338&friend_browser_id[26]=1537081666&friend_browser_id[27]=100000743261988&friend_browser_id[28]=1029373920&friend_browser_id[29]=1077680976&friend_browser_id[30]=100000001266475&friend_browser_id[31]=504487658&friend_browser_id[32]=82600225&friend_browser_id[33]=1023509811&friend_browser_id[34]=100000128061486&friend_browser_id[35]=100001853125513&friend_browser_id[36]=576201748&friend_browser_id[37]=22806492&friend_browser_id[38]=100003232772830&friend_browser_id[39]=1447942875&friend_browser_id[40]=100000131241521&friend_browser_id[41]=100002076794734&friend_browser_id[42]=1397169487&friend_browser_id[43]=1457321074&friend_browser_id[44]=1170969536&friend_browser_id[45]=18903839&friend_browser_id[46]=695329369&friend_browser_id[47]=1265734280&friend_browser_id[48]=698096805&friend_browser_id[49]=777678515&friend_browser_id[50]=529685319&hs[school][id][0]=&hs[school][text][0]=&hs[year][text][0]=-1&hs[entry_id][0]=&college[entry_id][0]=&college[school][id][0]=0&college[school][text][0]=&college[year][text][0]=-1&college[type][0]=college&work[employer][id][0]=0&work[employer][text][0]=&work[entry_id][0]=&skip=Skip&lsd&post_form_id_source=AsyncRequest&__user=100003556207009&phstamp=1658167541109987992266"; string postRes1 = HttpHelper.postFormData(new Uri("http://www.facebook.com/ajax/growth/nux/wizard/steps.php?__a=1"), newPostData1); pageSrc2 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=upload_profile_pic")); Thread.Sleep(4000); pageSrc2 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=upload_profile_pic")); string newPostData2 = "post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&step_name=upload_profile_pic&previous_step_name=classmates_coworkers&skip=Skip&lsd&post_form_id_source=AsyncRequest&__user="******"&phstamp=165816812057527766201"; string postRes2 = HttpHelper.postFormData(new Uri("http://www.facebook.com/ajax/growth/nux/wizard/steps.php?__a=1"), newPostData); } if (pageSrc2.Contains("Set your profile picture") && pageSrc2.Contains("Skip")) { string newPostData = "post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&step_name=upload_profile_pic&previous_step_name=classmates_coworkers&skip=Skip&lsd&post_form_id_source=AsyncRequest&__user="******"&phstamp=165816776847576104201"; try { string postRes = HttpHelper.postFormData(new Uri("http://www.facebook.com/ajax/growth/nux/wizard/steps.php?__a=1"), newPostData); pageSrc3 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=summary")); pageSrc3 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/home.php?ref=wizard")); } catch (Exception) { } } if (pageSrc3.Contains("complete the sign-up process")) { //LoggerWallPoste("not varified through " + Username); } if (pageSourceCheck.Contains("complete the sign-up process")) { //LoggerWallPoste("not varified through Email" + Username); } #endregion //** FB Account Check email varified or not ***********************************************************************************// string pageSourceHome = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/home.php")); ////**Post Message For User***********************///////////////////////////////////////////////////// int count = 0; //string[] Arr = post_form_id.Split('"'); //post_form_id = Arr[4]; //post_form_id = post_form_id.Replace("\\", ""); //post_form_id = post_form_id.Replace("\\", ""); //post_form_id = post_form_id.Replace("\\", ""); //string Response1 = HttpHelper.postFormData(new Uri("http://www.facebook.com/desktop/notifier/transfer.php?__a=1"), "post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&lsd&post_form_id_source=AsyncRequest&__user="******"http://www.facebook.com/desktop/notifier/transfer.php?__a=1"), "post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&lsd&post_form_id_source=AsyncRequest&__user="******"http://www.facebook.com/ajax/httponly_cookies.php?dc=snc2&__a=1"), "keys[0]=1150335208&post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&lsd&post_form_id_source=AsyncRequest&__user="******"http://www.facebook.com/ajax/contextual_help.php?__a=1&set_name=welcome&__user="******"http://www.facebook.com/")); pageSourceCheck1111 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/")); if (pageSourceCheck1111.Contains("complete the sign-up process")) { Console.WriteLine("Account is not verified for : " + Username); } LoggerEmailVerify("Registration Succeeded for: " + Username); //LoggerVerify("Email verification completed for : " + Email); }
public List <string> GetMembers(string keyword, out string ReturnStatus) { string cursor = "-1"; string FollowingUrl = string.Empty; List <string> lstIds = new List <string>(); string userID; string Screen_name; int counter = 0; try { Globussoft.GlobusHttpHelper HttpHelper = new Globussoft.GlobusHttpHelper(); StartAgain: if (counter == 0) { FollowingUrl = keyword; counter++; } else { FollowingUrl = keyword + "/timeline?cursor=" + cursor + "&cursor_index=&cursor_offset=&include_available_features=1&include_entities=1&is_forward=true"; } String DataCursor = string.Empty; string Data = HttpHelper.getHtmlfromUrl(new Uri(FollowingUrl), "", ""); if (string.IsNullOrEmpty(Data)) { Data = HttpHelper.getHtmlfromUrl(new Uri(FollowingUrl), "", ""); } if (string.IsNullOrEmpty(Data)) { AddToLog_ScrapMember("Either Url in Invalid or PageSource is getting Null or Empty."); ReturnStatus = "Error"; return(lstIds); } String DataCursor1 = string.Empty; if (!Data.Contains("Rate limit exceeded") && !Data.Contains("{\"errors\":[{\"message\":\"Sorry, that page does not exist\",\"code\":34}]}") && !string.IsNullOrEmpty(Data)) { String[] DataDivArr; if (Data.Contains("js-stream-item stream-item stream-item")) { DataDivArr = Regex.Split(Data, "js-stream-item stream-item stream-item"); } else { DataDivArr = Regex.Split(Data, "js-stream-item"); } foreach (var DataDivArr_item in DataDivArr) { if (DataDivArr_item.Contains("data-cursor")) { String DataCurso = System.Text.RegularExpressions.Regex.Split(Data, "data-cursor")[1]; DataCursor1 = DataCurso.Substring(DataCurso.IndexOf("="), DataCurso.IndexOf(">")).Replace(">", string.Empty).Replace("\n", string.Empty).Replace("\"", string.Empty).Replace("=", string.Empty).Trim(); } if (DataDivArr_item.Contains("<!DOCTYPE html>") || DataDivArr_item.Contains("cursor")) { continue; } if (DataDivArr_item.Contains("data-screen-name") && DataDivArr_item.Contains(" data-user-id")) { int endIndex = 0; int startIndex = DataDivArr_item.IndexOf("data-screen-name"); try { endIndex = DataDivArr_item.IndexOf(">"); } catch { } if (endIndex == -1) { endIndex = DataDivArr_item.IndexOf("data-feedback-token"); } string GetDataStr = DataDivArr_item.Substring(startIndex, endIndex); string _SCRNameID = (GetDataStr.Substring(GetDataStr.IndexOf("data-user-id"), GetDataStr.IndexOf("data-feedback-token", GetDataStr.IndexOf("data-user-id")) - GetDataStr.IndexOf("data-user-id")).Replace("data-user-id", string.Empty).Replace("=", string.Empty).Replace("\"", "").Replace("\\\\n", string.Empty).Replace("data-screen-name=", string.Empty).Replace("\\", "").Trim()); string _SCRName = (GetDataStr.Substring(GetDataStr.IndexOf("data-screen-name="), GetDataStr.IndexOf("data-user-id", GetDataStr.IndexOf("data-screen-name=")) - GetDataStr.IndexOf("data-screen-name=")).Replace("data-screen-name=", string.Empty).Replace("=", string.Empty).Replace("\"", "").Replace("\\\\n", string.Empty).Replace("data-screen-name=", string.Empty).Replace("\\", "").Trim()); if (noOfRecords > lstIds.Count) { lstIds.Add(_SCRName + ":" + _SCRNameID); AddToLog_ScrapMember("[ " + DateTime.Now + " ] => [" + _SCRNameID + " :: " + _SCRName + " ]"); if (!File.Exists(Globals.Path_ScrapedMembersList)) { GlobusFileHelper.AppendStringToTextfileNewLine("UserID , UserName , Url", Globals.Path_ScrapedMembersList); } GlobusFileHelper.AppendStringToTextfileNewLine(_SCRNameID + "," + _SCRName + "," + keyword, Globals.Path_ScrapedMembersList); } } } if (noOfRecords != lstIds.Count) { if (Data.Contains("data-cursor")) { int startindex = Data.IndexOf("data-cursor"); string start = Data.Substring(startindex).Replace("data-cursor", ""); int lastindex = start.IndexOf("<div class=\"stream profile-stream\">"); if (lastindex == -1) { lastindex = start.IndexOf("\n"); } string end = start.Substring(0, lastindex).Replace("\"", "").Replace("\n", string.Empty).Replace("=", string.Empty).Replace(">", string.Empty).Trim(); cursor = end; if (cursor != "0") { goto StartAgain; } } if (Data.Contains("cursor")) { int startindex = Data.IndexOf("cursor"); string start = Data.Substring(startindex).Replace("cursor", ""); int lastindex = -1; lastindex = start.IndexOf(","); if (lastindex > 40) { lastindex = start.IndexOf("\n"); } string end = start.Substring(0, lastindex).Replace("\"", "").Replace("\n", string.Empty).Replace("=", string.Empty).Replace(":", string.Empty).Trim(); cursor = end; if (cursor != "0") { goto StartAgain; } } } ReturnStatus = "No Error"; return(lstIds); } else if (Data.Contains("401 Unauthorized")) { ReturnStatus = "Account is Suspended. "; return(new List <string>()); } else if (Data.Contains("{\"errors\":[{\"message\":\"Sorry, that page does not exist\",\"code\":34}]}")) { ReturnStatus = "Sorry, that page does not exist :"; return(lstIds); } else if (Data.Contains("Rate limit exceeded. Clients may not make more than 150 requests per hour.")) { ReturnStatus = "Rate limit exceeded. Clients may not make more than 150 requests per hour.:-"; return(lstIds); } else { ReturnStatus = "Error"; return(lstIds); } } catch (Exception ex) { //Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> getMembers() -- "" --> " + ex.Message, Globals.Path_TwitterDataScrapper); Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> getMembers() -- " + "" + " --> " + ex.Message, Globals.Path_TwtErrorLogs); //AddToLog_ScrapMember("[ " + DateTime.Now + " ] => [ You have entered invalid URL " + FollowingUrl + " ]"); ReturnStatus = "Error"; return(lstIds); } }
public void LoginVerfy(string ConfemUrl, string gif, string logpic) { Globussoft.GlobusHttpHelper HttpHelper = new Globussoft.GlobusHttpHelper(); int intProxyPort = 80; Regex IdCheck = new Regex("^[0-9]*$"); if (!string.IsNullOrEmpty(proxyPort) && IdCheck.IsMatch(proxyPort)) { intProxyPort = int.Parse(proxyPort); } string PageSourse1 = HttpHelper.getHtmlfromUrlProxy(new Uri(ConfemUrl), proxyAddress, intProxyPort, proxyUser, proxyPass); //string PageSourse1 = HttpHelper.getHtmlfromUrlProxy(new Uri(url), "127.0.0.1", 8888, "", ""); string valueLSD = "name=" + "\"lsd\""; string pageSource = HttpHelper.getHtmlfromUrl(new Uri("https://www.facebook.com/login.php")); int startIndex = pageSource.IndexOf(valueLSD) + 18; string value = pageSource.Substring(startIndex, 5); //Log("Logging in with " + Username); //string ResponseLogin = HttpHelper.postFormData(new Uri("https://www.facebook.com/login.php?login_attempt=1"), "charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + "&locale=en_US&email=" + Email.Split('@')[0] + "%40" + Email.Split('@')[1] + "&pass="******"&persistent=1&default_persistent=1&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + ""); string ResponseLogin = HttpHelper.postFormDataProxy(new Uri("https://www.facebook.com/login.php?login_attempt=1"), "charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + "&locale=en_US&email=" + Username.Split('@')[0] + "%40" + Username.Split('@')[1] + "&pass="******"&persistent=1&default_persistent=1&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + "", proxyAddress, intProxyPort, proxyUser, proxyPass); //string ResponseLogin = HttpHelper.postFormData(new Uri("https://www.facebook.com/login.php?login_attempt=1"), "charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + "&locale=en_US&email=" + "rani.khanna" + "%40" + "hotmail.com" + "&pass="******"s15121985" + "&persistent=1&default_persistent=1&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&lsd=" + value + ""); /////ssss gif &s=a parse com &s=a////////////////////////// string PageSourse12 = HttpHelper.getHtmlfromUrl(new Uri(ConfemUrl)); try { string PageSourse13 = HttpHelper.getHtmlfromUrl(new Uri(gif)); } catch (Exception) { } try { string PageSourse14 = HttpHelper.getHtmlfromUrl(new Uri(logpic + "&s=a")); } catch (Exception) { } try { string PageSourse15 = HttpHelper.getHtmlfromUrl(new Uri(logpic)); } catch (Exception) { } //** User Id ***************////////////////////////////////// string UsreId = string.Empty; string ProFilePost = string.Empty; //if (ResponseLogin.Contains("http://www.facebook.com/profile.php?id=")) //{ // string[] arrUser = Regex.Split(ResponseLogin, "href"); // foreach (String itemUser in arrUser) // { // if (!itemUser.Contains("<!DOCTYPE")) // { // if (itemUser.Contains("http://www.facebook.com/profile.php?id=")) // { // string[] arrhre = itemUser.Split('"'); // ProFilePost = arrhre[1]; // break; // } // } // } //} //if (ResponseLogin.Contains("http://www.facebook.com/profile.php?id=")) //{ // UsreId = ProFilePost.Replace("http://www.facebook.com/profile.php?id=", ""); //} if (string.IsNullOrEmpty(UsreId)) { UsreId = GlobusHttpHelper.ParseJson(ResponseLogin, "user"); } //*** User Id **************////////////////////////////////// //*** Post Data **************////////////////////////////////// string fb_dtsg = GlobusHttpHelper.GetParamValue(ResponseLogin, "fb_dtsg");//pageSourceHome.Substring(pageSourceHome.IndexOf("fb_dtsg") + 16, 8); if (string.IsNullOrEmpty(fb_dtsg)) { fb_dtsg = GlobusHttpHelper.ParseJson(ResponseLogin, "fb_dtsg"); } string post_form_id = GlobusHttpHelper.GetParamValue(ResponseLogin, "post_form_id");//pageSourceHome.Substring(pageSourceHome.IndexOf("post_form_id"), 200); if (string.IsNullOrEmpty(post_form_id)) { post_form_id = GlobusHttpHelper.ParseJson(ResponseLogin, "post_form_id"); } string PageSourceConfirmed = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/?email_confirmed=1")); string pageSourceCheck = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=contact_importer")); ///Code for skipping additional optional Page try { string postDataSkipFirstStep = "post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&step_name=friend_requests&next_step_name=contact_importer&skip=Skip&lsd&post_form_id_source=AsyncRequest&__user="******"&phstamp=16581681208511510848190"; string postRes = HttpHelper.postFormData(new Uri("http://www.facebook.com/ajax/growth/nux/wizard/steps.php?__a=1"), postDataSkipFirstStep); Thread.Sleep(1000); } catch (Exception) { } pageSourceCheck = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted/?step=contact_importer")); //** FB Account Check email varified or not ***********************************************************************************// #region FB Account Check email varified or not string pageSrc1 = string.Empty; string pageSrc2 = string.Empty; string pageSrc3 = string.Empty; string pageSrc4 = string.Empty; string substr1 = string.Empty; if (pageSourceCheck.Contains("Are your friends already on Facebook?") && pageSourceCheck.Contains("Skip this step")) { string newPostData = "post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&step_name=contact_importer&next_step_name=classmates_coworkers&previous_step_name=friend_requests&skip=Skip%20this%20step&lsd&post_form_id_source=AsyncRequest&__user="******"&phstamp=165816776847576104244"; string postRes = HttpHelper.postFormData(new Uri("http://www.facebook.com/ajax/growth/nux/wizard/steps.php?__a=1"), newPostData); pageSrc1 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=classmates_coworkers")); Thread.Sleep(1000); pageSrc1 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted/?step=classmates_coworkers")); } if ((pageSrc1.Contains("Fill out your Profile Info") || pageSrc1.Contains("Fill out your Profile info")) && pageSrc1.Contains("Skip")) { string newPostData = "post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&step_name=classmates_coworkers&next_step_name=upload_profile_pic&previous_step_name=contact_importer¤t_pane=info&hs[school][id][0]=&hs[school][text][0]=&hs[start_year][text][0]=-1&hs[year][text][0]=-1&hs[entry_id][0]=&college[entry_id][0]=&college[school][id][0]=0&college[school][text][0]=&college[start_year][text][0]=-1&college[year][text][0]=-1&college[type][0]=college&work[employer][id][0]=0&work[employer][text][0]=&work[entry_id][0]=&skip=Skip&lsd&post_form_id_source=AsyncRequest&__user="******"&phstamp=165816776847576104580"; string postRes = HttpHelper.postFormData(new Uri("http://www.facebook.com/ajax/growth/nux/wizard/steps.php?__a=1"), newPostData); //pageSrc2 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=upload_profile_pic")); ///Post Data Parsing Dictionary<string, string> lstfriend_browser_id = new Dictionary<string, string>(); string[] initFriendArray = Regex.Split(postRes, "FriendStatus.initFriend"); int tempCount = 0; foreach (string item in initFriendArray) { if (tempCount==0) { tempCount++; continue; } if (tempCount > 0) { int startIndx = item.IndexOf("(\\") + "(\\".Length + 1; int endIndx = item.IndexOf("\\", startIndx); string paramValue = item.Substring(startIndx, endIndx - startIndx); lstfriend_browser_id.Add("friend_browser_id[" + (tempCount-1) + "]=", paramValue); tempCount++; } } string partPostData = string.Empty; foreach (var item in lstfriend_browser_id) { partPostData = partPostData + item.Key + item.Value + "&"; } string newPostData1 = "post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&step_name=classmates_coworkers&next_step_name=upload_profile_pic&previous_step_name=contact_importer¤t_pane=pymk&hs[school][id][0]=&hs[school][text][0]=&hs[year][text][0]=-1&hs[entry_id][0]=&college[entry_id][0]=&college[school][id][0]=0&college[school][text][0]=&college[year][text][0]=-1&college[type][0]=college&work[employer][id][0]=0&work[employer][text][0]=&work[entry_id][0]=&skip=Skip&lsd&post_form_id_source=AsyncRequest&__user="******"&" + partPostData + "phstamp=1658167541109987992266";//"post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&step_name=classmates_coworkers&next_step_name=upload_profile_pic&previous_step_name=contact_importer¤t_pane=pymk&friend_browser_id[0]=100002869910855&friend_browser_id[1]=100001857152486&friend_browser_id[2]=575678600&friend_browser_id[3]=100003506761599&friend_browser_id[4]=563402235&friend_browser_id[5]=1268675170&friend_browser_id[6]=1701838026&friend_browser_id[7]=623640106&friend_browser_id[8]=648873235&friend_browser_id[9]=100000151781814&friend_browser_id[10]=657007597&friend_browser_id[11]=1483373867&friend_browser_id[12]=778266161&friend_browser_id[13]=1087830021&friend_browser_id[14]=100001333876108&friend_browser_id[15]=100000534308531&friend_browser_id[16]=1213205246&friend_browser_id[17]=45608778&friend_browser_id[18]=100003080150820&friend_browser_id[19]=892195716&friend_browser_id[20]=100001238774509&friend_browser_id[21]=45602360&friend_browser_id[22]=100000054900916&friend_browser_id[23]=100001308090108&friend_browser_id[24]=100000400766182&friend_browser_id[25]=100001159247338&friend_browser_id[26]=1537081666&friend_browser_id[27]=100000743261988&friend_browser_id[28]=1029373920&friend_browser_id[29]=1077680976&friend_browser_id[30]=100000001266475&friend_browser_id[31]=504487658&friend_browser_id[32]=82600225&friend_browser_id[33]=1023509811&friend_browser_id[34]=100000128061486&friend_browser_id[35]=100001853125513&friend_browser_id[36]=576201748&friend_browser_id[37]=22806492&friend_browser_id[38]=100003232772830&friend_browser_id[39]=1447942875&friend_browser_id[40]=100000131241521&friend_browser_id[41]=100002076794734&friend_browser_id[42]=1397169487&friend_browser_id[43]=1457321074&friend_browser_id[44]=1170969536&friend_browser_id[45]=18903839&friend_browser_id[46]=695329369&friend_browser_id[47]=1265734280&friend_browser_id[48]=698096805&friend_browser_id[49]=777678515&friend_browser_id[50]=529685319&hs[school][id][0]=&hs[school][text][0]=&hs[year][text][0]=-1&hs[entry_id][0]=&college[entry_id][0]=&college[school][id][0]=0&college[school][text][0]=&college[year][text][0]=-1&college[type][0]=college&work[employer][id][0]=0&work[employer][text][0]=&work[entry_id][0]=&skip=Skip&lsd&post_form_id_source=AsyncRequest&__user=100003556207009&phstamp=1658167541109987992266"; string postRes1 = HttpHelper.postFormData(new Uri("http://www.facebook.com/ajax/growth/nux/wizard/steps.php?__a=1"), newPostData1); pageSrc2 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=upload_profile_pic")); Thread.Sleep(4000); pageSrc2 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=upload_profile_pic")); string newPostData2 = "post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&step_name=upload_profile_pic&previous_step_name=classmates_coworkers&skip=Skip&lsd&post_form_id_source=AsyncRequest&__user="******"&phstamp=165816812057527766201"; string postRes2 = HttpHelper.postFormData(new Uri("http://www.facebook.com/ajax/growth/nux/wizard/steps.php?__a=1"), newPostData); } if (pageSrc2.Contains("Set your profile picture") && pageSrc2.Contains("Skip")) { string newPostData = "post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&step_name=upload_profile_pic&previous_step_name=classmates_coworkers&skip=Skip&lsd&post_form_id_source=AsyncRequest&__user="******"&phstamp=165816776847576104201"; try { string postRes = HttpHelper.postFormData(new Uri("http://www.facebook.com/ajax/growth/nux/wizard/steps.php?__a=1"), newPostData); pageSrc3 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=summary")); pageSrc3 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/home.php?ref=wizard")); } catch (Exception) { } } if (pageSrc3.Contains("complete the sign-up process")) { //LoggerWallPoste("not varified through " + Username); } if (pageSourceCheck.Contains("complete the sign-up process")) { //LoggerWallPoste("not varified through Email" + Username); } #endregion //** FB Account Check email varified or not ***********************************************************************************// string pageSourceHome = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/home.php")); ////**Post Message For User***********************///////////////////////////////////////////////////// int count = 0; //string[] Arr = post_form_id.Split('"'); //post_form_id = Arr[4]; //post_form_id = post_form_id.Replace("\\", ""); //post_form_id = post_form_id.Replace("\\", ""); //post_form_id = post_form_id.Replace("\\", ""); //string Response1 = HttpHelper.postFormData(new Uri("http://www.facebook.com/desktop/notifier/transfer.php?__a=1"), "post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&lsd&post_form_id_source=AsyncRequest&__user="******"http://www.facebook.com/desktop/notifier/transfer.php?__a=1"), "post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&lsd&post_form_id_source=AsyncRequest&__user="******"http://www.facebook.com/ajax/httponly_cookies.php?dc=snc2&__a=1"), "keys[0]=1150335208&post_form_id=" + post_form_id + "&fb_dtsg=" + fb_dtsg + "&lsd&post_form_id_source=AsyncRequest&__user="******"http://www.facebook.com/ajax/contextual_help.php?__a=1&set_name=welcome&__user="******"http://www.facebook.com/")); pageSourceCheck1111 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/")); if (pageSourceCheck1111.Contains("complete the sign-up process")) { Console.WriteLine("Account is not verified for : " + Username); } LoggerEmailVerify("Registration Succeeded for: " + Username); //LoggerVerify("Email verification completed for : " + Email); }
/// <summary> /// Checks for Email Verification /// Also does Skip /// </summary> public bool CheckVerification(string response, ref Globussoft.GlobusHttpHelper HttpHelper) { //** FB Account Check email varified or not ***********************************************************************************// #region FB Account Check email varified or not string pageSourceCheck = string.Empty; pageSourceCheck = response; string pageSrc1 = string.Empty; string pageSrc2 = string.Empty; string pageSrc3 = string.Empty; string pageSrc4 = string.Empty; string substr1 = string.Empty; #region Commented //if (pageSourceCheck.Contains("Are your friends already on Facebook?") && pageSourceCheck.Contains("Skip this step")) //{ // pageSrc1 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=classmates_coworkers")); //} //if (pageSrc1.Contains("Fill out your Profile Info") && pageSrc1.Contains("Skip")) //{ // pageSrc2 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=upload_profile_pic")); //} //if (pageSrc2.Contains("Set your profile picture") && pageSrc2.Contains("Skip")) //{ // pageSrc3 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=summary")); //} //if (pageSrc3.Contains("complete the sign-up process")) //{ // return false; //} //if (pageSourceCheck.Contains("complete the sign-up process")) //{ // return false; //} #endregion ///Skip Code if ((pageSourceCheck.Contains("Are your friends already on Facebook?") && pageSourceCheck.Contains("Skip this step")) || pageSourceCheck.Contains("window.location.replace(\"http:\\/\\/www.facebook.com\\/gettingstarted.php") || pageSourceCheck.Contains("window.location.replace(\"http:\\/\\/www.facebook.com\\/confirmemail.php")) { pageSrc1 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=classmates_coworkers")); //} Thread.Sleep(300); //if (pageSrc1.Contains("Fill out your Profile Info") && pageSrc1.Contains("Skip")) //{ pageSrc2 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=upload_profile_pic")); Thread.Sleep(300); //} //if (pageSrc2.Contains("Set your profile picture") && pageSrc2.Contains("Skip")) //{ pageSrc3 = HttpHelper.getHtmlfromUrl(new Uri("http://www.facebook.com/gettingstarted.php?step=summary")); Thread.Sleep(300); //} ///Check if asks for email //If asks then Set Status as PhoneVerfiedOnly if (pageSrc3.Contains("complete the sign-up process")) { PumpMessage("Account : " + Username + " is NOT Email verified"); InsertUpdateDatabase(AccountStatus.Status(ProfileStatus.PhoneVerfiedOnly)); return(false); } else if (pageSourceCheck.Contains("please login to your email account below") || pageSourceCheck.Contains("Go to your email")) { PumpMessage("Account : " + Username + " is NOT Email verified"); InsertUpdateDatabase(AccountStatus.Status(ProfileStatus.PhoneVerfiedOnly)); return(false); } } ///Check if asks for email //If asks then Set Status as PhoneVerfiedOnly if (pageSourceCheck.Contains("complete the sign-up process")) { PumpMessage("Account : " + Username + " is NOT Email verified"); InsertUpdateDatabase(AccountStatus.Status(ProfileStatus.PhoneVerfiedOnly)); return(false); } else if (pageSourceCheck.Contains("window.location.replace(\"http:\\/\\/www.facebook.com\\/confirmemail.php")) { PumpMessage("Account : " + Username + " is NOT Email verified"); InsertUpdateDatabase(AccountStatus.Status(ProfileStatus.PhoneVerfiedOnly)); return(false); } else if (pageSourceCheck.Contains("please login to your email account below") || pageSourceCheck.Contains("Go to your email")) { PumpMessage("Account : " + Username + " is NOT Email verified"); InsertUpdateDatabase(AccountStatus.Status(ProfileStatus.PhoneVerfiedOnly)); return(false); } #endregion //** FB Account Check email varified or not ***********************************************************************************// PumpMessage("Account : " + Username + " is Email & Phone verified"); InsertUpdateDatabase(AccountStatus.Status(ProfileStatus.PhonePlusEmailVerified)); return(true); }
public void Login() { try { Log("[ " + DateTime.Now + " ] => [ Logging in with Account : " + Username + " ]"); string ts = GenerateTimeStamp(); string get_twitter_first = string.Empty; try { get_twitter_first = globusHttpHelper.getHtmlfromUrlIP(new Uri("https://twitter.com/"), IPAddress, IPPort, IPUsername, IPpassword, string.Empty, string.Empty); } catch (Exception ex) { Thread.Sleep(1000); get_twitter_first = globusHttpHelper.getHtmlfromUrlIP(new Uri("https://twitter.com/"), IPAddress, IPPort, IPUsername, IPpassword, string.Empty, string.Empty); } try { postAuthenticityToken = PostAuthenticityToken(get_twitter_first, "postAuthenticityToken"); } catch { } try { string get_twitter_second = globusHttpHelper.postFormData(new Uri("https://twitter.com/scribe"), "log%5B%5D=%7B%22event_name%22%3A%22web%3Amobile_gallery%3Agallery%3A%3A%3Aimpression%22%2C%22noob_level%22%3Anull%2C%22internal_referer%22%3Anull%2C%22context%22%3A%22mobile_gallery%22%2C%22event_info%22%3A%22mobile_app_download%22%2C%22user_id%22%3A0%2C%22page%22%3A%22mobile_gallery%22%2C%22_category_%22%3A%22client_event%22%2C%22ts%22%3A" + ts + "%7D", "https://twitter.com/?lang=en&logged_out=1#!/download", "", "", "", "");//globusHttpHelper.getHtmlfromUrl(new Uri("https://twitter.com/account/bootstrap_data?r=0.21632839148912897"), "https://twitter.com/", string.Empty); string get2nd = globusHttpHelper.getHtmlfromUrlIP(new Uri("http://twitter.com/account/bootstrap_data?r=0.21632839148912897"), "https://twitter.com/", IPAddress, IPPort, IPUsername, IPpassword); string get_api = globusHttpHelper.getHtmlfromUrl(new Uri("http://api.twitter.com/receiver.html"), "https://twitter.com/", ""); } catch { } string postData = "session%5Busername_or_email%5D=" + Uri.EscapeDataString(Username) + "&session%5Bpassword%5D=" + Uri.EscapeDataString(Password) + "&scribe_log=&redirect_after_login=&authenticity_token=" + postAuthenticityToken + ""; string response_Login = globusHttpHelper.postFormData(new Uri("https://twitter.com/sessions"), postData, "https://twitter.com/", IPAddress, IPPort, IPUsername, IPpassword); if (response_Login.Contains("अपनी पहचान सत्यापित करें") || response_Login.Contains("आपके खाते को सुरक्षित रखेने में हमें मदद करें.") || response_Login.Contains("Help us keep your account safe.") || response_Login.Contains("Verify your identity")) { try { string temp_user_id = string.Empty; string challenge_id = string.Empty; challenge_id = response_Login.Substring(response_Login.IndexOf("name=\"challenge_id\" value="), (response_Login.IndexOf("/>", response_Login.IndexOf("name=\"challenge_id\" value=")) - response_Login.IndexOf("name=\"challenge_id\" value="))).Replace("name=\"challenge_id\" value=", string.Empty).Replace("\"", "").Trim(); temp_user_id = response_Login.Substring(response_Login.IndexOf("name=\"user_id\" value="), (response_Login.IndexOf("/>", response_Login.IndexOf("name=\"user_id\" value=")) - response_Login.IndexOf("name=\"user_id\" value="))).Replace("name=\"user_id\" value=", string.Empty).Replace("\"", "").Trim(); if (response_Login.Contains(" name=\"challenge_type\" value=\"RetypeEmail") && response_Login.Contains("@")) { postData = "authenticity_token=" + postAuthenticityToken + "&challenge_id=" + challenge_id + "&user_id=" + temp_user_id + "&challenge_type=RetypeEmail&platform=web&redirect_after_login=&remember_me=true&challenge_response=" + Screen_name; response_Login = globusHttpHelper.postFormData(new Uri("https://twitter.com/account/login_challenge"), postData, "https://twitter.com/account/login_challenge?platform=web&user_id=" + temp_user_id + "&challenge_type=RetypeEmail&remember_me=true", IPAddress, IPPort, IPUsername, IPpassword); } else { postData = "authenticity_token=" + postAuthenticityToken + "&challenge_id=" + challenge_id + "&user_id=" + temp_user_id + "&challenge_type=RetypeScreenName&platform=web&redirect_after_login=&remember_me=true&challenge_response=" + Screen_name; response_Login = globusHttpHelper.postFormData(new Uri("https://twitter.com/account/login_challenge"), postData, "https://twitter.com/account/login_challenge?platform=web&user_id=" + temp_user_id + "&challenge_type=RetypeScreenName&remember_me=true", IPAddress, IPPort, IPUsername, IPpassword); } } catch { } } if (response_Login.Contains("signout")) { postAuthenticityToken = PostAuthenticityToken(response_Login, "postAuthenticityToken"); try { int startIndx = response_Login.IndexOf("data-user-id=\"") + "data-user-id=\"".Length; int endIndx = response_Login.IndexOf("\"", startIndx); userID = response_Login.Substring(startIndx, endIndx - startIndx); } catch { } if (string.IsNullOrEmpty(userID)) { userID = string.Empty; string[] useridarr = System.Text.RegularExpressions.Regex.Split(response_Login, "data-user-id="); foreach (string useridarr_item in useridarr) { if (useridarr_item.Contains("data-screen-name=")) { userID = useridarr_item.Substring(0 + 1, useridarr_item.IndexOf("data-screen-name=") - 3); break; } } } string responseURI = globusHttpHelper.gResponse.ResponseUri.ToString().ToLower(); if (responseURI.Contains("error")) { //Log("[ " + DateTime.Now + " ] => [ Login Error with " + Username + " ]"); GlobusFileHelper.AppendStringToTextfileNewLine(Username + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_FailedLoginAccounts); return; } else if (responseURI.Contains("captcha")) { Log("[ " + DateTime.Now + " ] => [ Asking Captcha with " + Username + " ]"); GlobusFileHelper.AppendStringToTextfileNewLine(Username + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_AskingCaptchaAccounts); return; } IsLoggedIn = true; Log("[ " + DateTime.Now + " ] => [ Logged in with Account : " + Username + " ]"); GetScreen_name(); GetFollowercount(); //clsDBQueryManager Db = new clsDBQueryManager(); //Db.InsertScreenNameFollower(Screen_name, FollowerCount, Username); } else { IsLoggedIn = false; Log("[ " + DateTime.Now + " ] => [ Logging failed from Account : " + Username + " ]"); } } catch (Exception ex) { Log("[ " + DateTime.Now + " ] => [ Error in Login : "******" ]"); GlobusFileHelper.AppendStringToTextfileNewLine(Username + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_FailedLoginAccounts); Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> Login() --> " + Username + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword + " --> " + ex.Message, Globals.Path_TweetAccountManager); return; } }
public List<string> GetAllBoardNames_new(ref PinInterestUser objPinInUser) { List<string> BoardNames = new List<string>(); BaseLib.GlobusRegex rgx = new GlobusRegex(); Globussoft.GlobusHttpHelper httpHelper = new Globussoft.GlobusHttpHelper(); string UserUrl = "http://pinterest.com/" + objPinInUser.Username; string BoardPage = httpHelper.getHtmlfromUrl(new Uri(UserUrl), "", "", objPinInUser.UserAgent); string[] Items = Regex.Split(BoardPage, "item"); int counter = 0; foreach (string item in Items) { try { if (item.Contains("id=\\\"Board") && item.Contains("boardLinkWrapper")) { //if (counter == 1) { string[] Data = System.Text.RegularExpressions.Regex.Split(item, "boardLinkWrapper"); foreach (string Dataitem in Data) { if (Dataitem.Contains("-end-")) { continue; } if (Dataitem.Contains("boardName")) { int startIndex = Dataitem.IndexOf("title"); int LastPoint = Dataitem.IndexOf("<h4"); string Board = Dataitem.Substring(startIndex, LastPoint).Replace("\\n", string.Empty).Replace("\"", "").Replace("<div class=\\b", string.Empty).Replace(" ", string.Empty).Replace("\"title\"", "").Replace("</div", ""); Board = rgx.StripTagsRegex(Board); try { Board = Board.Split('>')[1]; } catch { } if (!BoardNames.Contains(Board)) { BoardNames.Add(Board); } } } } counter++; } } catch (Exception ex) { GlobusLogHelper.log.Error(" Error :" + ex.StackTrace); } } return BoardNames; }
public void StartInviteMultiThreaded(object objparameters) { PinInterestUser objPinUser = new PinInterestUser(); try { Globussoft.GlobusHttpHelper httpHelper = new Globussoft.GlobusHttpHelper(); Accounts Obj_AccountManager = new Accounts(); if (!isStopInvite) { try { lstThreadsInvite.Add(Thread.CurrentThread); lstThreadsInvite.Distinct().ToList(); Thread.CurrentThread.IsBackground = true; } catch (Exception ex) { }; try { Array paramsArray = new object[1]; paramsArray = (Array)objparameters; objPinUser = (PinInterestUser)paramsArray.GetValue(0); #region Login if (!objPinUser.isloggedin) { GlobusLogHelper.log.Info(" => [ Logging In With : " + objPinUser.Username + " ]"); bool checkLogin; if (string.IsNullOrEmpty(objPinUser.ProxyPort)) { objPinUser.ProxyPort = "80"; } try { //checkLogin = ObjAccountManager.LoginPinterestAccount1(ref objPinUser, objPinUser.Username, objPinUser.Password, objPinUser.ProxyAddress, objPinUser.ProxyPort, objPinUser.ProxyUsername, objPinUser.ProxyPassword, objPinUser.ScreenName); checkLogin = ObjAccountManager.LoginPinterestAccount1forlee(ref objPinUser, objPinUser.Username, objPinUser.Password, objPinUser.ProxyAddress, objPinUser.ProxyPort, objPinUser.ProxyUsername, objPinUser.ProxyPassword, objPinUser.ScreenName); if (!checkLogin) { GlobusLogHelper.log.Info(" => [ Logging UnSuccessfull : " + objPinUser.Username + " ]"); return; } string checklogin = httpHelper.getHtmlfromUrl(new Uri("https://www.pinterest.com")); //GlobusLogHelper.log.Info(" => [ Logged In With : " + objPinUser.Username + " ]"); //StartActionMultithreadInvite(ref objPinUser); } catch { }; } if (objPinUser.isloggedin == true) { try { GlobusLogHelper.log.Info(" => [ Logged In With : " + objPinUser.Username + " ]"); StartActionMultithreadInvite(ref objPinUser); } catch (Exception ex) { GlobusLogHelper.log.Error(" Error :" + ex.StackTrace); } } #endregion } catch (Exception ex) { GlobusLogHelper.log.Error(" Error :" + ex.StackTrace); } } } catch (Exception ex) { GlobusLogHelper.log.Error(" Error :" + ex.StackTrace); } finally { try { if (countThreadControllerInvite > Nothread_Invite) { lock (InviteObjThread) { Monitor.Pulse(InviteObjThread); } Invitedata_count--; } } catch (Exception ex) { GlobusLogHelper.log.Error(" Error : " + ex.StackTrace); } countThreadControllerInvite--; //if (Invitedata_count == 0) //|| DivideByUserinput < 0) //{ GlobusLogHelper.log.Info(" => [ PROCESS COMPLETED " + " For " + objPinUser.Username + " ]"); GlobusLogHelper.log.Info("---------------------------------------------------------------------------------------------------------------------------"); //} } }
public List<string> GetAllBoardNames_new1(string screenName,ref PinInterestUser objPinUser) { BaseLib.GlobusRegex rgx = new GlobusRegex(); Globussoft.GlobusHttpHelper httpHelper = new Globussoft.GlobusHttpHelper(); List<string> lstBoardIdNew = new List<string>(); //GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Getting All Board Names ]"); string UserUrl = "http://pinterest.com/" + screenName; string BoardPage = httpHelper.getHtmlfromUrl(new Uri(UserUrl), "", "", ""); string[] data = Regex.Split(BoardPage, "is_collaborative"); foreach (var itemdata in data) { try { string boardUrl = getBetween(itemdata, ", \"url\":", ",").Replace("\"", "").Trim(); if (!lstBoardUrls.Contains(boardUrl) && !string.IsNullOrEmpty(boardUrl)) { lstBoardUrls.Add(boardUrl); } if (itemdata.Contains("board_id")) { string boardId = getBetween(itemdata, "board_id\":", ",").Replace("\"", "").Trim(); if (!lstBoardIdNew.Contains(boardId)) { lstBoardIdNew.Add(boardId); } objPinUser.lstBoardId = lstBoardIdNew; } } catch (Exception ex) { GlobusLogHelper.log.Error("Error :" + ex.StackTrace); } } string[] Items = Regex.Split(BoardPage, "item"); int counter = 0; foreach (string item in Items) { try { if (item.Contains("id=\\\"Board") && item.Contains("boardLinkWrapper")) { //if (counter == 1) { string[] Data = System.Text.RegularExpressions.Regex.Split(item, "boardLinkWrapper"); foreach (string Dataitem in Data) { if (Dataitem.Contains("boardName")) { string BoardUrl = string.Empty; int startIndex = Dataitem.IndexOf("title"); int LastPoint = Dataitem.IndexOf("<h2"); //string Board = Dataitem.Substring(startIndex, LastPoint).Replace("\\n", string.Empty).Replace("\"", "").Replace("<div class=\\b", string.Empty).Replace(" ", string.Empty).Replace("\"title\"", "").Replace("</div", ""); string Board = Utils.Utils.getBetween(Dataitem, "<h2 class=\\\"title\\\">", "</h2>"); //BoardUrl = rgx.StripTagsRegex(Board); //try //{ // Board = getBetween(BoardUrl, ">>", "<"); // //modified done // if (Board == "") // { // Board = getBetween(BoardUrl, "title=", ">").Replace("\\", "").Trim(); // } //} //catch(Exception ex) //{ }; if (!BoardNames.Contains(Board)) { BoardNames.Add(Board); //DropDowenBox.Items.Add(Board); } } } } counter++; } } catch (Exception ex) { GlobusLogHelper.log.Error("Error :" + ex.StackTrace); } } return BoardNames; }
public List<string> GetMembers(string keyword,out string ReturnStatus) { string cursor = "-1"; string FollowingUrl = string.Empty; List<string> lstIds = new List<string>(); string userID; string Screen_name; int counter = 0; try { Globussoft.GlobusHttpHelper HttpHelper = new Globussoft.GlobusHttpHelper(); StartAgain: if (counter == 0) { FollowingUrl = keyword; counter++; } else { FollowingUrl = keyword + "/timeline?cursor=" + cursor + "&cursor_index=&cursor_offset=&include_available_features=1&include_entities=1&is_forward=true"; } String DataCursor = string.Empty; string Data = HttpHelper.getHtmlfromUrl(new Uri(FollowingUrl), "", ""); if (string.IsNullOrEmpty(Data)) { Data = HttpHelper.getHtmlfromUrl(new Uri(FollowingUrl), "", ""); } if (string.IsNullOrEmpty(Data)) { AddToLog_ScrapMember("Either Url in Invalid or PageSource is getting Null or Empty."); ReturnStatus = "Error"; return lstIds; } String DataCursor1 = string.Empty; if (!Data.Contains("Rate limit exceeded") && !Data.Contains("{\"errors\":[{\"message\":\"Sorry, that page does not exist\",\"code\":34}]}") && !string.IsNullOrEmpty(Data)) { String[] DataDivArr; if (Data.Contains("js-stream-item stream-item stream-item")) { DataDivArr = Regex.Split(Data, "js-stream-item stream-item stream-item"); } else { DataDivArr = Regex.Split(Data, "js-stream-item"); } foreach (var DataDivArr_item in DataDivArr) { if (DataDivArr_item.Contains("data-cursor")) { String DataCurso = System.Text.RegularExpressions.Regex.Split(Data, "data-cursor")[1]; DataCursor1 = DataCurso.Substring(DataCurso.IndexOf("="), DataCurso.IndexOf(">")).Replace(">", string.Empty).Replace("\n", string.Empty).Replace("\"", string.Empty).Replace("=", string.Empty).Trim(); } if (DataDivArr_item.Contains("<!DOCTYPE html>") || DataDivArr_item.Contains("cursor")) { continue; } if (DataDivArr_item.Contains("data-screen-name") && DataDivArr_item.Contains(" data-user-id")) { int endIndex = 0; int startIndex = DataDivArr_item.IndexOf("data-screen-name"); try { endIndex = DataDivArr_item.IndexOf(">"); } catch { } if (endIndex == -1) { endIndex = DataDivArr_item.IndexOf("data-feedback-token"); } string GetDataStr = DataDivArr_item.Substring(startIndex, endIndex); string _SCRNameID = (GetDataStr.Substring(GetDataStr.IndexOf("data-user-id"), GetDataStr.IndexOf("data-feedback-token", GetDataStr.IndexOf("data-user-id")) - GetDataStr.IndexOf("data-user-id")).Replace("data-user-id", string.Empty).Replace("=", string.Empty).Replace("\"", "").Replace("\\\\n", string.Empty).Replace("data-screen-name=", string.Empty).Replace("\\", "").Trim()); string _SCRName = (GetDataStr.Substring(GetDataStr.IndexOf("data-screen-name="), GetDataStr.IndexOf("data-user-id", GetDataStr.IndexOf("data-screen-name=")) - GetDataStr.IndexOf("data-screen-name=")).Replace("data-screen-name=", string.Empty).Replace("=", string.Empty).Replace("\"", "").Replace("\\\\n", string.Empty).Replace("data-screen-name=", string.Empty).Replace("\\", "").Trim()); if (noOfRecords > lstIds.Count) { lstIds.Add(_SCRName + ":" + _SCRNameID); AddToLog_ScrapMember("[ " + DateTime.Now + " ] => [" + _SCRNameID + " :: "+_SCRName+" ]"); if (!File.Exists(Globals.Path_ScrapedMembersList)) { GlobusFileHelper.AppendStringToTextfileNewLine("UserID , UserName , Url", Globals.Path_ScrapedMembersList); } GlobusFileHelper.AppendStringToTextfileNewLine(_SCRNameID + "," + _SCRName + "," + keyword, Globals.Path_ScrapedMembersList); } } } if (noOfRecords != lstIds.Count) { if (Data.Contains("data-cursor")) { int startindex = Data.IndexOf("data-cursor"); string start = Data.Substring(startindex).Replace("data-cursor", ""); int lastindex = start.IndexOf("<div class=\"stream profile-stream\">"); if (lastindex == -1) { lastindex = start.IndexOf("\n"); } string end = start.Substring(0, lastindex).Replace("\"", "").Replace("\n", string.Empty).Replace("=", string.Empty).Replace(">", string.Empty).Trim(); cursor = end; if (cursor != "0") { goto StartAgain; } } if (Data.Contains("cursor")) { int startindex = Data.IndexOf("cursor"); string start = Data.Substring(startindex).Replace("cursor", ""); int lastindex = -1; lastindex = start.IndexOf(","); if (lastindex > 40) { lastindex = start.IndexOf("\n"); } string end = start.Substring(0, lastindex).Replace("\"", "").Replace("\n", string.Empty).Replace("=", string.Empty).Replace(":", string.Empty).Trim(); cursor = end; if (cursor != "0") { goto StartAgain; } } } ReturnStatus = "No Error"; return lstIds; } else if (Data.Contains("401 Unauthorized")) { ReturnStatus = "Account is Suspended. "; return new List<string>(); } else if (Data.Contains("{\"errors\":[{\"message\":\"Sorry, that page does not exist\",\"code\":34}]}")) { ReturnStatus = "Sorry, that page does not exist :"; return lstIds; } else if (Data.Contains("Rate limit exceeded. Clients may not make more than 150 requests per hour.")) { ReturnStatus = "Rate limit exceeded. Clients may not make more than 150 requests per hour.:-"; return lstIds; } else { ReturnStatus = "Error"; return lstIds; } } catch (Exception ex) { //Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> getMembers() -- "" --> " + ex.Message, Globals.Path_TwitterDataScrapper); Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> getMembers() -- " + "" + " --> " + ex.Message, Globals.Path_TwtErrorLogs); //AddToLog_ScrapMember("[ " + DateTime.Now + " ] => [ You have entered invalid URL " + FollowingUrl + " ]"); ReturnStatus = "Error"; return lstIds; } }