当前位置: 首页>>代码示例>>C#>>正文


C# GlobusHttpHelper.postFormData方法代码示例

本文整理汇总了C#中GlobusHttpHelper.postFormData方法的典型用法代码示例。如果您正苦于以下问题:C# GlobusHttpHelper.postFormData方法的具体用法?C# GlobusHttpHelper.postFormData怎么用?C# GlobusHttpHelper.postFormData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GlobusHttpHelper的用法示例。


在下文中一共展示了GlobusHttpHelper.postFormData方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PostFinalMsgGroupMember_1By1


//.........这里部分代码省略.........

                                    try
                                    {

                                        if (ds.Tables.Count > 0)
                                        {
                                            if (ds.Tables[0].Rows.Count > 0)
                                            {

                                                PostMessage = "";
                                                ResponseStatusMsg = "Already Sent";

                                            }
                                            else
                                            {
                                                if (ds_bList.Tables.Count > 0 && ds_bList.Tables[0].Rows.Count > 0)
                                                {
                                                    GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ User: " + ContactName + " is Added BlackListed List For Send Messages Pls Check ]");
                                                    ResponseStatusMsg = "BlackListed";
                                                }
                                                else
                                                {

                                                    try
                                                    {
                                                        string Url_compose = "https://www.linkedin.com/inbox/#compose?connId=" + ToCd + "&groupId=" + grpId;
                                                        string Responce = HttpHelper.getHtmlfromUrl(new Uri(Url_compose));
                                                        {

                                                            string PostUrlsssss = "https://www.linkedin.com/inbox/mailbox/message/send";


                                                            string PostDataFinal1 = "senderEmail=645883950&ccInput=&subject=" + Uri.EscapeDataString(tempsubject.ToString()) + "&body=" + Uri.EscapeDataString(tempBody.ToString()) + "&persist=true&showRecipients=showRecipients&isReply=&isForward=&itemId=&recipients=" + ToCd + "&recipientNames=%5B%7B%22memberId%22%3A" + ToCd + "%2C%22fullName%22%3A%22" + ContactName + "%22%7D%5D&groupId=" + grpId + "&csrfToken=" + csrfToken + "&sourceAlias=0_3mbGc9okCQbybxvc2A5Vz5&submit=Envoyer";
                                                            ResponseStatusMsg = HttpHelper.postFormData(new Uri(PostUrlsssss), PostDataFinal1);
                                                        }


                                                    }
                                                    catch (Exception ex)
                                                    {
                                                    }
                                                    if (ResponseStatusMsg.Contains("upload_error") && ResponseStatusMsg.Contains("There was an error with the file upload. Please try again later"))
                                                    {
                                                        PostMessage = "csrfToken=" + csrfToken + "&subject=" + Uri.EscapeDataString(msg.ToString()) + "&body=" + Uri.EscapeDataString(tempBody.ToString()) + "&submit=Send+Message&fromName=" + Uri.EscapeDataString(FromEmailNam) + "&showRecipeints=showRecipeints&fromEmail=" + FromemailId + "&connectionIds=" + connId + "&connectionNames=&allowEditRcpts=true&addMoreRcpts=false&openSocialAppBodySuffix=&st=&viewerDestinationUrl=&contentType=MEBC&groupID=" + grpId + "";
                                                        ResponseStatusMsg = HttpHelper.postFormData(new Uri("https://www.linkedin.com/groupMsg"), PostMessage);
                                                    }


                                                }
                                            }
                                        }
                                        else
                                        {
                                            if (ds_bList.Tables.Count > 0)
                                            {
                                                if (ds_bList.Tables[0].Rows.Count > 0)
                                                {

                                                    GlobusLogHelper.log.Info("[ " + DateTime.Now + " ] => [ User: " + ContactName + " is Added BlackListed List For Send Messages Pls Check ]");
                                                    ResponseStatusMsg = "BlackListed";
                                                }
                                                else
                                                {
                                                    try
                                                    {
                                                        string Url_compose = "https://www.linkedin.com/inbox/#compose?connId=" + ToCd + "&groupId=" + grpId;
开发者ID:sumitglobussoft,项目名称:LinkedDominator-3.0,代码行数:67,代码来源:MessageGroupMember.cs

示例2: SignupMultiThreaded


//.........这里部分代码省略.........
                            //Log("Cannot find Authenticity Token On Page for : " + Email);
                            if (counter_AuthToken == 0)
                            {
                                Log("[ " + DateTime.Now + " ] => [ Retrying for Authenticity Token for : " + Email + " ]");
                                goto StartAgain;
                            }
                            else
                            {
                                Log("[ " + DateTime.Now + " ] => [ Cannot find Authenticity Token On Page, Exiting for : " + Email + " ]");
                                //Log("Couldn't create Account with : " + Email);
                                lock (Lock_notCreatedaccounts)
                                {
                                    GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password + ":" + IPAddress + ":" + IPPort + ":" + IPUsername + ":" + IPpassword, Globals.path_FailedCreatedAccounts);
                                    GlobusFileHelper.AppendStringToTextfileNewLine(Email + ":" + Password, Globals.path_FailedCreatedAccountsOnlyEmailPass);
                                }

                                Globals.EnquequeDataForSignUp(new object[] { emailData, username, name, IP });

                                return;
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        //Console.WriteLine("2 :" + ex.StackTrace);
                        GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- Getting Authenticity --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                        GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- Getting Authenticity >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
                    }
                    ////Posting data
                    try
                    {
                        //Sign Up
                        string postData_SignUp = "user%5Bname%5D=" + username + "&user%5Bemail%5D=" + Uri.EscapeDataString(Email) + "&user%5Buser_password%5D=" + Password + "&context=front&authenticity_token=" + authenticitytoken + "";
                        string res_PostSignUp = globusHelper.postFormData(new Uri("https://twitter.com/signup"), postData_SignUp, "", "", "", "", "");

                        int tempCount_usernameCheckLoop = 0;
                    usernameCheckLoop:
                        int tempCount_passwordCheckLoop = 0;

                        bool Created = true;
                        string url = "https://twitter.com/users/email_available?suggest=1&username=&full_name=&email=" + Uri.EscapeDataString(Email.Replace(" ", "")) + "&suggest_on_username=true&context=signup";
                        string EmailCheck = globusHelper.getHtmlfromUrlIP(new Uri(url), IPAddress, IPPort, IPUsername, IPpassword, "https://twitter.com/signup", "");
                        string Usernamecheck = globusHelper.getHtmlfromUrlIP(new Uri("https://twitter.com/users/username_available?suggest=1&username=" + username + "&full_name=" + name + "&email=&suggest_on_username=true&context=signup"), IPAddress, IPPort, IPUsername, IPpassword, "https://twitter.com/signup", "");

                        if (EmailCheck.Contains("Email has already been taken. An email can only be used on one Twitter account at a time")
                            || (res_PostSignUp.Contains("You already have an account with this username and password")))
                        {
                            Log("[ " + DateTime.Now + " ] => [ Email : " + Email + " has already been taken. An email can only be used on one Twitter account at a time ]");
                            GlobusFileHelper.AppendStringToTextfileNewLine(emailData.Replace("\0", ""), Globals.path_EmailAlreadyTaken);
                            Created = false;
                        }
                        else if (Usernamecheck.Contains("Username has already been taken"))
                        {
                            //Created = false;
                            Log("[ " + DateTime.Now + " ] => [ Username : " + username + " has already been taken ]");
                            if (username.Count() > 12)
                            {
                                username = username.Remove(8); //Removes the extra characters
                            }

                            if (UsernameType == "String")
                            {
                                Log("[ " + DateTime.Now + " ] => [ Adding String To Username ]");
                                username = username + RandomStringGenerator.RandomString(5);
                            }
                            else if (UsernameType == "Numbers")
开发者ID:prog-moh,项目名称:twtboard,代码行数:67,代码来源:TwitterSignUp.cs

示例3: AddaPicture

		public bool AddaPicture(ref GlobusHttpHelper HttpHelper, string Username, string Password, List<string> localImagePath, string proxyAddress, string proxyPort, string proxyUsername, string proxyPassword, string targeturl, string message, ref string status, string pageSource_Home, string xhpc_targetid, string xhpc_composerid, string message_text, string fb_dtsg, string UsreId, string pageSource, ref int tempCountMain)        
		{


			int tempCount = 0;
			startAgain:

			bool isSentPicMessage = false;
		
			string photo_id = string.Empty;


			try
			{
			

				string composer_session_id = "";

				string tempresponse1 = "";
				///temp post
				{
					string source = "";
					string profile_id = "";
					string gridID = "";
					//  string qn = string.Empty;

					try
					{
						string Url = "https://www.facebook.com/ajax/composerx/attachment/media/upload/?composerurihash=1";
						string posturl1 = "fb_dtsg=" + fb_dtsg + "&composerid=" + xhpc_composerid + "&targetid=" + xhpc_targetid + "&loaded_components[0]=maininput&loaded_components[1]=cameraicon&loaded_components[2]=withtaggericon&loaded_components[3]=placetaggericon&loaded_components[4]=mainprivacywidget&loaded_components[5]=cameraicon&loaded_components[6]=mainprivacywidget&loaded_components[7]=withtaggericon&loaded_components[8]=placetaggericon&loaded_components[9]=maininput&nctr[_mod]=pagelet_group_composer&__user=" + UsreId + "&__a=1&__dyn=7n88QoAMNoBwXAw&__req=i&phstamp=16581688688747595501";    //"fb_dtsg=" + fb_dtsg + "&composerid=" + xhpc_composerid + "&targetid=" + xhpc_targetid + "&istimeline=1&timelinelocation=composer&loaded_components[0]=maininput&loaded_components[1]=mainprivacywidget&loaded_components[2]=mainprivacywidget&loaded_components[3]=maininput&loaded_components[4]=explicitplaceinput&loaded_components[5]=hiddenplaceinput&loaded_components[6]=placenameinput&loaded_components[7]=hiddensessionid&loaded_components[8]=withtagger&loaded_components[9]=backdatepicker&loaded_components[10]=placetagger&loaded_components[11]=withtaggericon&loaded_components[12]=backdateicon&loaded_components[13]=citysharericon&nctr[_mod]=pagelet_timeline_recent&__user=" + UsreId + "&__a=1&__dyn=7n88QoAMNoBwXAw&__req=18&phstamp=1658168111112559866679";
						// string PostUrl = "city_id=" + CityIDS1 + "&city_page_id=" + city_page_id + "&city_name=" + CityName1 + "&is_default=false&session_id=1362404125&__user=" + UsreId + "&__a=1&__dyn=798aD5z5ynU&__req=z&fb_dtsg=" + fb_dtsg + "&phstamp=1658168111112559866165";
						string res11 = HttpHelper.postFormData(new Uri(Url), posturl1);


						try
						{
							source = res11.Substring(res11.IndexOf("source\":"), (res11.IndexOf(",", res11.IndexOf("source\":")) - res11.IndexOf("source\":"))).Replace("source\":", string.Empty).Replace("<dd>", string.Empty).Replace("\\", string.Empty).Replace("\"", string.Empty).Trim();

						}
						catch (Exception ex)
						{
							Console.WriteLine(ex.StackTrace);
						}
						if (string.IsNullOrEmpty(source))
						{
							source = GlobusHttpHelper.getBetween(res11, "source", "profile_id").Replace("\\\"","").Replace(",","").Replace(":","").Trim();

						}
						try
						{
							profile_id = res11.Substring(res11.IndexOf("profile_id\":"), (res11.IndexOf("}", res11.IndexOf("profile_id\":")) - res11.IndexOf("profile_id\":"))).Replace("profile_id\":", string.Empty).Replace("<dd>", string.Empty).Replace("\\", string.Empty).Replace("\"", string.Empty).Trim();
							if (profile_id.Contains(","))
							{
								profile_id = ParseEncodedJson(res11, "profile_id");
							}
							//"gridID":
						}
						catch (Exception ex)
						{
							Console.WriteLine(ex.StackTrace);
						}
						if (string.IsNullOrEmpty(profile_id))
						{
							profile_id = GlobusHttpHelper.getBetween(res11, "profile_id", "}").Replace("\\\"", "").Replace(",", "").Replace(":", "").Trim();
						}
						try
						{
							gridID = res11.Substring(res11.IndexOf("gridID\":"), (res11.IndexOf(",", res11.IndexOf("gridID\":")) - res11.IndexOf("gridID\":"))).Replace("gridID\":", string.Empty).Replace("<dd>", string.Empty).Replace("\\", string.Empty).Replace("\"", string.Empty).Trim();
						}
						catch (Exception ex)
						{
							Console.WriteLine(ex.StackTrace);
						}
						if (string.IsNullOrEmpty(gridID))
						{
							gridID = GlobusHttpHelper.getBetween(res11, "gridID", ",").Replace("\\\"", "").Replace(",", "").Replace(":", "").Trim(); ;
						}


						try
						{
							composer_session_id = res11.Substring(res11.IndexOf("composer_session_id\":"), (res11.IndexOf("}", res11.IndexOf("composer_session_id\":")) - res11.IndexOf("composer_session_id\":"))).Replace("composer_session_id\":", string.Empty).Replace("<dd>", string.Empty).Replace("\\", string.Empty).Replace("\"", string.Empty).Trim();
						}
						catch (Exception ex)
						{
							Console.WriteLine(ex.StackTrace);
						}

						try
						{
							if (string.IsNullOrEmpty(composer_session_id))
							{
								composer_session_id = res11.Substring(res11.IndexOf("composerID\":"), (res11.IndexOf("}", res11.IndexOf("composerID\":")) - res11.IndexOf("composerID\":"))).Replace("composerID\":", string.Empty).Replace("<dd>", string.Empty).Replace("\\", string.Empty).Replace("\"", string.Empty).Trim();

							}
						}
						catch (Exception ex)
						{
							Console.WriteLine(ex.StackTrace);
						}
//.........这里部分代码省略.........
开发者ID:sumitglobussoft,项目名称:pinDominator-3.0,代码行数:101,代码来源:GroupManager.cs

示例4: 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);
            }
        }
开发者ID:ahmetDostr,项目名称:twtboard,代码行数:89,代码来源:frmMain_NewUI.cs

示例5: SignupManual


//.........这里部分代码省略.........
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- ChangeIP_WebClient() --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- ChangeIP_WebClient() >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
            }

            try
            {
                int StartIndex = textUrl.IndexOf("phx-signup-form");
                if (StartIndex > 0)
                {
                    string Start = textUrl.Substring(StartIndex);
                    int EndIndex = Start.IndexOf("name=\"authenticity_token");
                    string End = Start.Substring(0, EndIndex).Replace("phx-signup-form", "").Replace("method=\"POST\"", "").Replace("action=\"https://twitter.com/account/create\"", "");
                    authenticitytoken = End.Replace("class=\"\">", "").Replace("<input type=\"hidden\"", "").Replace("class=\"\">", "").Replace("value=\"", "").Replace("\n", "").Replace("\"", "").Replace(" ", "");
                }
                else
                {
                    Log("[ " + DateTime.Now + " ] => [ Cannot find Authenticity Token On Page ]");
                    nvc.Clear();
                    return nvc;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("2 :" + ex.StackTrace);
                GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> TwitterSignup -  SignupMultiThreaded() -- Getting Authenticity --> " + ex.Message, Globals.Path_AccountCreatorErrorLog);
                GlobusFileHelper.AppendStringToTextfileNewLine("Error --> TwitterSignup -  SignupMultiThreaded() -- Getting Authenticity >>>> " + ex.Message + " || DateTime :- " + DateTime.Now, Globals.Path_TwtErrorLogs);
            }


            string postData_SignUp = "user%5Bname%5D=" + username + "&user%5Bemail%5D=" + Email + "&user%5Buser_password%5D=" + Password + "&context=front&authenticity_token=" + authenticitytoken + "";
            string res_PostSignUp = globusHelper.postFormData(new Uri("https://twitter.com/signup"), postData_SignUp, "", "", "", "", "");

            int tempCount_usernameCheckLoop = 0;
        usernameCheckLoop:
            int tempCount_passwordCheckLoop = 0;

            if (username.Contains(" "))
            {
                username = username.Replace(" ", "_");
            }

            string headr = globusHelper.gResponse.Headers.ToString();
            string Usernamecheck = globusHelper.getHtmlfromUrlIP(new Uri("https://twitter.com/users/username_available?suggest=1&username=" + username + "&full_name=" + name + "&email=&suggest_on_username=true&context=signup"), IPAddress, IPPort, IPUsername, IPpassword, "https://twitter.com/signup", "");

            //if (EmailCheck.Contains("\"taken\":true")
            //    || res_PostSignUp.Contains("You already have an account with this username and password"))
            //{
            //    Log("Email : " + Email + " has already been taken. An email can only be used on one Twitter account at a time");
            //    Created = false;
            //    GlobusFileHelper.AppendStringToTextfileNewLine(emailData.Replace("\0", ""), Globals.path_EmailAlreadyTaken);
            //}
            //else 
            if (Usernamecheck.Contains("Username has already been taken"))
            {
                //Created = false;
                Log("[ " + DateTime.Now + " ] => [ Username : " + username + " has already been taken ]");
                if (username.Count() > 12)
                {
                    username = username.Remove(8); //Removes the extra characters
                }

                if (UsernameType == "String")
                {
开发者ID:prog-moh,项目名称:twtboard,代码行数:67,代码来源:TwitterSignUp.cs

示例6: ProvideYourBirthday

        public void ProvideYourBirthday(ref FacebookUser fbUser, ref string response, ref GlobusHttpHelper HttpHelper)
        {
            try
            {
                GlobusLogHelper.log.Info("Try to solving provide your birthday : " + fbUser.username);
                GlobusLogHelper.log.Debug("Try to solving provide your birthday : " + fbUser.username);

                GetFbdtsgNh(ref fb_dtsg, ref nh, response);
                string postData = "fb_dtsg=" + fb_dtsg + "&nh=" + nh + "&achal=2&submit%5BSubmit%5D=Submit";
                string resSubmit = HttpHelper.postFormData(new Uri(FBGlobals.Instance.AccountVerificationCheckpointNextUrl), postData);                  //"https://www.facebook.com/checkpoint/?next"

                if (string.IsNullOrEmpty(resSubmit))
                {
                    Thread.Sleep(2 * 1000);
                    resSubmit = HttpHelper.postFormData(new Uri(FBGlobals.Instance.AccountVerificationCheckpointNextUrl), postData);
                }

                response = resSubmit;
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
            }
        }
开发者ID:shah8701,项目名称:faceboard,代码行数:24,代码来源:AccountManager.cs

示例7: 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("&amp;", "");

                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&#039;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;
        }
开发者ID:shah8701,项目名称:faceboard,代码行数:69,代码来源:AccountManager.cs

示例8: OkayModified

 private void OkayModified(GlobusHttpHelper HttpHelper, string fb_dtsg, string temp_nh)
 {
     #region Clickon This Is okay
     try
     {
         string postForThisIsOkay = "fb_dtsg=" + fb_dtsg + "&nh=" + temp_nh + "&submit%5BOkay%5D=Okay";
         string ResponseDatapostForThisIsOkay = HttpHelper.postFormData(new Uri(FBGlobals.Instance.AccountVerificationCheckpointNextUrl), postForThisIsOkay, FBGlobals.Instance.AccountVerificationCheckpointUrl);
     }
     catch (Exception ex)
     {
         GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
     }
     #endregion
 }
开发者ID:shah8701,项目名称:faceboard,代码行数:14,代码来源:AccountManager.cs

示例9: GetCaptchaPageSrc

        private static void GetCaptchaPageSrc(GlobusHttpHelper HttpHelper, string tempPostUrl, string temppostdata, ref string tempresponse, ref string captcha_persist_data, ref string captcha_session, ref string extra_challenge_params, ref string challengeurl, ref string captchaText)
        {
            try
            {
                tempresponse = HttpHelper.postFormData(new Uri(tempPostUrl), temppostdata, FBGlobals.Instance.AccountVerificationCheckpointUrl);

                string[] captchpersist = Regex.Split(tempresponse, "id=\"captcha_persist_data");
                string captchaimageurl = string.Empty;
                captcha_persist_data = string.Empty;
                captcha_session = "";
                extra_challenge_params = "";
                challengeurl = "";
                captchaText = "";

                if (tempresponse.Contains("captcha_persist_data"))
                {
                    try
                    {
                        string[] facebookcaptcha_persistdata = Regex.Split(tempresponse, "id=\"captcha_persist_data");
                        captcha_persist_data = facebookcaptcha_persistdata[1].Substring(facebookcaptcha_persistdata[1].IndexOf("value="), (facebookcaptcha_persistdata[1].IndexOf(">", facebookcaptcha_persistdata[1].IndexOf("value=")) - facebookcaptcha_persistdata[1].IndexOf("value="))).Replace("value=", string.Empty).Trim().Replace("\\", string.Empty).Replace("\"", string.Empty).Replace("/", string.Empty).Trim();

                    }
                    catch (Exception ex)
                    {
                        GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
                    }
                }
                if (tempresponse.Contains("captcha_session"))
                {
                    try
                    {
                        string captcha_session_val = tempresponse.Substring(tempresponse.IndexOf("captcha_session"), 200);
                        string[] Arr_captcha_session_val = captcha_session_val.Split('"');
                        captcha_session = Arr_captcha_session_val[4];
                    }
                    catch (Exception ex)
                    {
                        GlobusLogHelper.log.Error("Error : " + ex.StackTrace);

                    }
                }
                if (tempresponse.Contains("extra_challenge_params"))
                {
                    try
                    {
                        string extra_challenge_params_val = tempresponse.Substring(tempresponse.IndexOf("extra_challenge_params"), 500);
                        string[] Arr_extra_challenge_params_val = extra_challenge_params_val.Split('"');
                        string 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("&amp;", "%26");
                    }
                    catch (Exception ex)
                    {
                        GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
                    }
                }
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error("Error : " + ex.StackTrace);

            }
        }
开发者ID:shah8701,项目名称:faceboard,代码行数:64,代码来源:AccountManager.cs

示例10: BirthdaySolving

        private bool BirthdaySolving(ref FacebookUser fbUser, ref GlobusHttpHelper HttpHelper, ref string birthdayResponse)
        {
            try
            {
                string captchaimageurl = string.Empty;
                string captcha_persist_data = string.Empty;
                string googlecaptcha = string.Empty;
                string captcha_session = "";
                string extra_challenge_params = "";
                string fb_dtsg = "";

                fb_dtsg = GlobusHttpHelper.Get_fb_dtsg(birthdayResponse);
                fb_dtsg = Uri.EscapeDataString(fb_dtsg);

                string temp_nh = birthdayResponse.Substring(birthdayResponse.IndexOf("name=\"nh\" value="), (birthdayResponse.IndexOf(">", birthdayResponse.IndexOf("name=\"nh\" value=")) - birthdayResponse.IndexOf("name=\"nh\" value="))).Replace("name=\"nh\" value=", string.Empty).Trim().Replace("\\", string.Empty).Replace("\"", string.Empty).Replace("/", string.Empty).Trim();
                if (birthdayResponse.Contains("captcha_persist_data"))
                {
                    try
                    {
                        string[] facebookcaptcha_persistdata = Regex.Split(birthdayResponse, "id=\"captcha_persist_data");
                        captcha_persist_data = facebookcaptcha_persistdata[1].Substring(facebookcaptcha_persistdata[1].IndexOf("value="), (facebookcaptcha_persistdata[1].IndexOf(">", facebookcaptcha_persistdata[1].IndexOf("value=")) - facebookcaptcha_persistdata[1].IndexOf("value="))).Replace("value=", string.Empty).Trim().Replace("\\", string.Empty).Replace("\"", string.Empty).Replace("/", string.Empty).Trim();
                    }
                    catch (Exception ex)
                    {
                        GlobusLogHelper.log.Error("Error : " + ex.StackTrace);

                    }
                }

                if (birthdayResponse.Contains(" please enter your birthday"))
                {
                    try
                    {
                        string[] BirthArr = Regex.Split(fbUser.dateOfBirth, "-");
                        string temp_month = string.Empty;
                        string temp_date = string.Empty;
                        string temp_year = string.Empty;
                        if (BirthArr.Count() > 1)
                        {
                            temp_month = BirthArr[0];
                            temp_date = BirthArr[1];
                            temp_year = BirthArr[2];
                        }
                        string achal = string.Empty;
                        try
                        {
                            string[] achalArr = Regex.Split(birthdayResponse, "name=\"achal\"");
                            achal = achalArr[1].Substring(achalArr[1].IndexOf("value="), (achalArr[1].IndexOf(">", achalArr[1].IndexOf("value=")) - achalArr[1].IndexOf("value="))).Replace("value=", string.Empty).Trim().Replace(")", string.Empty).Replace("(", string.Empty).Replace("&amp", string.Empty).Replace("\"", string.Empty).Replace("/", string.Empty).Replace(";", string.Empty).Trim();
                            if (string.IsNullOrEmpty(achal))
                            {
                                achal = "2";
                            }
                        }
                        catch (Exception ex)
                        {
                            GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
                        }

                        try
                        {
                            string PostDataAfterenterdateofBirth = "fb_dtsg=" + fb_dtsg + "&nh=" + temp_nh + "&geo=true&birthday_captcha_month=" + temp_month + "&birthday_captcha_day=" + temp_date + "&birthday_captcha_year=" + temp_year + "&captcha_persist_data=" + captcha_persist_data + "&achal=2&submit%5BSubmit%5D=Submit";
                            string ResponseDataAfterenterdateofBirth = HttpHelper.postFormData(new Uri(FBGlobals.Instance.AccountVerificationCheckpointUrl), PostDataAfterenterdateofBirth, FBGlobals.Instance.AccountVerificationCheckpointUrl);

                            if (ResponseDataAfterenterdateofBirth.Contains("You took too much time to complete the security challenge"))
                            {

                                GlobusLogHelper.log.Info("You took too much time to complete the security challenge : " + fbUser.username);
                                GlobusLogHelper.log.Debug("You took too much time to complete the security challenge : " + fbUser.username);

                                return false;

                            }

                            if (ResponseDataAfterenterdateofBirth.Contains("Create a New Password") || ResponseDataAfterenterdateofBirth.Contains("please select a new password"))
                            {
                                string NewPassword = fbUser.password + "123";
                                string postDataForCreateNewPassword = "fb_dtsg=" + fb_dtsg + "&nh=" + temp_nh + "&new_pass=" + NewPassword + "&confirm_pass=" + NewPassword + "&submit%5BSubmit%5D=Submit";
                                string ResponseForCreateNewPassword = HttpHelper.postFormData(new Uri(FBGlobals.Instance.AccountVerificationCheckpointUrl), postDataForCreateNewPassword, FBGlobals.Instance.AccountVerificationCheckpointUrl);
                                if (ResponseForCreateNewPassword.Contains("www.facebook.com/welcomeback") || ResponseForCreateNewPassword.Contains("sk=welcome") || ResponseForCreateNewPassword.Contains("Redirecting.."))
                                {
                                    GlobusFileHelper.AppendStringToTextfileNewLine(fbUser.username + ":" + fbUser.password + ":" + fbUser.proxyip + ":" + fbUser.proxyport + ":" + fbUser.proxyusername + ":" + fbUser.password, exportFilePathAccountVerification + "\\SecuritySolvedChangePassword.txt");
                                    GlobusFileHelper.AppendStringToTextfileNewLine(fbUser.username + ":" + fbUser.password + ":" + fbUser.proxyip + ":" + fbUser.proxyport + ":" + fbUser.proxyusername + ":" + fbUser.password, exportFilePathAccountVerification + "\\SecuritySolved.txt");

                                    GlobusLogHelper.log.Info("Your Username : " + fbUser.username + " Entered New Password : " + NewPassword);
                                    GlobusLogHelper.log.Debug("Your Username : " + fbUser.username + " Entered New Password : " + NewPassword);


                                    return true;
                                }
                                else
                                {
                                    GlobusFileHelper.AppendStringToTextfileNewLine(fbUser.username + ":" + fbUser.password + ":" + fbUser.proxyip + ":" + fbUser.proxyport + ":" + fbUser.proxyusername + ":" + fbUser.password, exportFilePathAccountVerification + "\\SecuritynotSolved.txt");

                                    GlobusLogHelper.log.Info("Your Username : " + fbUser.username + " Entered New Password : " + NewPassword);
                                    GlobusLogHelper.log.Debug("Your Username : " + fbUser.username + " Entered New Password : " + NewPassword);

                                    //  return true;
                                }
                            }
                            else
//.........这里部分代码省略.........
开发者ID:shah8701,项目名称:faceboard,代码行数:101,代码来源:AccountManager.cs

示例11: Skip

        private static void Skip(GlobusHttpHelper HttpHelper, string fb_dtsg, string temp_nh)
        {
            try
            {
                string postForSkip = "fb_dtsg=" + fb_dtsg + "&nh=" + temp_nh + "&submit%5BSkip%5D=Skip";
                string ResponseDatapostForSkip = HttpHelper.postFormData(new Uri(FBGlobals.Instance.AccountVerificationCheckpointUrl), postForSkip, FBGlobals.Instance.AccountVerificationCheckpointUrl);
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error("Error : " + ex.StackTrace);

            }
        }
开发者ID:shah8701,项目名称:faceboard,代码行数:13,代码来源:AccountManager.cs

示例12: Okay

        private void Okay(ref FacebookUser fbUser, GlobusHttpHelper HttpHelper, string fb_dtsg, string temp_nh)
        {
            #region Clickon This Is okay
            try
            {
                string postForThisIsOkay = "fb_dtsg=" + fb_dtsg + "&nh=" + temp_nh + "&submit%5BThis+is+Okay%5D=This+is+Okay";
                string ResponseDatapostForThisIsOkay = HttpHelper.postFormData(new Uri(FBGlobals.Instance.AccountVerificationCheckpointUrl), postForThisIsOkay, FBGlobals.Instance.AccountVerificationCheckpointUrl);
                if (ResponseDatapostForThisIsOkay.Contains("Create a New Password"))
                {
                    string NewPassword = fbUser.password + "123";
                    string postDataForCreateNewPassword = "fb_dtsg=" + fb_dtsg + "&nh=" + temp_nh + "&new_pass=" + NewPassword + "&confirm_pass=" + NewPassword + "&submit%5BSubmit%5D=Submit";
                    string ResponseForCreateNewPassword = HttpHelper.postFormData(new Uri(FBGlobals.Instance.AccountVerificationCheckpointUrl), postDataForCreateNewPassword, FBGlobals.Instance.AccountVerificationCheckpointUrl);
                    if (ResponseForCreateNewPassword.Contains("www.facebook.com/welcomeback") || ResponseForCreateNewPassword.Contains("sk=welcome") || ResponseForCreateNewPassword.Contains("Redirecting.."))
                    {
                        GlobusFileHelper.AppendStringToTextfileNewLine(fbUser.username + ":" + fbUser.password + ":" + fbUser.proxyip + ":" + fbUser.proxyport + ":" + fbUser.proxyusername + ":" + fbUser.password, exportFilePathAccountVerification + "\\SecuritySolved.txt");
                        GlobusLogHelper.log.Info("Your Username : " + fbUser.username + " Entered New Password : " + NewPassword);
                        GlobusLogHelper.log.Debug("Your Username : " + fbUser.username + " Entered New Password : " + NewPassword);

                        // return true;
                    }
                    else
                    {

                    }
                }
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
            }
            #endregion
        }
开发者ID:shah8701,项目名称:faceboard,代码行数:32,代码来源:AccountManager.cs

示例13: Continue

 private static string Continue(GlobusHttpHelper HttpHelper, string fb_dtsg, string temp_nh)
 {
     #region Click on Continue
     try
     {
         try
         {
             string postforshare = "fb_dtsg=" + fb_dtsg + "&nh=" + temp_nh + "&submit%5BContinue%5D=Continue";
             string ResponseDatapostforshare = HttpHelper.postFormData(new Uri(FBGlobals.Instance.AccountVerificationCheckpointUrl), postforshare, FBGlobals.Instance.AccountVerificationCheckpointUrl);             //"https://www.facebook.com/checkpoint/"
             return ResponseDatapostforshare;
         }
         catch (Exception ex)
         {
             GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
         }
     }
     catch (Exception ex)
     {
         GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
     }
     return string.Empty;
     #endregion
 }
开发者ID:shah8701,项目名称:faceboard,代码行数:23,代码来源:AccountManager.cs

示例14: EntercaptchaForTemporarilyLockedAccount

        private bool EntercaptchaForTemporarilyLockedAccount(ref FacebookUser fbUser, ref GlobusHttpHelper HttpHelper)
        {
            string googlecaptcha = string.Empty;
            string fb_dtsg = "";
            string strPageSource = HttpHelper.getHtmlfromUrl(new Uri(FBGlobals.Instance.AccountVerificationCheckpointUrl));                                       //"https://www.facebook.com/checkpoint/"
            fb_dtsg = GlobusHttpHelper.Get_fb_dtsg(strPageSource);
            fb_dtsg = Uri.EscapeDataString(fb_dtsg);
            string temp_nh = strPageSource.Substring(strPageSource.IndexOf("name=\"nh\" value="), (strPageSource.IndexOf(">", strPageSource.IndexOf("name=\"nh\" value=")) - strPageSource.IndexOf("name=\"nh\" value="))).Replace("name=\"nh\" value=", string.Empty).Trim().Replace("\\", string.Empty).Replace("\"", string.Empty).Replace("/", string.Empty).Trim();
            string tempPostUrl = FBGlobals.Instance.AccountVerificationCheckpointUrl;                                                                                  //"https://www.facebook.com/checkpoint/";

            string temppostdata = "fb_dtsg=" + fb_dtsg + "&nh=" + temp_nh + "&submit%5BContinue%5D=Continue";

            string tempresponse = HttpHelper.postFormData(new Uri(tempPostUrl), temppostdata, FBGlobals.Instance.AccountVerificationCheckpointUrl);                     //"https://www.facebook.com/checkpoint/
            string[] captchpersist = Regex.Split(tempresponse, "id=\"captcha_persist_data");
            string captchaimageurl = string.Empty;
            string captcha_persist_data = string.Empty;
            string captcha_session = "";
            string extra_challenge_params = "";
            string challengeurl = "";
            string captchaText = "";
            if (tempresponse.Contains("captcha_persist_data"))
            {
                try
                {

                    string[] facebookcaptcha_persistdata = Regex.Split(tempresponse, "id=\"captcha_persist_data");
                    captcha_persist_data = facebookcaptcha_persistdata[1].Substring(facebookcaptcha_persistdata[1].IndexOf("value="), (facebookcaptcha_persistdata[1].IndexOf(">", facebookcaptcha_persistdata[1].IndexOf("value=")) - facebookcaptcha_persistdata[1].IndexOf("value="))).Replace("value=", string.Empty).Trim().Replace("\\", string.Empty).Replace("\"", string.Empty).Replace("/", string.Empty).Trim();

                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.StackTrace);
                }
            }
            if (tempresponse.Contains("captcha_session"))
            {
                try
                {
                    string captcha_session_val = tempresponse.Substring(tempresponse.IndexOf("captcha_session"), 200);
                    string[] Arr_captcha_session_val = captcha_session_val.Split('"');
                    captcha_session = Arr_captcha_session_val[4];
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.StackTrace);
                }
            }
            if (tempresponse.Contains("extra_challenge_params"))
            {
                try
                {
                    string extra_challenge_params_val = tempresponse.Substring(tempresponse.IndexOf("extra_challenge_params"), 500);
                    string[] Arr_extra_challenge_params_val = extra_challenge_params_val.Split('"');
                    string 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("&amp;", "%26");
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.StackTrace);
                }
            }
            string tempcaptchresponse1 = string.Empty;
            if (tempresponse.Contains("{create_captcha"))
            {
                try
                {
                    string k = tempresponse.Substring(tempresponse.IndexOf("{create_captcha"), (tempresponse.IndexOf("}", tempresponse.IndexOf("{create_captcha")) - tempresponse.IndexOf("{create_captcha"))).Replace("{create_captcha", string.Empty).Trim().Replace(")", string.Empty).Replace("(", string.Empty).Replace("}", string.Empty).Replace("\"", string.Empty).Replace(";", string.Empty).Trim();
                    string authp = tempresponse.Substring(tempresponse.IndexOf("authp="), (tempresponse.IndexOf(";", tempresponse.IndexOf("authp=")) - tempresponse.IndexOf("authp="))).Replace("authp=", string.Empty).Trim().Replace(")", string.Empty).Replace("(", string.Empty).Replace("&amp", string.Empty).Replace("\"", string.Empty).Replace(";", string.Empty).Trim();
                    string nonce = tempresponse.Substring(tempresponse.IndexOf("nonce="), (tempresponse.IndexOf(";", tempresponse.IndexOf("nonce=")) - tempresponse.IndexOf("nonce="))).Replace("nonce=", string.Empty).Trim().Replace(")", string.Empty).Replace("(", string.Empty).Replace("&amp", string.Empty).Replace("\"", string.Empty).Replace(";", string.Empty).Trim();
                    string psig = tempresponse.Substring(tempresponse.IndexOf("psig="), (tempresponse.IndexOf(";", tempresponse.IndexOf("psig=")) - tempresponse.IndexOf("psig="))).Replace("psig=", string.Empty).Trim().Replace(")", string.Empty).Replace("(", string.Empty).Replace("&amp", string.Empty).Replace("\"", string.Empty).Replace(";", string.Empty).Trim();
                    string tt = tempresponse.Substring(tempresponse.IndexOf("tt="), (tempresponse.IndexOf(";", tempresponse.IndexOf("tt=")) - tempresponse.IndexOf("tt="))).Replace("tt=", string.Empty).Trim().Replace(")", string.Empty).Replace("(", string.Empty).Replace("&amp", string.Empty).Replace("\"", string.Empty).Replace(";", string.Empty).Trim();
                    string time = tempresponse.Substring(tempresponse.IndexOf("time="), (tempresponse.IndexOf(";", tempresponse.IndexOf("time=")) - tempresponse.IndexOf("time="))).Replace("time=", string.Empty).Trim().Replace(")", string.Empty).Replace("(", string.Empty).Replace("&amp", string.Empty).Replace("\"", string.Empty).Replace(";", string.Empty).Trim();
                    string googleimageurl = HttpHelper.getHtmlfromUrl(new Uri(FBGlobals.Instance.AccountVerificationRecaptchaApiChallengeUrl + k + "&ajax=1&xcachestop=0.37163324314553736&authp=" + authp + "&psig=" + psig + "&nonce=" + nonce + "&tt=" + tt + "&time=" + time + "&new_audio_default=1"));  //"https://www.google.com/recaptcha/api/challenge?k="
                    if (googleimageurl.Contains("challenge"))
                    {
                        challengeurl = googleimageurl.Substring(googleimageurl.IndexOf("challenge :"), (googleimageurl.IndexOf(",", googleimageurl.IndexOf("challenge :")) - googleimageurl.IndexOf("challenge :"))).Replace("challenge :", string.Empty).Trim().Replace(")", string.Empty).Replace("'", string.Empty).Replace("&amp", string.Empty).Replace("\"", string.Empty).Replace(";", string.Empty).Trim();
                        googlecaptcha = FBGlobals.Instance.AccountVerificationRecaptchaApiImageUrl + challengeurl;                       //"https://www.google.com/recaptcha/api/image?c="

                        System.Net.WebClient webclient = new System.Net.WebClient();
                        byte[] args = webclient.DownloadData(googlecaptcha);

                        string[] arr1 = new string[3] { FBGlobals.dbcUserName, FBGlobals.dbcPassword, "" };
                        captchaText = DecodeDBC(arr1, args);
                        if (!string.IsNullOrEmpty(captchaText))
                        {
                            string postdataforgoogle = "fb_dtsg=" + fb_dtsg + "&nh=" + temp_nh + "&geo=true&captcha_persist_data=" + captcha_persist_data + "&captcha_session=" + captcha_session + "&extra_challenge_params=" + extra_challenge_params + "%3D1&recaptcha_type=password&recaptcha_challenge_field=" + challengeurl + "&captcha_response=" + captchaText + "&achal=1&submit%5BSubmit%5D=Submit";
                            tempcaptchresponse1 = HttpHelper.postFormData(new Uri(tempPostUrl), postdataforgoogle, FBGlobals.Instance.AccountVerificationCheckpointUrl);   //"https://www.facebook.com/checkpoint/"
                            if (tempcaptchresponse1.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") || tempcaptchresponse1.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"))
                            {
                                try
                                {
                                    GlobusLogHelper.log.Info("Your Username : " + fbUser.username + " Need Photo for Identification");
                                    GlobusLogHelper.log.Debug("Your Username : " + fbUser.username + " Need Photo for Identification");

                                    return true;
                                }
                                catch (Exception ex)
                                {
//.........这里部分代码省略.........
开发者ID:shah8701,项目名称:faceboard,代码行数:101,代码来源:AccountManager.cs

示例15: SendInvitation

        private void SendInvitation(ref GlobusHttpHelper httpHelper, string pageSource, string key1, string authToken1, string goback1, string firstName_Guest1, string lastName_Guest1)
        {
            try
            {
                Log("[ " + DateTime.Now + " ] => [ Start Sending Invitation With Username >>> " + _UserName + " ]");

                string reason = string.Empty;
                string existingPositionIC = string.Empty;
                string greeting = string.Empty;
                string key = string.Empty;
                string firstName_Guest = string.Empty;
                string lastName_Guest = string.Empty;
                string authToken = string.Empty;
                string subject = string.Empty;
                string defaultText = string.Empty;
                string csrfToken = string.Empty;
                string sourceAlias = string.Empty;
                string goback = string.Empty;
                string userName = string.Empty;
                string userFirstName = string.Empty;
                string userLastName = string.Empty;
                string resultForUserDetails = FindTheUserName(pageSource);

                try
                {
                    resultForUserDetails = resultForUserDetails.Substring(resultForUserDetails.IndexOf("alt="), resultForUserDetails.IndexOf("height") - resultForUserDetails.IndexOf("alt=")).Replace("alt=", string.Empty).Replace("/", string.Empty).Trim();
                    userFirstName = resultForUserDetails.Split(' ')[0].Replace("\"", string.Empty).Replace(",", string.Empty);
                    userLastName = resultForUserDetails.Split(' ')[1].Replace("\"", string.Empty).Replace(",", string.Empty);
                }
                catch { }

                firstName_Guest = GetValue(pageSource, "firstName");

                if (string.IsNullOrEmpty(firstName_Guest))
                {
                    firstName_Guest = firstName_Guest1;
                }

                lastName_Guest = GetValue(pageSource, "lastName");

                if (string.IsNullOrEmpty(lastName_Guest))
                {
                    lastName_Guest = lastName_Guest1;
                }

                reason = GetValue(pageSource, "reason");

                existingPositionIC = GetValue(pageSource, "existingPositionIC");
                firstName_Guest = firstName_Guest.Replace("&quot;", "\"");

                greeting = PersonalNote.Replace("<FIRSTNAME>", firstName_Guest).Replace("<PROFILEFIRSTNAME>", userFirstName).Trim();
                ClsInviteMemberThroughProfileURL.Listgreetmsg = SpinnedListGenerator.GetSpinnedList(new List<string> { greeting });
                string messagebody = string.Empty;
                messagebody = greeting;

                if (spintaxsearch)
                {
                    try
                    {
                        messagebody = Listgreetmsg[RandomNumberGenerator.GenerateRandom(0, Listgreetmsg.Count - 1)];
                    }
                    catch
                    { }

                }

                key = GetValue(pageSource, "key");

                if (string.IsNullOrEmpty(key))
                {
                    key = key1;
                }

                authToken = GetValue(pageSource, "authToken");

                if (string.IsNullOrEmpty(authToken))
                {
                    authToken = authToken1;
                }

                subject = GetValue(pageSource, "subject");

                defaultText = GetValue(pageSource, "defaultText");

                csrfToken = GetValue(pageSource, "csrfToken");

                sourceAlias = GetValue(pageSource, "sourceAlias");

                goback = GetValue(pageSource, "goback").Replace("/", "%2F");

                if (string.IsNullOrEmpty(goback))
                {
                    goback = goback1;
                }

                string postData = "existingPositionIC=&companyName.0=&titleIC.0=&startYearIC.0=&endYearIC.0=&schoolText=&schoolID=&existingPositionIB=&companyName.1=&titleIB.0=&startYearIB.0=&endYearIB.0=&reason=IF&otherEmail=&greeting=" + Uri.EscapeDataString(messagebody) + "&iweReconnectSubmit=Send+Invitation&key=" + key + "&firstName=" + firstName_Guest + "&lastName=" + lastName_Guest + "&authToken=" + authToken + "&authType=name&trk=prof-0-sb-connect-button&iweLimitReached=false&companyID.0=&companyID.1=&schoolID=&schoolcountryCode=&schoolprovinceCode=&javascriptEnabled=false&existingAssociation=Job+Openings%2C+Job+Leads+and+Job+Connections%21&subject=" + subject + "&defaultText=" + defaultText + "&csrfToken=" + csrfToken + "&sourceAlias=" + sourceAlias + "&goback=" + goback + "";
                string postResponse = httpHelper.postFormData(new Uri("http://www.linkedin.com/people/iweReconnectAction"), postData);

                if (postResponse.Contains("Invitation to") || postResponse.Contains("invitación a"))
                {
//.........这里部分代码省略.........
开发者ID:brentscheidt,项目名称:inboard,代码行数:101,代码来源:ClsInviteMemberThroughProfileURL.cs


注:本文中的GlobusHttpHelper.postFormData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。