就是这个帖子
http://nt.discuz.net/showtopic-40975.html下载了他的dll,我们来看看其中一个关键函数 登陆函数
public virtual bool Login(string username, string password, int expDays, bool inVisisble, string reFerer)
{
string Sql = String.Format("select top 1 tpp,ppp,pmsound,invisible,sigstatus,uid from [{1}users] where username='{0}'", username, Motion.DZ.Command.RC.Tableprefix); ---------注释1
System.Data.DataTable myDt = Motion.DZ.Command.DBC.vDataTable(Sql);
if (Object.Equals(myDt, null) || myDt.Rows.Count <= 0)
{
Motion.DZ.Command.Register(username, 0, String.Empty, password, 11, String.Empty); ----注释2
myDt = Motion.DZ.Command.DBC.vDataTable(Sql);
}
GetUserInfo userinfo = new GetUserInfo(myDt);
if (Object.Equals(myDt, null) || myDt.Rows.Count <= 0) return false;
Motion.DZ.Command.DBC.vExecuteNonQuery(String.Format("UPDATE [{0}users] SET [lastvisit]=GetDate(), [lastip]='{2}' WHERE [username]='{1}'", Motion.DZ.Command.RC.Tableprefix, username, Motion.DZ.Command.RC.UserIP));
return Motion.DZ.Command.WriteLoginCookie(userinfo, inVisisble, reFerer, expDays, password);
}
注释1: 这里只是检测了 用户名是否存在,只要用户名存在,登陆是肯定可以成功的,也就是说不管你密码正确与否,登陆都可以成功。
注释2: 这里是最天才的,如果用户名不存在,怎么办?代码自动给你注册一个,密码就是你输入的密码。
其他的懒得多写了,使用这个dll的朋友,最好能仔细检查一下代码。