Пример #1
0
        public override string GetWebVerifyCode(string pVerifyCodeFile)
        {
            string pVerifyCode = "";

            try
            {
                string str2 = $"/images/set_check_code/?session_name=user_login&type=4&rand={DateTime.Now.ToString()}";
                string pUrl = this.GetLine() + str2;
                File.Delete(pVerifyCodeFile);
                Bitmap bitmap = new Bitmap(HttpHelper.GetResponseImage(pUrl, "", "GET", "", 0x1770, "UTF-8", true));
                bitmap.Save(pVerifyCodeFile);
                bitmap.Dispose();
                while (!File.Exists(pVerifyCodeFile))
                {
                    Thread.Sleep(500);
                }
                pVerifyCode = VerifyCodeAPI.VerifyCodeMain(base.PTID, pVerifyCodeFile);
                if (!this.CheckVerifyCode(pVerifyCode))
                {
                    return(this.GetWebVerifyCode(pVerifyCodeFile));
                }
            }
            catch
            {
            }
            return(pVerifyCode);
        }
Пример #2
0
        public override string GetWebVerifyCode(string pVerifyCodeFile)
        {
            string pVerifyCode = "";

            try
            {
                string str2 = $"/captcha/default?{DateTime.Now.ToOADate()}";
                string pUrl = this.GetLine() + str2;
                File.Delete(pVerifyCodeFile);
                Bitmap bitmap = new Bitmap(HttpHelper.GetResponseImage(pUrl, "", "GET", "", 0x1770, "UTF-8", true));
                bitmap.Save(pVerifyCodeFile);
                bitmap.Dispose();
                while (!File.Exists(pVerifyCodeFile))
                {
                    Thread.Sleep(500);
                }
                pVerifyCode = VerifyCodeAPI.VerifyCodeMain(base.PTID, pVerifyCodeFile);
                if (!this.CheckVerifyCode(pVerifyCode))
                {
                    return(this.GetWebVerifyCode(pVerifyCodeFile));
                }
            }
            catch
            {
            }
            return(pVerifyCode);
        }
Пример #3
0
        public override string GetWebVerifyCode(string pVerifyCodeFile)
        {
            string pVerifyCode = "";

            try
            {
                string loginLine     = this.GetLoginLine();
                string pUrl          = this.GetLine() + "/?s=/ApiPublic/getNewCaptcha/";
                string pResponsetext = "";
                string pSource       = "\"\"";
                pSource = this.GetEncode(pSource, true);
                HttpHelper.GetResponse(ref pResponsetext, pUrl, "POST", pSource, loginLine, 0x2710, "UTF-8", true);
                pResponsetext = CommFunc.GetIndexString(pResponsetext, "t=", "\"", 0);
                string str6 = $"/?s=/WebPublic/captcha/&_CAPTCHA&t={pResponsetext}";
                string str7 = this.GetLine() + str6;
                File.Delete(pVerifyCodeFile);
                Bitmap bitmap = new Bitmap(HttpHelper.GetResponseImage(str7, "", "GET", "", 0x1770, "UTF-8", true));
                bitmap.Save(pVerifyCodeFile);
                bitmap.Dispose();
                while (!File.Exists(pVerifyCodeFile))
                {
                    Thread.Sleep(500);
                }
                pVerifyCode = VerifyCodeAPI.VerifyCodeMain(base.PTID, pVerifyCodeFile);
                if (!this.CheckVerifyCode(pVerifyCode))
                {
                    return(this.GetWebVerifyCode(pVerifyCodeFile));
                }
            }
            catch
            {
            }
            return(pVerifyCode);
        }
Пример #4
0
        public override string GetWebVerifyCode(string pVerifyCodeFile)
        {
            string pVerifyCode = "";

            try
            {
                this.VerifyCodeKey = "";
                string str2 = "/user/vcode";
                string pUrl = this.GetLine() + str2;
                File.Delete(pVerifyCodeFile);
                string pReferer      = "";
                string pResponsetext = "";
                HttpHelper.GetResponse(ref pResponsetext, pUrl, "GET", string.Empty, pReferer, 0x2710, "UTF-8", true);
                string pImageString = CommFunc.GetIndexString(pResponsetext, "\"VerifyCode\":\"", "\"", 0);
                this.VerifyCodeKey = CommFunc.GetIndexString(pResponsetext, "\"VerifyKey\":\"", "\"", 0);
                Image image = CommFunc.ConvertImageBy64String(pImageString);
                image.Save(pVerifyCodeFile);
                image.Dispose();
                while (!File.Exists(pVerifyCodeFile))
                {
                    Thread.Sleep(500);
                }
                pVerifyCode = VerifyCodeAPI.VerifyCodeMain(base.PTID, pVerifyCodeFile);
                if (!this.CheckVerifyCode(pVerifyCode))
                {
                    return(this.GetWebVerifyCode(pVerifyCodeFile));
                }
            }
            catch
            {
            }
            return(pVerifyCode);
        }
Пример #5
0
        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);
        }
Пример #6
0
        public override string GetWebVerifyCode(string pVerifyCodeFile)
        {
            string pVerifyCode = "";

            try
            {
                string str2 = "/Login/authnum";
                string pUrl = this.GetLine() + str2;
                File.Delete(pVerifyCodeFile);
                string loginLine = this.GetLoginLine();
                Bitmap bitmap    = new Bitmap(HttpHelper.GetResponseImage(pUrl, loginLine, "GET", "", 0x1770, "UTF-8", true));
                bitmap.Save(pVerifyCodeFile);
                bitmap.Dispose();
                while (!File.Exists(pVerifyCodeFile))
                {
                    Thread.Sleep(500);
                }
                pVerifyCode = VerifyCodeAPI.VerifyCodeMain(base.PTID, pVerifyCodeFile);
                if (!this.CheckVerifyCode(pVerifyCode))
                {
                    return(this.GetWebVerifyCode(pVerifyCodeFile));
                }
            }
            catch
            {
            }
            return(pVerifyCode);
        }
Пример #7
0
        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);
        }
Пример #8
0
        public override string GetWebVerifyCode(string pVerifyCodeFile)
        {
            string pVerifyCode = "";

            try
            {
                bool flag;
                if (!this.GetLoginYZM())
                {
                    return(pVerifyCode);
                }
                string loginLine     = this.GetLoginLine();
                string pUrl          = this.GetLine() + "/DefaultCaptcha/Refresh";
                string pResponsetext = "";
                string pData         = $"t={base.VerifyCodeToken}";
                int    num           = 0;
                goto Label_0092;
Label_0051:
                HttpHelper.GetResponse(ref pResponsetext, pUrl, "POST", pData, loginLine, 0x2710, "UTF-8", true);
                num++;
                if ((pResponsetext != "") || (num >= 2))
                {
                    goto Label_0097;
                }
Label_0092:
                flag = true;
                goto Label_0051;
Label_0097:
                if (pResponsetext == "")
                {
                    return(pVerifyCode);
                }
                base.VerifyCodeToken = CommFunc.GetIndexString(pResponsetext, "\"value\", \"", "\"", 0);
                string str6 = $"/DefaultCaptcha/Generate?t={base.VerifyCodeToken}";
                string str7 = this.GetLine() + str6;
                File.Delete(pVerifyCodeFile);
                Bitmap bitmap = new Bitmap(HttpHelper.GetResponseImage(str7, loginLine, "GET", "", 0x1770, "UTF-8", true));
                bitmap.Save(pVerifyCodeFile);
                bitmap.Dispose();
                while (!File.Exists(pVerifyCodeFile))
                {
                    Thread.Sleep(500);
                }
                pVerifyCode = VerifyCodeAPI.VerifyCodeMain(base.PTID, pVerifyCodeFile);
                if (!this.CheckVerifyCode(pVerifyCode))
                {
                    return(this.GetWebVerifyCode(pVerifyCodeFile));
                }
            }
            catch
            {
            }
            return(pVerifyCode);
        }
Пример #9
0
        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);
        }
Пример #10
0
        public bool InputWeb(string pID, string pW, ref string pHint)
        {
            bool   flag          = false;
            string loginLine     = this.GetLoginLine();
            string pUrl          = this.GetLine() + "/?controller=default&action=login";
            string pResponsetext = "";
            string jScriptByPT   = VerifyCodeAPI.GetJScriptByPT(pW, base.PTID);
            string pData         = $"flag=login&username={pID}&loginpass={jScriptByPT}&validcode=&Submit=json&forgot=0";

            HttpHelper.GetResponse(ref pResponsetext, pUrl, "POST", pData, loginLine, base.BetsTime2, "UTF-8", true);
            flag = pResponsetext.Contains("controller=default&action=main");
            if (!flag)
            {
                pHint = CommFunc.UniconToString(CommFunc.GetIndexString(pResponsetext, "\"sMsg\":\"", "\"", 0).Replace(":", ""));
            }
            return(flag);
        }
Пример #11
0
        public override string GetWebVerifyCode(string pVerifyCodeFile)
        {
            string pVerifyCode = "";

            try
            {
                string str2 = $"/public/getValidCodeByJosn?time={DateTime.Now.ToOADate()}";
                string pUrl = this.GetLine() + str2;
                if (File.Exists(pVerifyCodeFile))
                {
                    File.Delete(pVerifyCodeFile);
                }
                string pData         = $"__RequestVerificationToken={base.Token}";
                string loginLine     = this.GetLoginLine();
                string pResponsetext = "";
                HttpHelper.GetResponse(ref pResponsetext, pUrl, "POST", pData, loginLine, 0x2710, "UTF-8", true);
                if (pResponsetext == "")
                {
                    return(pVerifyCode);
                }
                string s = CommFunc.GetIndexString(pResponsetext, "base64,", "\"", 0);
                this.EncrypCode = CommFunc.GetIndexString(pResponsetext, "\"EncrypCode\":\"", "\"", 0);
                byte[]       buffer = Convert.FromBase64String(s);
                MemoryStream stream = new MemoryStream(buffer, true);
                stream.Write(buffer, 0, buffer.Length);
                Bitmap bitmap = new Bitmap(stream);
                bitmap.Save(pVerifyCodeFile);
                bitmap.Dispose();
                while (!File.Exists(pVerifyCodeFile))
                {
                    Thread.Sleep(500);
                }
                pVerifyCode = VerifyCodeAPI.VerifyCodeMain(base.PTID, pVerifyCodeFile);
                this.VC     = CommFunc.GetIndexString(pResponsetext, "\"vc\":\"", "\"", 0);
                if (!this.CheckVerifyCode(pVerifyCode))
                {
                    return(this.GetWebVerifyCode(pVerifyCodeFile));
                }
            }
            catch
            {
            }
            return(pVerifyCode);
        }