本文整理汇总了C#中GlobusHttpHelper.getHtmlfromUrlProxy方法的典型用法代码示例。如果您正苦于以下问题:C# GlobusHttpHelper.getHtmlfromUrlProxy方法的具体用法?C# GlobusHttpHelper.getHtmlfromUrlProxy怎么用?C# GlobusHttpHelper.getHtmlfromUrlProxy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GlobusHttpHelper
的用法示例。
在下文中一共展示了GlobusHttpHelper.getHtmlfromUrlProxy方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ParseJson_Comments_Next_Phase1
/// <summary>
/// Gets Next Page URLs as well as End User IDs from Comment
/// </summary>
/// <param name="jsonRes"></param>
/// <param name="PageURL"></param>
private void ParseJson_Comments_Next_Phase1(string jsonRes, string PageURL)
{
try
{
lstFanPageScraperThreads.Add(Thread.CurrentThread);
lstFanPageScraperThreads.Distinct();
Thread.CurrentThread.IsBackground = true;
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
try
{
string jsonData = jsonRes;
JObject likes = null;
JObject Data = null;
try
{
Data = JObject.Parse(jsonData);
likes = (JObject)Data["likes"];
}
catch { };
//Paging
JObject paging = null;//(JObject)likes["paging"];
if (likes != null) //Get Next Page Node under Likes Node
{
paging = (JObject)likes["paging"];
}
else //If no Likes Node, Get Next Page Node under Data Node
{
paging = (JObject)Data["paging"];
}
//Next URL
string next = (string)((JValue)paging["next"]);
int startIndx = next.IndexOf("limit=") + "limit=".Length;
int endIndx = next.IndexOf("&", startIndx);
string limitValueToReplace = "limit=" + next.Substring(startIndx, endIndx - startIndx);
next = next.Replace(limitValueToReplace, "limit=1000");
GlobusHttpHelper httpHelper = new GlobusHttpHelper();
string nextRes = httpHelper.getHtmlfromUrlProxy(new Uri(next), "", 80, "", "");
#region Get Next Page Data and IDs and Insert in tb_FbFirstID with Status=0 & Level=1, means End User ID
JObject nextData = JObject.Parse(nextRes);
JArray array_data = (JArray)nextData["data"];
foreach (var item in array_data)
{
try
{
JObject objData_Node = JObject.Parse(item.ToString());
JValue jVaule_id = (JValue)objData_Node["id"];
string str_id = jVaule_id.ToString().Replace("\"", "");
try
{
string queryResponse = string.Empty;
//qm.AddFirstID(str_id, "0", "1", System.DateTime.Now.ToString(), PageURL, ref queryResponse);
DataSet ds = new DataSet();
RaiseEvent(ds, new string[] { "Model : FanPagePostRepository", "Function : InsertChasngeLevel", str_id, "0", "1", System.DateTime.Now.ToString(), PageURL, queryResponse });
if (queryResponse.Contains("locked"))
{
Thread.Sleep(1000);
// QueryManager myQueryManager = new QueryManager();
//myQueryManager.AddFirstID(str_id, "0", "1", System.DateTime.Now.ToString(), PageURL, ref queryResponse);
RaiseEvent(ds, new string[] { "Model : FanPagePostRepository", "Function : InsertChasngeLevel", str_id, "0", "1", System.DateTime.Now.ToString(), PageURL, queryResponse });
}
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
}
//.........这里部分代码省略.........
示例2: GetUserFollowing
public List<string> GetUserFollowing(string UserName, int NoOfPage, int FollowingCount)
{
try
{
string FollowUrl = string.Empty;
string AppVersion = string.Empty;
string bookmark = string.Empty;
string referer = string.Empty;
string User = string.Empty;
List<string> followings = new List<string>();
ClGlobul.lstTotalUserScraped.Clear();
List<string> lstFollowing = new List<string>();
GlobusLogHelper.log.Info("[ " + DateTime.Now + "] => [ Starting Extraction Of Following For " + UserName + " ]");
GlobusHttpHelper globusHttpHelper = new GlobusHttpHelper();
string TotalFollowingUrl = "https://pinterest.com/" + UserName;
string responseFollowingUrl = globusHttpHelper.getHtmlfromUrl(new Uri(TotalFollowingUrl), referer, string.Empty, "");
int TotalFollowing = int.Parse(Utils.Utils.getBetween(responseFollowingUrl, "following_count\":", ","));
int PageCount = TotalFollowing / 12 + 1;
for (int i = 1; i <= PageCount; i++)
{
try
{
string FollowerPageSource = string.Empty;
if (i == 1)
{
FollowUrl = "http://pinterest.com/" + UserName + "/following/";
FollowerPageSource = globusHttpHelper.getHtmlfromUrl(new Uri(FollowUrl), referer, string.Empty, "");
referer = FollowUrl;
}
else
{
FollowUrl = "https://pinterest.com/resource/UserFollowingResource/get/?source_url=%2F" + UserName + "%2Ffollowing%2F&data=%7B%22options%22%3A%7B%22username%22%3A%22" + UserName + "%22%2C%22bookmarks%22%3A%5B%22" + bookmark + "%3D%22%5D%7D%2C%22context%22%3A%7B%7D%7D&module_path=App(module%3D%5Bobject+Object%5D)&_=144204352215" + (i - 1);
try
{
FollowerPageSource = globusHttpHelper.getHtmlfromUrlProxy(new Uri(FollowUrl), referer, "", 80, string.Empty, "", "");
}
catch
{
FollowerPageSource = globusHttpHelper.getHtmlfromUrlProxy(new Uri(FollowUrl), "", Convert.ToInt32(""), "", "");
}
if (FollowerPageSource.Contains("Whoops! We couldn't find that page."))
{
break;
}
}
///Get App Version
if (FollowerPageSource.Contains("app_version") && string.IsNullOrEmpty(AppVersion))
{
string[] ArrAppVersion = System.Text.RegularExpressions.Regex.Split(FollowerPageSource, "app_version");
if (ArrAppVersion.Count() > 0)
{
string DataString = ArrAppVersion[ArrAppVersion.Count() - 1];
int startindex = DataString.IndexOf("\": \"");
int endindex = DataString.IndexOf("\", \"");
AppVersion = DataString.Substring(startindex, endindex - startindex).Replace("\": \"", "");
}
}
///get bookmarks value from page
///
if (FollowerPageSource.Contains("bookmarks"))
{
string[] bookmarksDataArr = System.Text.RegularExpressions.Regex.Split(FollowerPageSource, "bookmarks");
string Datavalue = string.Empty;
if (bookmarksDataArr.Count() > 2)
Datavalue = bookmarksDataArr[bookmarksDataArr.Count() - 2];
else
Datavalue = bookmarksDataArr[bookmarksDataArr.Count() - 1];
bookmark = Datavalue.Substring(Datavalue.IndexOf(": [\"") + 4, Datavalue.IndexOf("]") - Datavalue.IndexOf(": [\"") - 5);
}
try
{
if (!FollowerPageSource.Contains("No one has followed"))
{
List<string> lst = objGlobusRegex.GetHrefUrlTags(FollowerPageSource);
if (lst.Count == 0)
{
lst = System.Text.RegularExpressions.Regex.Split(FollowerPageSource, "href").ToList();
if (lst.Count() == 1)
{
lst = System.Text.RegularExpressions.Regex.Split(FollowerPageSource, "\"username\":").ToList();
}
}
foreach (string item in lst)
{
if (item.Contains("class=\"userWrapper") || item.Contains("class=\\\"userWrapper"))
{
try
//.........这里部分代码省略.........
示例3: AjaxPoster
/// <summary>
/// Gets all Comment IDs from FanPage
/// </summary>
/// <param name="pageUrl"></param>
private void AjaxPoster(object pageUrl)
{
try
{
lstFanPageScraperThreads.Add(Thread.CurrentThread);
lstFanPageScraperThreads.Distinct();
Thread.CurrentThread.IsBackground = true;
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
try
{
if (!isStopFanPageScraper)
{
List<string> Idlist = new List<string>();
string[] arrayPageUrl = (string[])pageUrl;
string PageUrl = arrayPageUrl[0];
// QueryManager QM = new QueryManager();
GlobusLogHelper.log.Info("Fans Crawler Started With Page URL :" + PageUrl);
GlobusLogHelper.log.Debug("Fans Crawler Started With Page URL :" + PageUrl);
GlobusHttpHelper httpHelper = new GlobusHttpHelper();
List<string> PageletList = new List<string>();
List<string> StartList = new List<string>();
List<string> EndList = new List<string>();
int counter = 1;
string PageUrls = PageUrl;
string ajaxpipe_token = string.Empty;
string profile_id = string.Empty;
string start2 = string.Empty;
string start3 = string.Empty;
string start4 = string.Empty;
string start5 = string.Empty;
string End2 = string.Empty;
string End3 = string.Empty;
string End4 = string.Empty;
string End5 = string.Empty;
string query_type = string.Empty;
string time_cutoff = string.Empty;
string filter_after_timestamp = string.Empty;
string jsonRes = httpHelper.getHtmlfromUrlProxy(new Uri(PageUrls), "", 80, "", "");
//string[] ajexdataForTimeplane = System.Text.RegularExpressions.Regex.Split(jsonRes, "section_pagelet_id");
string[] ajexdataForTimeplane = System.Text.RegularExpressions.Regex.Split(jsonRes, "profile_id");
foreach (string item in ajexdataForTimeplane)
{
try
{
if (!item.Contains("<!DOCTYPE"))
{
string data = item.Substring(item.IndexOf(":"), item.IndexOf(",") - item.IndexOf(":")).Replace(":", "").Replace("\"", "").Replace("\\", "").Replace(""", "").Trim();
{
try
{
string plane = data;
PageletList.Add(plane);
// PageletList=PageletList.Distinct().ToList();
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
}
}
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
}
string[] ajexdata = System.Text.RegularExpressions.Regex.Split(jsonRes, "ajaxpipe_token");
foreach (string item in ajexdata)
{
try
{
if (!item.Contains("<!DOCTYPE"))
{
string data = item.Substring(item.IndexOf(":"), item.IndexOf(",") - item.IndexOf(":")).Replace(":", "").Replace("\"", "");
{
ajaxpipe_token = data;
break;
}
}
//.........这里部分代码省略.........
示例4: StartMission_Comments
/// <summary>
/// Processes Comment IDs
/// Gets Next Page URL as well as End User IDs
/// </summary>
/// <param name="objCommentID">Comment ID</param>
private void StartMission_Comments(object objCommentID)
{
string CommentID = string.Empty;
try
{
if (!isStopFanPageScraper)
{
//string CommentID = (string)objCommentID;
string[] arrayParameters = (string[])objCommentID;
CommentID = (string)arrayParameters.GetValue(0);
string PageURL = (string)arrayParameters.GetValue(1);//(string)objCommentID;
GlobusHttpHelper httpHelper = new GlobusHttpHelper();
string GraphUrl = FBGlobals.Instance.fbgraphUrl + CommentID;
string jsonRes = string.Empty;
try
{
jsonRes = httpHelper.getHtmlfromUrlProxy(new Uri(FBGlobals.Instance.fbgraphUrl + CommentID + ""), "", 80, "", "");
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
ParseJson_Comments_Phase1(jsonRes, PageURL);
ParseJson_Comments_Next_Phase1(jsonRes, PageURL);
///After processing Comment ID, Update its Status as 1 => Processed
try
{
//qm.UpdateStatusForLevelOne(CommentID);
DataSet ds = new DataSet();
RaiseEvent(ds, new string[] { "Model : FanPagePostRepository", "Function : UpdateStatusUsingFriendId", CommentID });
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
}
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
finally
{
//if (!IsCloseCalled)
{
countThreadController--;
lock (lockrThreadController)
{
//if (!IsCloseCalled)
{
Monitor.Pulse(lockrThreadController);
}
}
}
}
}
示例5: GetCaptchaImageMultiModified
//.........这里部分代码省略.........
FirstName = listFirstName[Utils.GenerateRandom(0, listFirstName.Count)];
}
catch (Exception ex)
{
FirstName = string.Empty;
}
}
if (listLastName.Count > 0)
{
try
{
LastName = listLastName[Utils.GenerateRandom(0, listLastName.Count)];
}
catch (Exception ex)
{
LastName = string.Empty;
}
}
#endregion
}
#region Get Params
int intProxyPort = 80;
Regex IdCheck = new Regex("^[0-9]*$");
if (Utils.IsNumeric(proxyPort))
{
intProxyPort = int.Parse(proxyPort);
}
string pageSource = HttpHelper.getHtmlfromUrlProxy(new Uri("http://www.facebook.com/"), proxyAddress, intProxyPort, proxyUsername, proxyPassword);
#region CSS, JS, & Pixel requests to avoid Socket Detection
///JS, CSS, Image Requests
//RequestsJSCSSIMG.RequestJSCSSIMG(pageSource, ref HttpHelper);
///Pixel request
string reg_instanceValue = FBUtils.GetParamValue(pageSource, "reg_instance");
//string asyncSignal = Utils.GenerateRandom(3000, 4000).ToString();
string asyncSignal = string.Empty;
try
{
asyncSignal = Utils.GenerateRandom(3000, 8000).ToString();
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
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
if (pageSource.Contains("post_form_id"))
{
try
{
string post_id = pageSource.Substring(pageSource.IndexOf("post_form_id"), 200);
string[] Arr1 = post_id.Split('"');
post_form_id = Arr1[2];
}
示例6: ParseJson_Phase2
private void ParseJson_Phase2(object jsonRes)
{
try
{
lstFanPageScraperThreads.Add(Thread.CurrentThread);
lstFanPageScraperThreads.Distinct();
Thread.CurrentThread.IsBackground = true;
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
string Firstid = string.Empty;
try
{
if (!isStopFanPageScraper)
{
GlobusHttpHelper httpHelper = new GlobusHttpHelper();
string jsonItem = (string)jsonRes;
string[] idData = jsonItem.Split('^');
string url = string.Empty;
if (idData.Count() == 2)
{
Firstid = idData[0].ToString();
url = idData[1].ToString();
}
string jsonData = httpHelper.getHtmlfromUrlProxy(new Uri(FBGlobals.Instance.fbgraphUrl + Firstid + ""), "", 80, "", "");
JObject Data = JObject.Parse(jsonData);
string id = (string)((JValue)Data["id"]);
string name = (string)((JValue)Data["name"]);
string first_name = (string)((JValue)Data["first_name"]);
string middle_name = (string)((JValue)Data["middle_name"]);
string last_name = (string)((JValue)Data["last_name"]);
string link = (string)((JValue)Data["link"]);
string gender = (string)((JValue)Data["gender"]);
string locale = (string)((JValue)Data["locale"]);
if (string.IsNullOrEmpty(link))
{
string username = (string)((JValue)Data["username"]);
if (!string.IsNullOrEmpty(username))
{
link = FBGlobals.Instance.fbhomeurl + username;
}
else
{
link = FBGlobals.Instance.fbhomeurl + id;
}
}
string UserName = string.Empty;
if (jsonData.Contains("username"))
{
try
{
string UserName1 = jsonData.Substring(jsonData.IndexOf("username"));
string[] ArrTemp = UserName1.Split('"');
UserName = ArrTemp[2];
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
}
string FBEmailId = string.Empty;
if (!string.IsNullOrEmpty(UserName))
{
FBEmailId = UserName + "@facebook.com";
}
else
{
FBEmailId = UserName + "@facebook.com"; ;
}
string Mainurl = url;
try
{
try
{
QueueInsertQuery("Insert into tb_FanpageScraper (id,name,first_name,middle_name,last_name,link,gender,locale,ProfileStatus,url,ShowUser) values('" + (id) + "','" + (name) + "','" + (first_name) + "','" + (middle_name) + "','" + (last_name) + "','" + (link) + "','" + (gender) + "','" + (locale) + "','1','" + url + "','0')", id);
DataSet ds = new DataSet();
RaiseEvent(ds, new string[] { "Model : FanPageDataRepository", "Function : Insert", id, name, first_name, middle_name, last_name, link, gender, locale, "1", url, "0" });
//.........这里部分代码省略.........
示例7: SignupMultiThreaded
//.........这里部分代码省略.........
{
username = username.Replace("\0", "");
Password = Password.Replace("\0", "");
if (!(username.Count() < 15 || Password.Count() > 6))
{
if (username.Count() > 15)
{
Log("[ " + DateTime.Now + " ] => [ Username Must Not be greater than 15 character ]");
username = username.Remove(13); //Removes the extra characters
}
else if (Password.Count() < 6)
{
Log("[ " + DateTime.Now + " ] => [ Password Must Not be less than 6 character ]");
}
}
}
catch (Exception ex)
{
//Console.WriteLine("6 :" + ex.StackTrace);
GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup - SignupMultiThreaded() -- Check Username --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup - SignupMultiThreaded() -- Check Username >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
}
StartAgain:
Random randm = new Random();
double cachestop = randm.NextDouble();
string pagesourceGoogleCaptcha = string.Empty;
string signUpPage = string.Empty;
try
{
try
{
signUpPage = globusHelper.getHtmlfromUrlProxy(new Uri("https://twitter.com/signup"), proxyAddress, proxyPort, proxyUsername, proxyPassword, "", "");
}
catch (Exception ex)
{
Log("[ " + DateTime.Now + " ] => [ Error in Loading sign up page " + proxyAddress + " Exception" + ex.Message + " ]");
}
if (string.IsNullOrEmpty(signUpPage))
{
Thread.Sleep(500);
signUpPage = globusHelper.getHtmlfromUrlProxy(new Uri("https://twitter.com/signup"), proxyAddress, proxyPort, proxyUsername, proxyPassword, "", "");
}
//Check if captchaAvailable, if yes, hit google captcha url
if (!string.IsNullOrEmpty(signUpPage) && signUpPage.Contains("captchaAvailable":true"))
{
try
{
string pagesource1 = globusHelper.getHtmlfromUrlProxy(new Uri("https://www.google.com/recaptcha/api/js/recaptcha_ajax.js"), proxyAddress, proxyPort, proxyUsername, proxyPassword, "", "");
}
catch { }
try
{
pagesourceGoogleCaptcha = globusHelper.getHtmlfromUrlProxy(new Uri("https://www.google.com/recaptcha/api/challenge?k=6LfbTAAAAAAAAE0hk8Vnfd1THHnn9lJuow6fgulO&ajax=1&cachestop=" + cachestop + "&lang=en"), proxyAddress, proxyPort, proxyUsername, proxyPassword, "", "");
}
catch { }
if (string.IsNullOrEmpty(pagesourceGoogleCaptcha))
{
Thread.Sleep(500);
pagesourceGoogleCaptcha = globusHelper.getHtmlfromUrlProxy(new Uri("https://www.google.com/recaptcha/api/challenge?k=6LfbTAAAAAAAAE0hk8Vnfd1THHnn9lJuow6fgulO&ajax=1&cachestop=" + cachestop + "&lang=en"), proxyAddress, proxyPort, proxyUsername, proxyPassword, "", "");
}
}
}
catch (Exception ex)
示例8: GetCaptchaImageMulti
//.........这里部分代码省略.........
//string lastname = string.Empty;
//string reg_email__ = string.Empty;
//string reg_email_confirmation__ = string.Empty;
//string reg_passwd__ = string.Empty;
//string sex = string.Empty;
//string birthday_month = string.Empty;
//string birthday_day = string.Empty;
//string birthday_year = string.Empty;
//string captcha_persist_data = string.Empty;
//string captcha_session = string.Empty;
//string extra_challenge_params = string.Empty;
//string recaptcha_public_key = string.Empty;
//string authp_pisg_nonce_tt = null;
//string authp = string.Empty;
//string psig = string.Empty;
//string nonce = string.Empty;
//string tt = string.Empty;
//string time = string.Empty;
//string challenge = string.Empty;
//string CaptchaSummit = string.Empty;
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");
//GlobusHttpHelper 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
///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();
}
示例9: btnTestPublicProxy_Click
private void btnTestPublicProxy_Click(object sender, EventArgs e)
{
CheckNetConn = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable();
if (CheckNetConn)
{
try
{
workingproxiesCount = 0;
AddToProxysLogs("[ " + DateTime.Now + " ] => [ Existing Proxies Saved To : ]");
AddToProxysLogs("[ " + DateTime.Now + " ] => [ " + Globals.Path_ExsistingProxies + " ]");
List<string> lstProxies = new List<string>();
if (chkboxUseUrlProxy.Checked && !string.IsNullOrEmpty(txtProxyUrl.Text))
{
GlobusHttpHelper HttpHelper = new GlobusHttpHelper();
string pageSource = HttpHelper.getHtmlfromUrlProxy(new Uri(txtProxyUrl.Text), "", "", "", "", "");
string[] array = Regex.Split(pageSource, "\n");
foreach (string item in array)
{
string Proxy = item.Replace("\r", "");
lstProxies.Add(item);
}
}
else if (!string.IsNullOrEmpty(txtPublicProxy.Text.Trim()))
{
lstProxies = GlobusFileHelper.ReadFiletoStringList(txtPublicProxy.Text);
}
else
{
AddToProxysLogs("[ " + DateTime.Now + " ] => [ Please Upload Either Url or Load Proxy Files ]");
return;
}
//lstProxies = Globussoft.GlobusFileHelper.ReadFiletoStringList(txtPublicProxy.Text);
AddToProxysLogs("[ " + DateTime.Now + " ] => [ " + lstProxies.Count() + " Public Proxies Uploaded ]");
new Thread(() =>
{
GetValidProxies(lstProxies);
}).Start();
}
catch (Exception)
{
}
}
else
{
MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection...");
AddToProxysLogs("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]");
}
}
示例10: SignupManual
//Added By abhishek
public System.Collections.Specialized.NameValueCollection SignupManual(object parameters, GlobusHttpHelper globusHelper)
{
Array paramsArray = new object[4];
paramsArray = (Array)parameters;
System.Collections.Specialized.NameValueCollection nvc = new System.Collections.Specialized.NameValueCollection();
string DBCUsername = BaseLib.Globals.DBCUsername;
string DBCPAssword = BaseLib.Globals.DBCPassword;
//GlobusHttpHelper globusHelper = new GlobusHttpHelper();
string ImageURL = string.Empty;
string authenticitytoken = string.Empty;
string capcthavalue = string.Empty;
string Email = string.Empty;//"[email protected]";
string Password = string.Empty;//"1JESUS11";
string proxyAddress = string.Empty;
string proxyPort = string.Empty;
string proxyUsername = string.Empty;
string proxyPassword = string.Empty;
string emailData = (string)paramsArray.GetValue(0);
string username = (string)paramsArray.GetValue(1);
string name = (string)paramsArray.GetValue(2);
string Proxy = (string)paramsArray.GetValue(3);
bool Created = true;
try
{
int Count = emailData.Split(':').Length;
if (Count == 1)
{
Log("[ " + DateTime.Now + " ] => [ Uploaded Emails Not In correct Format ]");
Log("[ " + DateTime.Now + " ] => [ " + emailData + " ]");
}
if (Count == 2)
{
Email = emailData.Split(':')[0].Replace("\0", "");
Password = emailData.Split(':')[1].Replace("\0", "");
}
else if (Count == 4)
{
Email = emailData.Split(':')[0].Replace("\0", "");
Password = emailData.Split(':')[1].Replace("\0", "");
proxyAddress = emailData.Split(':')[2];
proxyPort = emailData.Split(':')[3];
}
else if (Count == 6)
{
Email = emailData.Split(':')[0].Replace("\0", "");
Password = emailData.Split(':')[1].Replace("\0", "");
proxyAddress = emailData.Split(':')[2];
proxyPort = emailData.Split(':')[3];
proxyUsername = emailData.Split(':')[4];
proxyPassword = emailData.Split(':')[5];
}
else
{
Log("[ " + DateTime.Now + " ] => [ Uploaded Emails Not In correct Format ]");
Log("[ " + DateTime.Now + " ] => [ " + emailData + " ]");
}
}
catch (Exception ex)
{
Log(ex.Message); Console.WriteLine("8 :" + ex.StackTrace);
GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup - SignupMultiThreaded() -- Email Pass --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup - SignupMultiThreaded() -- Email Pass >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
}
try
{
RaiseEvent_AddToDictionary(Email);
}
catch (Exception ex) { Console.WriteLine(ex.StackTrace); }
try
{
if (Proxy.Split(':').Length == 4)
{
proxyAddress = Proxy.Split(':')[0];
proxyPort = Proxy.Split(':')[1];
proxyUsername = Proxy.Split(':')[2];
proxyPassword = Proxy.Split(':')[3];
}
}
catch (Exception ex)
{
Console.WriteLine("7 :" + ex.StackTrace);
GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup - SignupMultiThreaded() -- Proxy Split --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup - SignupMultiThreaded() -- Proxy Split >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
}
string url = "https://twitter.com/users/email_available?suggest=1&username=&full_name=&email=" + Email.Replace("@", "%40").Replace(" ", "") + "&suggest_on_username=true&context=signup";
string EmailCheck = globusHelper.getHtmlfromUrlProxy(new Uri(url), proxyAddress, proxyPort, proxyUsername, proxyPassword, "https://twitter.com/signup", "");
if (EmailCheck.Contains("\"taken\":true"))
{
//.........这里部分代码省略.........
示例11: AccountCreator
//.........这里部分代码省略.........
CountMobAgent++;
if (CountTweet >= lstMobTweet.Count)
{
CountTweet = 0;
}
Tweet = lstMobTweet[CountTweet];
CountTweet++;
if (CountUrl >= lstMobUrl.Count)
{
CountUrl = 0;
}
URl = lstMobUrl[CountUrl];
CountUrl++;
if (CountLocation >= lstMobLocation.Count)
{
CountUrl = 0;
}
Location = lstMobLocation[CountLocation];
CountUrl++;
if (CountBio >= lstMobBio.Count)
{
CountBio = 0;
}
Bio = lstMobBio[CountBio];
CountBio++;
int tempCount_usernameCheckLoop = 0;
usernameCheckLoop:
string url1 = "https://twitter.com/users/email_available?suggest=1&username=&full_name=&email=" + Uri.EscapeDataString(email.Replace(" ", "")) + "&suggest_on_username=true&context=signup";
string EmailCheck = HttpHelper.getHtmlfromUrlProxy(new Uri(url1), proxyAddress, proxyPort, proxyUsername, proxyPassword, "https://twitter.com/signup,", "", mobileagent);
string Usernamecheck = HttpHelper.getHtmlfromUrlProxy(new Uri("https://twitter.com/users/username_available?suggest=1&username=" + username + "&full_name=" + name + "&email=&suggest_on_username=true&context=signup"), proxyAddress, proxyPort, proxyUsername, proxyPassword, "https://twitter.com/signup,", "", mobileagent);
if (EmailCheck.Contains("Email has already been taken. An email can only be used on one Twitter account at a time"))
{
AddToMobileLogs("[ " + DateTime.Now + " ] => [ Email : " + email + " has already been taken. An email can only be used on one Twitter account at a time ]");
return;
}
else if (Usernamecheck.Contains("Username has already been taken"))
{
//Created = false;
AddToMobileLogs("[ " + DateTime.Now + " ] => [ Username : " + username + " has already been taken ]");
if (username.Count() > 12)
{
username = username.Remove(8); //Removes the extra characters
}
if (username.Count() > 15)
{
username = username.Remove(13); //Removes the extra characters
}
username = username + RandomStringGenerator.RandomStringAndNumber(5);
tempCount_usernameCheckLoop++;
if (tempCount_usernameCheckLoop < 5)
{
goto usernameCheckLoop;
}
}
else if (EmailCheck.Contains("You cannot have a blank email address"))
{
AddToMobileLogs("[ " + DateTime.Now + " ] => [ You cannot have a blank email address ]");
示例12: ThreadMethod_CheckEmails
private void ThreadMethod_CheckEmails(object parameters)
{
try
{
Array paramsArray = new object[2];
paramsArray = (Array)parameters;
string Email = string.Empty;//"[email protected]";
string proxyAddress = string.Empty;
string proxyPort = string.Empty;
string proxyUsername = string.Empty;
string proxyPassword = string.Empty;
string emailData = (string)paramsArray.GetValue(0);
string Proxy = (string)paramsArray.GetValue(1);
Email = emailData.Split(':')[0];
if (!string.IsNullOrEmpty(Proxy))
{
try
{
string[] ProxyData = Proxy.Split(':');
if (ProxyData.Count() == 2)
{
proxyAddress = ProxyData[0];
proxyPort = ProxyData[1];
}
if (ProxyData.Count() == 4)
{
proxyAddress = ProxyData[0];
proxyPort = ProxyData[1];
proxyUsername = ProxyData[2];
proxyPassword = ProxyData[3];
}
}
catch (Exception)
{
}
}
GlobusHttpHelper gHttpHelpr = new GlobusHttpHelper();
string res_MainPage = gHttpHelpr.getHtmlfromUrlProxy(new Uri("https://twitter.com/account/resend_password"), "", proxyAddress, proxyPort, proxyUsername, proxyPassword);
string postAuthenticityToken = TweetAccountManager.PostAuthenticityToken(res_MainPage, "postAuthenticityToken");
string postData = "authenticity_token=" + postAuthenticityToken + "&email_or_phone=" + Uri.EscapeDataString(Email) + "&screen_name=";
string postResponse = gHttpHelpr.postFormData(new Uri("https://twitter.com/account/resend_password"), postData, "", "", "", "", "");
string responseURL = gHttpHelpr.gResponse.ResponseUri.AbsoluteUri;
responseURL = responseURL.ToLower();
//if (responseURL.Contains(DateTime.Now + " twitter.com/account/password_reset_sent ]"))
if (responseURL.Contains("twitter.com/account/password_reset_sent"))
{
//has account
GlobusFileHelper.AppendStringToTextfileNewLine(Email, Globals.path_DesktopFolder + "\\ExistingEmail_EmailChecker.txt");
AddToListAccountsLogs("[ " + DateTime.Now + " ] => [ Existing Email : " + Email + " ]");
}
else if (responseURL.Contains("captcha") || responseURL.Contains("security"))
{
GlobusFileHelper.AppendStringToTextfileNewLine(Email, Globals.path_DesktopFolder + "\\AskingSecurityEmail_EmailChecker.txt");
AddToListAccountsLogs("[ " + DateTime.Now + " ] => [ Asking Security with Email : " + Email + " ]");
}
else if (responseURL.Contains("twitter.com/account/resend_password") && postResponse.Contains("robots"))
{
GlobusFileHelper.AppendStringToTextfileNewLine(Email, Globals.path_DesktopFolder + "\\TemporarilyLocked_EmailChecker.txt");
AddToListAccountsLogs("[ " + DateTime.Now + " ] => [ We've temporarily locked your ability to reset passwords. Please chillax for a few, then try again. : " + Email + " ]");
}
else if (postResponse.Contains("प्रतीत होता है की आपने एक अबैध ईमेल पता या फ़ोन नंबर भरा है. कृपया पुनः प्रयास करें.") || postResponse.Contains("It looks like you entered an invalid email address or phone number. Please try again."))
{
GlobusFileHelper.AppendStringToTextfileNewLine(Email, Globals.path_DesktopFolder + "\\TemporarilyLocked_EmailChecker.txt");
AddToListAccountsLogs("[ " + DateTime.Now + " ] => [ invalid email address: " + Email + " ]");
}
else
{
//no account
GlobusFileHelper.AppendStringToTextfileNewLine(Email, Globals.path_DesktopFolder + "\\NonExistingEmail_EmailChecker.txt");
AddToListAccountsLogs("[ " + DateTime.Now + " ] => [ NON Existing Email : " + Email + " ]");
}
}
catch (Exception ex)
{
Console.WriteLine(ex.StackTrace);
}
}
示例13: chkboxImportPublicProxy_CheckedChanged
private void chkboxImportPublicProxy_CheckedChanged(object sender, EventArgs e)
{
try
{
if (chkboxImportPublicProxy.Checked)
{
if (chkboxUseUrlProxy.Checked && !string.IsNullOrEmpty(txtProxyUrl.Text))
{
GlobusHttpHelper HttpHelper = new GlobusHttpHelper();
string pageSource = HttpHelper.getHtmlfromUrlProxy(new Uri(txtProxyUrl.Text), "", "", "", "", "");
string[] array = Regex.Split(pageSource, "\n");
foreach (string item in array)
{
lstPublicProxyWOTest.Add(item.Replace("\r", ""));
}
}
else if (!string.IsNullOrEmpty(txtPublicProxy.Text))
{
lstPublicProxyWOTest = GlobusFileHelper.ReadFiletoStringList(txtPublicProxy.Text);
}
else
{
AddToProxysLogs("[ " + DateTime.Now + " ] => [ Please Upload Either Url or Load Proxy Files ]");
return;
}
AddToProxysLogs("[ " + DateTime.Now + " ] => [ " + lstPublicProxyWOTest.Count + " Public Proxies Loaded ]");
if (lstPublicProxyWOTest.Count > 0)
{
new Thread(() =>
{
foreach (string item in lstPublicProxyWOTest)
{
ImportingProxy(item);
}
}
).Start();
}
else
{
AddToProxysLogs("[ " + DateTime.Now + " ] => [ Sorry No Proxies Available ]");
}
}
}
catch (Exception)
{
}
}
示例14: GetUserFollowing_newComment
public List<string> GetUserFollowing_newComment(string UserName, int NoOfPage, int FollowingCount)
{
List<string> TotalFollowerComment = new List<string>();
try
{
List<string> FollowerComment = new List<string>();
GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ Starting Extraction Of Following For " + UserName + " ]");
GlobusHttpHelper objglobusHttpHelper = new GlobusHttpHelper();
for (int i = 1; i <= 1000; i++)
{
try
{
string FollowerPageSource = string.Empty;
if (i == 1)
{
FollowUrl = "http://pinterest.com/" + UserName + "/following/";
FollowerPageSource = objglobusHttpHelper.getHtmlfromUrl(new Uri(FollowUrl), referer, string.Empty, "");
referer = FollowUrl;
}
else
{
FollowUrl = "https://www.pinterest.com/resource/UserFollowingResource/get/?source_url=%2F" + UserName + "%2Ffollowing%2F&data=%7B%22options%22%3A%7B%22username%22%3A%22" + UserName + "%22%2C%22bookmarks%22%3A%5B%22" + bookmark + "%3D%22%5D%7D%2C%22context%22%3A%7B%7D%7D&module_path=App(module%3D%5Bobject+Object%5D)&_=144204352215" + (i - 1);
try
{
FollowerPageSource = objglobusHttpHelper.getHtmlfromUrlProxy(new Uri(FollowUrl), referer, "", 80, string.Empty, "", "");
}
catch
{
FollowerPageSource = objglobusHttpHelper.getHtmlfromUrlProxy(new Uri(FollowUrl), "", Convert.ToInt32(""), "", "");
}
if (FollowerPageSource.Contains("Whoops! We couldn't find that page."))
{
break;
}
}
///Get App Version
if (FollowerPageSource.Contains("app_version") && string.IsNullOrEmpty(AppVersion))
{
string[] ArrAppVersion = System.Text.RegularExpressions.Regex.Split(FollowerPageSource, "app_version");
if (ArrAppVersion.Count() > 0)
{
string DataString = ArrAppVersion[ArrAppVersion.Count() - 1];
int startindex = DataString.IndexOf("\": \"");
int endindex = DataString.IndexOf("\", \"");
AppVersion = DataString.Substring(startindex, endindex - startindex).Replace("\": \"", "");
}
}
///get bookmarks value from page
///
if (FollowerPageSource.Contains("bookmarks"))
{
string[] bookmarksDataArr = System.Text.RegularExpressions.Regex.Split(FollowerPageSource, "bookmarks");
string Datavalue = string.Empty;
if (bookmarksDataArr.Count() > 2)
Datavalue = bookmarksDataArr[bookmarksDataArr.Count() - 2];
else
Datavalue = bookmarksDataArr[bookmarksDataArr.Count() - 1];
bookmark = Datavalue.Substring(Datavalue.IndexOf(": [\"") + 4, Datavalue.IndexOf("]") - Datavalue.IndexOf(": [\"") - 5);
}
try
{
if (!FollowerPageSource.Contains("No one has followed"))
{
List<string> lst = objGlobusRegex.GetHrefUrlTags(FollowerPageSource);
if (lst.Count == 0)
{
lst = System.Text.RegularExpressions.Regex.Split(FollowerPageSource, "href").ToList();
if (lst.Count() == 1)
{
lst = System.Text.RegularExpressions.Regex.Split(FollowerPageSource, "\"username\":").ToList();
}
}
foreach (string item in lst)
{
if (item.Contains("class=\"userWrapper") || item.Contains("class=\\\"userWrapper"))
{
try
{
if (item.Contains("\\"))
{
int FirstPinPoint = item.IndexOf("=\\\"/");
int SecondPinPoint = item.IndexOf("/\\\"");
User = item.Substring(FirstPinPoint, SecondPinPoint - FirstPinPoint).Replace("\"", string.Empty).Replace("\\", string.Empty).Replace("=", string.Empty).Replace("/", string.Empty).Trim();
}
else
{
int FirstPinPoint = item.IndexOf("href=");
int SecondPinPoint = item.IndexOf("class=");
//.........这里部分代码省略.........
示例15: Login
public void Login(ref GlobusHttpHelper httpHelper)
{
try
{
this.httpHelper = httpHelper;
if (string.IsNullOrEmpty(proxyPort))
{
proxyPort = "0";
}
//string _MainSourcePage = httpHelper.getHtmlfromUrl(new Uri("https://pinterest.com/login/"), string.Empty, string.Empty, this.UserAgent);
string _MainSourcePage = httpHelper.getHtmlfromUrlProxy(new Uri("https://pinterest.com/login/"), "", proxyAddress, int.Parse(proxyPort), proxyUsername, proxyPassword, "");
///Get App Version
if (_MainSourcePage.Contains("app_version"))
{
string[] ArrAppVersion = System.Text.RegularExpressions.Regex.Split(_MainSourcePage, "app_version");
if (ArrAppVersion.Count() > 0)
{
string DataString = ArrAppVersion[ArrAppVersion.Count() - 1];
int startindex = DataString.IndexOf("\"");
string start = DataString.Substring(startindex).Replace("\": \"", "").Replace("\"", string.Empty);
int endindex = start.IndexOf("}");
App_version = start.Substring(0, endindex);
}
}
else
{
///App version is not available in page source
}
string referer = "https://www.pinterest.com/login/";
//string PostData = "source_url=%2Flogin%2F&data=%7B%22options%22%3A%7B%22username_or_email%22%3A%22" + Uri.EscapeDataString(Username) + "%22%2C%22password%22%3A%22" + Password + "%22%7D%2C%22context%22%3A%7B%22app_version%22%3A%22" + App_version + "%22%7D%7D&module_path%3DApp()%3ELoginPage()%3ELogin()%3EButton(class_name%3Dprimary%2C%20text%3DLog%20in%2C%20type%3Dsubmit%2C%20size%3Dlarge)";
string PostData = "source_url=%2Flogin%2F&data=%7B%22options%22%3A%7B%22username_or_email%22%3A%22" + Uri.EscapeDataString(Username) + "%22%2C%22password%22%3A%22" + Password + "%22%7D%2C%22context%22%3A%7B%22app_version%22%3A%22" + App_version + "%22%2C%22https_exp%22%3Afalse%7D%7D&module_path=App()%3ELoginPage()%3ELogin()%3EButton(class_name%3Dprimary%2C+text%3DLog+in%2C+type%3Dsubmit%2C+size%3Dlarge)";
//PostData = "source_url=%2Fsettings%2F&data=%7B%22options%22%3A%7B%22first_name%22%3A%22abhay%22%2C%22last_name%22%3A%22mahavar%22%2C%22username%22%3A%22"++"%22%2C%22about%22%3A%22hi+i+am+software+Developer%22%2C%22location%22%3A%22kanpur%22%2C%22website_url%22%3A%22http%3A%2F%2Fwww.scriptnut.com%2F%22%7D%2C%22context%22%3A%7B%22app_version%22%3A%22b1da8fc%22%2C%22https_exp%22%3Afalse%7D%7D&module_path=App()%3EUserSettingsPage(resource%3DUserSettingsResource())%3EShowModalButton(module%3DUserEdit)%23Modal(module%3DUserEdit(resource%3DUserSettingsResource()))";
string login = httpHelper.postFormDataProxy(new Uri("https://www.pinterest.com/resource/UserSessionResource/create/"), PostData, referer, proxyAddress, int.Parse(proxyPort), proxyUsername, proxyPassword);
string AfterLoginPageSource = httpHelper.getHtmlfromUrlProxy(new Uri("https://www.pinterest.com"), "", proxyAddress, int.Parse(proxyPort), proxyUsername, proxyPassword, "");
if (AfterLoginPageSource.Contains("Logout") || AfterLoginPageSource.Contains("pinHolder"))
{
Log("[ " + DateTime.Now + " ] => [ Successfully Login for " + Username + " ]");
this.LoggedIn = true;
}
else
{
Log("[ " + DateTime.Now + " ] => [ Login Failed for " + Username + " ]");
this.LoggedIn = false;
}
//List<string> listFollowersFromDatabse = new List<string>();
try
{
List<string> listFollowersFromDatabse = new List<string>();
try
{
string screen_Name = Getscreen_Name();
string selectquery = "Select * from tb_FollowerName where UserName='" + screen_Name + "'";
System.Data.DataSet ds = DataBaseHandler.SelectQuery(selectquery, "tb_FollowerName");
foreach (System.Data.DataRow dRow in ds.Tables[0].Rows)
{
try
{
listFollowersFromDatabse.Add(dRow["FollwerName"].ToString());
}
catch { }
}
}
catch { }
try
{
FrmEmailProxyAssigner obj = new FrmEmailProxyAssigner();
string screen_Name = Getscreen_Name();
//Get current followers list from website
List<string> FollowersName = GetRefrshFollowerName(screen_Name);
//FollowersName.RemoveAt(0);
if (FollowersName != null)
{
FollowersName = FollowersName.Distinct().ToList();
}
if (FollowersName.Contains(screen_Name))
{
FollowersName.Remove(screen_Name);
}
//listFollowersFromDatabse.Add("gunde");
List<string> listUnfollowers = listFollowersFromDatabse.Except(FollowersName).ToList();
//.........这里部分代码省略.........