private bool AliyunAutoLoin(string nameNormal, string pwdNormal) { HttpManager.Instance.InitWebClient(hi, true, 30, 30); var timeSpan = DateTime.Now - Settings.LastLoginTime; if (timeSpan.TotalSeconds < 5)//没限制 15秒没取到数据 { return(false); } geetestHelper = new PassGeetestHelper(); if (string.IsNullOrEmpty(nameNormal) || string.IsNullOrEmpty(pwdNormal)) { return(false); } var validUrl = ""; var postFormat = ""; bool result = false; hi.Url = "http://101.200.187.122:9600/passali/fuckali.oko?uid=01161add5a3c4c55bd9c133baa9effd0&data=QNYX|login|http://www.qichacha.com/user_login"; hi.Refer = "http://www.qichacha.com/user_login"; var ho = HttpManager.Instance.ProcessRequest(hi); // this.textBox4.Text = passResult.LastPoint; //this.webBrowser.Refresh(); if (ho.IsOK) { //var _url = ho.TxtData; // var _result= GetHttpHtml(new UrlInfo(_url), "http://www.qichacha.com/user_login"); //if (_result.StatusCode==HttpStatusCode.OK) { //csessionid var csessionid_one = Toolslib.Str.Sub(ho.TxtData, "csessionid\":\"", "\""); var sig_one = Toolslib.Str.Sub(ho.TxtData, "value\":\"", "\""); var endIndex = ho.TxtData.IndexOf("|"); if (endIndex == -1) { return(false); } var token_one = ho.TxtData.Substring(0, endIndex); // hi.Dispose(); //HttpManager.Instance.InitWebClient(hi, true, 30, 30); // hi = new HttpInput(); hi.Url = "http://www.qichacha.com/user_loginaction"; hi.Refer = "http://www.qichacha.com/user_login"; // hi.PostData = string.Format("nameNormal={0}&pwdNormal={1}&geetest_challenge={2}&geetest_validate={3}&geetest_seccode={3}%7Cjordan", nameNormal, pwdNormal, passResult.Challenge, passResult.ValidCode); hi.PostData = string.Format("nameNormal={0}&pwdNormal={1}&csessionid_one={2}&sig_one={3}&token_one={4}&scene_one=login", nameNormal, pwdNormal, csessionid_one, sig_one, token_one); //ho = HttpManager.Instance.ProcessRequest(hi); var tempResult = GetPostData(new UrlInfo(hi.Url) { PostData = hi.PostData }, hi.Refer, false); if (tempResult.StatusCode == HttpStatusCode.OK) { if (tempResult.Html.Contains("true")) { Settings.SimulateCookies = tempResult.Cookie; ShowMessageInfo("过验证码模拟登陆成功"); Settings.LastLoginTime = DateTime.Now; return(true); } } } } return(false); }