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 : "******" Need Photo for Identification "); GlobusLogHelper.log.Debug("Your 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 : "******" Use a phone to verify your account "); GlobusLogHelper.log.Debug("Your 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 : "******" Provide your birthday "); GlobusLogHelper.log.Debug("Your 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 : "******" The text you entered didn't match the security check "); GlobusLogHelper.log.Debug("Your 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; }