예제 #1
0
        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);
        }
예제 #2
0
 public override void GetSite(ConfigurationStatus.LotteryType pType, string playName = "")
 {
     try
     {
         if (base.Token == "")
         {
             string cookieInternal = HttpHelper.GetCookieInternal(this.GetUrlLine());
             base.Token = CommFunc.GetIndexString(cookieInternal, "store.body.appstorage.token=", ";", 0);
         }
         string pUrl          = this.GetLine() + "/ticket/ticketmod/ticketinfo.json";
         string indexLine     = this.GetIndexLine();
         string pResponsetext = "";
         string pData         = $"token={base.Token}&ticketId={this.GetBetsLotteryID(pType)}";
         HttpHelper.GetResponse(ref pResponsetext, pUrl, "POST", pData, indexLine, 0x2710, "UTF-8", true);
         if (pResponsetext != "")
         {
             string pExpect = CommFunc.GetIndexString(pResponsetext, "\"planId\":\"", "\"", 0);
             switch (CommFunc.GetLotteryID(pType))
             {
             case "XJSSC":
             case "SD11X5":
             case "GD11X5":
             case "JX11X5":
                 pExpect = pExpect.Replace("-", "-0");
                 break;
             }
             base.Expect = CommFunc.ConvertExpect(pExpect, pType);
         }
     }
     catch
     {
     }
 }
예제 #3
0
        public bool LoginWeb()
        {
            string cookieInternal = HttpHelper.GetCookieInternal(this.GetUrlLine());

            AppInfo.PTInfo.WebCookie = cookieInternal;
            HttpHelper.SaveCookies(cookieInternal, "");
            return(true);
        }