本文整理汇总了C#中BaseLib.GlobusHttpHelper.getImgfromUrl方法的典型用法代码示例。如果您正苦于以下问题:C# GlobusHttpHelper.getImgfromUrl方法的具体用法?C# GlobusHttpHelper.getImgfromUrl怎么用?C# GlobusHttpHelper.getImgfromUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseLib.GlobusHttpHelper
的用法示例。
在下文中一共展示了GlobusHttpHelper.getImgfromUrl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SolveFacebookCaptcha
private bool SolveFacebookCaptcha(ref FacebookUser fbUser, GlobusHttpHelper HttpHelper, ref string captchaUrl, string fb_dtsg, string temp_nh, string tempPostUrl, string tempresponse, string captcha_persist_data, ref string challengeurl, ref string captchaText, ref string tempcaptchresponse)
{
try
{
GlobusLogHelper.log.Info("Try to solving facebook captcha : " + fbUser.username);
GlobusLogHelper.log.Debug("Try to solving facebook captcha : " + fbUser.username);
challengeurl = tempresponse.Substring(tempresponse.IndexOf("captcha_challenge_code="), (tempresponse.IndexOf("captcha_challenge_hash=", tempresponse.IndexOf("captcha_challenge_code=")) - tempresponse.IndexOf("captcha_challenge_code="))).Replace("captcha_challenge_code=", string.Empty).Trim().Replace(")", string.Empty).Replace("'", string.Empty).Replace("\"", string.Empty).Replace("\"", string.Empty).Replace(" ", string.Empty).Trim().Replace("&", "");
string facebookurl = FBGlobals.Instance.AccountVerificationCaptchaTfbimageChallengeUrl + challengeurl + "&captcha_challenge_hash=" + captcha_persist_data; //"https://www.facebook.com/captcha/tfbimage.php?captcha_challenge_code="
captchaUrl = facebookurl;
byte[] captchaPgsrc = HttpHelper.getImgfromUrl(new Uri(captchaUrl));
System.Net.WebClient webclient = new System.Net.WebClient();
string[] arr1 = new string[3] { FBGlobals.dbcUserName, FBGlobals.dbcPassword, "" };
captchaText = DecodeDBC(arr1, captchaPgsrc);
if (!string.IsNullOrEmpty(captchaText))
{
string captchapostdata = "fb_dtsg=" + fb_dtsg + "&nh=" + temp_nh + "&geo=true&captcha_persist_data=" + captcha_persist_data + "&captcha_response=" + captchaText + "&achal=8&submit%5BSubmit%5D=Submit";
tempcaptchresponse = HttpHelper.postFormData(new Uri(tempPostUrl), captchapostdata, FBGlobals.Instance.AccountVerificationCheckpointUrl);
if (tempcaptchresponse.Contains("To verify that you are the owner of this account, please identify the people tagged in the following photos. If you aren't sure about a question, please click") || tempcaptchresponse.Contains("To make sure this is your account, we need you to upload a color photo of your government-issued ID. Your ID should include your name"))
{
GlobusFileHelper.AppendStringToTextfileNewLine(fbUser.username + ":" + fbUser.password + ":" + fbUser.proxyip + ":" + fbUser.proxyport + ":" + fbUser.proxyusername + ":" + fbUser.password, exportFilePathAccountVerification + "\\SecurityAccountWithPhotoVerify.txt");
GlobusLogHelper.log.Info("Your Username : " + fbUser.username + " Need Photo for Identification ");
GlobusLogHelper.log.Debug("Your Username : " + fbUser.username + " Need Photo for Identification ");
return true;
}
if (tempcaptchresponse.Contains("Use a phone to verify your account"))
{
GlobusFileHelper.AppendStringToTextfileNewLine(fbUser.username + ":" + fbUser.password + ":" + fbUser.proxyip + ":" + fbUser.proxyport + ":" + fbUser.proxyusername + ":" + fbUser.password, exportFilePathAccountVerification + "\\UsePhoneToVerifyYourAccount.txt");
GlobusLogHelper.log.Info("Your Username : " + fbUser.username + " Use a phone to verify your account ");
GlobusLogHelper.log.Debug("Your Username : " + fbUser.username + " Use a phone to verify your account ");
return true;
}
if (tempcaptchresponse.Contains("Please confirm your identity") && tempcaptchresponse.Contains("Provide your birthday"))
{
GlobusFileHelper.AppendStringToTextfileNewLine(fbUser.username + ":" + fbUser.password + ":" + fbUser.proxyip + ":" + fbUser.proxyport + ":" + fbUser.proxyusername + ":" + fbUser.password, exportFilePathAccountVerification + "\\Provideyourbirthday.txt");
GlobusLogHelper.log.Info("Your Username : " + fbUser.username + " Provide your birthday ");
GlobusLogHelper.log.Debug("Your Username : " + fbUser.username + " Provide your birthday ");
return true;
}
if (tempcaptchresponse.Contains("The text you entered didn't match the security check"))
{
//GlobusFileHelper.AppendStringToTextfileNewLine(fbUser.username + ":" + fbUser.password + ":" + fbUser.proxyip + ":" + fbUser.proxyport + ":" + fbUser.proxyusername + ":" + fbUser.password, exportFilePathAccountVerification + "\\UsePhoneToVerifyYourAccount.txt");
GlobusLogHelper.log.Info("Your Username : " + fbUser.username + " The text you entered didn't match the security check ");
GlobusLogHelper.log.Debug("Your Username : " + fbUser.username + " The text you entered didn't match the security check ");
}
return false;
}
else
{
return false;
}
}
catch (Exception ex)
{
GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
}
return false;
}