source/webmanage/handler/login.ashx
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<%@ WebHandler Language="C#" Class="login" %>
using System;
using System.Collections.Generic;
using System.Web;
using System.Data;
using System.Data.OleDb;
using System.Web.SessionState;
public class login : IHttpHandler, IRequiresSessionState
{
public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "text/plain";
if (StringUtil.isEmpty(context.Request.Params["admin"]) || StringUtil.isEmpty(context.Request.Params["password"]) || StringUtil.isEmpty(context.Request.Params["validateNum"]))
{
context.Response.Write("无效参数!");
return;
}
else
{
String admin = context.Request.Params["admin"].ToString();
String password = context.Request.Params["password"].ToString();
String validateNum = StringUtil.HtmlEncode(context.Request.Params["validateNum"].ToString());
if (StringUtil.CheckStr(admin) != admin || StringUtil.CheckStr(password) != password)
{
context.Response.Write("包含非法字符");
return;
}
if (context.Session != null && context.Session["ValidateNum"] != null && context.Session["ValidateNum"].ToString() == validateNum.ToUpper())
{
string passwordmd5 = StringUtil.EncryptPassword(password, "MD5");
System.Data.SqlClient.SqlDataReader dr = UserDBS.reDr("select [admin] from [manager] where [admin]='" + admin + "' and [password] = '" + passwordmd5 + "'");
dr.Read();
if (dr.HasRows)//通过dr中是否包含行判断用户是否通过身份验证
{
context.Session["admin"] = dr.GetValue(0);
dr.Close();
context.Response.Write("SUCCESS");
return;
}
else
{
context.Response.Write("登录失败,无效的用户名或密码!");
dr.Close();
return;
}
}
else
{
context.Response.Write("验证码输入错误");
return;
}
}
}
后面还有 9 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。