扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
protected void Session_Start(Object sender, EventArgs e) { this.Session.Add("UserID", 0); this.Session.Add("Pass", false); this.Session.Add("WebSite", ""); this.Session.Add("Security", ""); } |
private void CustomerValidate() { bool Pass = (bool) this.Session["Pass"]; if ((this.Request.QueryString["WebSite"] != null) && (this.Request.QueryString["WebSite"] != "")) { this.Session["WebSite"] = this.Request.QueryString["WebSite"]; } if ((this.Request.QueryString["Security"] != null) && (this.Request.QueryString["Security"] != "")) { this.Session["Security"] = this.Request.QueryString["Security"]; } if (Pass) { string UserID = this.Session["UserID"].ToString(); string WebSite = this.Session["WebSite"].ToString(); string Security = this.Session["Security"].ToString(); byte[] Value; UnicodeEncoding Code = new UnicodeEncoding(); byte[] Message = Code.GetBytes(Security); SHA512Managed Arithmetic = new SHA512Managed(); Value = Arithmetic.ComputeHash(Message); Security = ""; foreach(byte o in Value) { Security += (int) o + "O"; } this.Response.Redirect(WebSite + "/Synchronous.aspx?UserID=" + UserID + "&Pass=True&Security=" + Security); } else { this.Response.Redirect("Customer.aspx"); } } |
if (Pass) { if ((this.Session["WebSite"].ToString() != "") && (this.Session["Security"].ToString() != "")) { this.Response.Redirect("Validate.aspx"); } else { this.Response.Write(""); this.Response.Write(""); this.Response.Write(""); this.Response.Write(""); this.Response.Write(""); this.Response.Write(""); this.Response.Write(""); this.Response.Write("Pass"); this.Response.Write(""); this.Response.Write(""); this.Response.Write(""); } } else { this.Response.Redirect("Customer.aspx"); } |
string InUserID = this.Request.QueryString["UserID"]; string InPass = this.Request.QueryString["Pass"]; string InSecurity = this.Request.QueryString["Security"]; string Security = this.Session["Security"].ToString(); if (Security != "") { byte[] Value; UnicodeEncoding Code = new UnicodeEncoding(); byte[] Message = Code.GetBytes(Security); SHA512Managed Arithmetic = new SHA512Managed(); Value = Arithmetic.ComputeHash(Message); Security = ""; foreach(byte o in Value) { Security += (int) o + "O"; } if (Security == InSecurity) { if (InPass == "True") { this.Session["UserID"] = int.Parse(InUserID); this.Session["Pass"] = true; this.Response.Redirect(this.Session["Url"].ToString()); } } else { this.Response.Write(""); this.Response.Write(""); this.Response.Write(""); this.Response.Write(""); this.Response.Write(""); this.Response.Write(""); this.Response.Write(""); this.Response.Write("数据错误"); this.Response.Write(""); this.Response.Write(""); this.Response.Write(""); } } else { this.Response.Write(""); this.Response.Write(""); this.Response.Write(""); this.Response.Write(""); this.Response.Write(""); this.Response.Write(""); this.Response.Write(""); this.Response.Write("访问错误"); this.Response.Write(""); this.Response.Write(""); this.Response.Write(""); } |
this.Response.Write("<iframe width=\"0\" height=\"0\" src=\"" + project.service + "/Customer.aspx\"></iframe>"); |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者