XX系统
打开代码分析,这里的登录接口有好几个
Account\VipLogin.cs代码
using System;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using Plat.Common;
using Plat.Security;
namespace Web.Account;
public class VipLogin : Page
{
protected HtmlForm form1;
protected HtmlTable tb;
protected HtmlInputText txtUserName;
protected HtmlInputPassword txtPassword;
protected HtmlInputText txtVCode;
protected Button Button1;
protected HtmlGenericControl btxt;
protected void Page_Load(object sender, EventArgs e)
{
}
private void login()
{
string userName = txtUserName.Value;
string password = txtPassword.Value;
if (WebContext.GetValidateCode() != txtVCode.Value.ToUpper())
{
WebMessage.Show(this, "您填写的验证码有误!请检查后重新输入!");
return;
}
if (userName != "Vip")
{
WebMessage.Show(this, "用户名错误!");
return;
}
if (password != "Vip123456")
{
WebMessage.Show(this, "密码错误!");
return;
}
Session["AdminName"] = "Vip用户";
Session["DistrictId"] = "1";
Session["DistrictSn"] = "01";
Session["DistrictCnName"] = "Vip用户";
Session["OrganizationName"] = "中华人民共和国农业部渔业局";
base.Response.Redirect("/Home/mainVip.aspx");
}
protected void Button1_Click(object sender, EventArgs e)
{
login();
}
}
关键代码
代码中硬编码了Vip的账号密码
Vip Vip123456 密码正确跳转/Home/mainVip.aspx页面
访问/Account/VipLogin.aspx VIP用户登录接口
成功登录
跳转后台页面