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); }
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); }
public override string GetWebVerifyCode(string pVerifyCodeFile) { string pVerifyCode = ""; try { string str2 = $"/?useValid=true&rand={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); } FrmVerifyCode code = new FrmVerifyCode(pVerifyCodeFile); if (code.ShowDialog() == DialogResult.OK) { pVerifyCode = FrmVerifyCode.OutValue; } if (!this.CheckVerifyCode(pVerifyCode)) { return(this.GetWebVerifyCode(pVerifyCodeFile)); } } catch { } return(pVerifyCode); }
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); }
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); }
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); }