public bool InputWeb(string pID, string pW, ref string pHint) { bool flag = false; string webVerifyCode = this.GetWebVerifyCode(AutoBetsWindow.VerifyCodeFile); if (webVerifyCode != "") { string loginLine = this.GetLoginLine(); string pUrl = this.GetLoginLine(); string pResponsetext = ""; string jScript = HttpUtility.UrlEncode(CommFunc.WebMD51(CommFunc.WebMD51(CommFunc.WebMD51(pID + pW)))); jScript = VerifyCodeAPI.GetJScript($"qqtjm('{jScript}')", base.PTID); string pData = $"_token={base.Token}&_random={base.Random}&username={pID}&password={jScript}&captcha={webVerifyCode}"; HttpHelper.GetResponse(ref pResponsetext, pUrl, "POST", pData, loginLine, 0x2710, "UTF-8", true); flag = pResponsetext.Contains("游戏记录"); if (!flag) { pHint = CommFunc.GetIndexString(pResponsetext, "<div class=\"error \">", "</div>", 0).Replace("\r\n", "").Trim(); if (pHint.Contains("验证码")) { pHint = ""; return(this.InputWeb(pID, pW, ref pHint)); } } } return(flag); }
public bool InputWeb(string pID, string pW, ref string pHint) { bool flag = false; string loginLine = this.GetLoginLine(); string pUrl = this.GetLine() + "/acct/login/dologin.json"; string pResponsetext = ""; string jScript = DateTime.Now.ToOADate().ToString(); jScript = VerifyCodeAPI.GetJScript($"encryptSha('{jScript}')", base.PTID); string str6 = HttpUtility.UrlEncode(pW); string pData = $"flag=login&username={pID}&loginpass={str6}&validcode=&validc={""}&Submit=json"; HttpHelper.GetResponse(ref pResponsetext, pUrl, "POST", pData, loginLine, 0x2710, "UTF-8", true); flag = pResponsetext.Contains("\"sError\":0"); if (!flag) { pHint = CommFunc.UniconToString(CommFunc.GetIndexString(pResponsetext, "\"sMsg\":\"", "\"", 0).Replace(",", "")); if (pHint.Contains("验证码")) { pHint = ""; return(this.InputWeb(pID, pW, ref pHint)); } } return(flag); }
private string GetEncode(string pSource, bool pIsChange = false) { string pText = pSource; if (pIsChange) { pText = pText.Replace("(", "{").Replace(")", "}"); } pText = VerifyCodeAPI.GetJScript("zip_deflate", pText, base.PTID); pText = HttpUtility.UrlEncode(VerifyCodeAPI.GetJScript("base64_encode", pText, base.PTID)); return("zipinfo=" + pText); }