public bool LoginWeb() { bool flag; if (base.IsLoadWebLogin) { flag = false; string cookieInternal = HttpHelper.GetCookieInternal(this.GetUrlLine()); if ((cookieInternal == "") || (AppInfo.PTInfo == null)) { return(flag); } AppInfo.PTInfo.WebCookie = cookieInternal; HttpHelper.SaveCookies(cookieInternal, ""); return(true); } string loginLine = this.GetLoginLine(); string pUrl = this.GetLoginLine(); string pResponsetext = ""; HttpHelper.GetResponse(ref pResponsetext, pUrl, "GET", string.Empty, loginLine, base.BetsTime2, "UTF-8", true); flag = pResponsetext.Contains("请输入用户名"); if (flag) { base.Token = CommFunc.GetIndexString(pResponsetext, "value=\"", "\"", pResponsetext.IndexOf("__RequestVerificationToken")); } return(flag); }
public bool InputWeb(string pID, string pW, ref string pHint) { bool flag = false; string loginLine = this.GetLoginLine(); string pUrl = this.GetLine() + "/Main-Index.fcgi"; string pResponsetext = ""; string str4 = HttpUtility.UrlEncode(pW); string pData = $"Mobile_Login=O&UserName={pID}&PassWord={str4}"; HttpHelper.GetResponse4(ref pResponsetext, pUrl, "POST", pData, loginLine, 0x2710, "UTF-8", true); flag = pResponsetext.Contains("\"state\": true"); if (!flag) { pHint = CommFunc.GetIndexString(pResponsetext, "\"data\":\"", "\"", 0); if (pHint.Contains("code")) { pHint = ""; return(this.InputWeb(pID, pW, ref pHint)); } if (pHint.Contains("UserName")) { pHint = "用户名或者密码错误"; } return(flag); } HttpHelper.SaveCookies(HttpHelper.WebCookie, this.GetHostLine()); return(flag); }
public bool LoginWeb() { string cookieInternal = HttpHelper.GetCookieInternal(this.GetUrlLine()); AppInfo.PTInfo.WebCookie = cookieInternal; HttpHelper.SaveCookies(cookieInternal, ""); return(true); }
public override bool VRWebLoginMain(ConfigurationStatus.LotteryType pType) { if (this.CheckLotteryIsVR(pType) && !base.IsLoginVR) { string pVRData = ""; if (!this.GetVRData(pType, ref pVRData)) { return(false); } HttpHelper.SaveCookies(HttpHelper.GetHttpHelperCookieString(this.GetUrlLine(), null), this.GetVRHostLine()); base.IsLoginVR = true; } return(true); }
public bool LoginWeb() { string pReferer = ""; string loginLine = this.GetLoginLine(); string pResponsetext = ""; HttpHelper.GetResponse6(ref pResponsetext, loginLine, "GET", string.Empty, pReferer, 0x2710, "UTF-8", true); if (pResponsetext == "") { Uri pUrl = new Uri(loginLine.Replace("http://", "http://www.")); string httpHelperCookieString = HttpHelper.GetHttpHelperCookieString(pUrl, null); HttpHelper.GetAllCookies(HttpHelper.CookieContainers); HttpHelper.SaveCookies(httpHelperCookieString, loginLine.Replace("http://", "")); return(this.LoginWeb()); } return(pResponsetext.Contains("杏彩娱乐")); }
public bool InputWeb(string pID, string pW, ref string pHint) { bool flag = false; string loginLine = this.GetLoginLine(); string pUrl = this.GetLoginLine(); string pResponsetext = ""; string str4 = HttpUtility.UrlEncode(pW); string pData = string.Format("forward=&dosubmit=1&hashcode={2}&username={0}&password={1}&code=", pID, str4, base.Token); HttpHelper.GetResponse(ref pResponsetext, pUrl, "POST", pData, loginLine, 0x2710, "UTF-8", true); flag = pResponsetext.Contains("登录成功"); if (!flag) { pHint = CommFunc.GetIndexString(pResponsetext, "span class=\"title-status title-status-fail\">", "<", 0); return(flag); } string httpHelperCookieString = HttpHelper.GetHttpHelperCookieString(new Uri(this.GetLoginLine()), null); AppInfo.PTInfo.WebCookie = httpHelperCookieString; HttpHelper.SaveCookies(httpHelperCookieString, ""); return(flag); }