1、请把压缩包中的key.asp文件上传到KesionCMS根目录下。
2、运行key.asp后选择您所需要的选项。
3、注意:使用完毕后请点击“删除Key文件”或在FTP中删除key.asp文件以防留有后门。
4、功能简介:
A 在删除了所有管理员情况下,新建管理员帐号。
B 修改后台管理员的登录名称和密码。
C 商业用户注册码修改。
复制代码 代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%option explicit
Response.Buffer=true%>
<%
'****************************************************
' Software name:Kesion CMS 4.0
' Email: [email protected] . QQ:111394,9537636
' Web: http://www.kesion.com http://www.kesion.cn
' Copyright (C) Kesion Network All Rights Reserved.
'****************************************************
Dim KSCls
Set KSCls = New Install
KSCls.Kesion()
Set KSCls = Nothing
Class Install
Private KS
Private SqlStr,RS,InstallDir,FsoIndexFile,FsoIndexExt,AdminDirStr,CurrPath,Step
Private Sub Class_Initialize()
Set KS=New PublicCls
End Sub
Private Sub Class_Terminate()
Call CloseConn()
Set KS=Nothing
End Sub
Sub Kesion
%>
|
||
|
||
温馨提示:为了系统的安全,请使用后一定要删除该文件。
<%select case request("action") case "AddAdmin" Call AddAdmin() Case "AddSave" Call SaveInfo() Case "EditAdmin" Call EditAdmin() Case "EditSave" Call EditSave() Case "EditSiteSN" Call EditSiteSN() Case "EditSN" Call EditSN() Case "Del" CurrPath = KS.Setting(3) Call KS.DeleteFile(CurrPath&"key.asp") Response.Redirect KS.Setting(89) & "Login.asp" Case Else Call Main() End Select %> |
Powered by Kesion.Com
© 2007 |
<%
End Sub
Sub SaveInfo()
if not conn.execute("select username from ks_admin where SuperTF='1'").eof then
Call KS.AlertHistory("设置失败:\n\n对不起,系统已存在超级管理账号!","-1")
Response.End
end if
Dim PreUserName,UserName,PassWord,ConPassWord,UserRS
PreUserName=KS.S("PreUserName")
IF PreUserName="" then
Call KS.AlertHistory("设置失败:\n\n没有输入前台会员账号,请输入!","-1")
Response.End
End If
If Conn.Execute("Select * From KS_User Where UserName='" & PreUserName & "'").eof then
Call KS.AlertHistory("设置失败:\n\n前台用户不存在,请重新输入!","-1")
Response.End
end if
UserName=KS.S("UserName")
IF UserName="" then
Call KS.AlertHistory("设置失败:\n\n没有输入管理账号,请输入!","-1")
Response.End
End If
PassWord=KS.S("PassWord")
IF PassWord="" then
Call KS.AlertHistory("设置失败:\n\n没有输入管理密码,请输入!","-1")
Response.End
End If
IF Len(PassWord)<6 then
Call KS.AlertHistory("设置失败:\n\n密码不能少于6位,请重新输入!","-1")
Response.End
End If
ConPassWord=KS.S("ConPassWord")
IF PassWord<>ConPassWord then
Call KS.AlertHistory("设置失败:\n\n两次输入密码不一致,请重新输入!","-1")
Response.End
End If
PassWord =MD5(KS.R(Request.form("PassWord")),16)
Set UserRS=Server.CreateObject("ADODB.RECORDSET")
UserRS.Open "Select * From KS_Admin",Conn,1,3
UserRS.AddNew
UserRS("UserName")=UserName
UserRS("PrUserName")=UserName
UserRS("PassWord")=PassWord
UserRS("Sex")="男"
UserRS("Description")="科汛系统安装分配的超级管理员"
UserRS("SuperTF")=1
UserRS("Locked")=0
UserRS("LastLoginIP")=KS.GetIP
UserRS("LoginTimes")=0
UserRS("LastLoginTime")=Now
UserRS("LastLogoutTime")=Now
UserRS("AddDate")=Now
UserRS("PowerList")=1
UserRS("ModelPower")="11111111111111111111"
UserRS.Update
UserRS.Close
Set UserRS=Nothing
Conn.Execute("Update KS_User Set GroupID=4 where username='" & PreUserName & "'")
KS.DelCaches(KS.SiteSN)
response.write ""
End Sub
Sub EditSave()
Dim UserName,password,conpassword
UserName=KS.S("UserName")
IF UserName="" then
Call KS.AlertHistory("设置失败:\n\n没有输入管理账号,请输入!","-1")
Response.End
End If
Conn.Execute("Update KS_Admin Set UserName='" & UserName & "' Where Supertf='1'")
PassWord=KS.S("PassWord")
IF PassWord<>"" then
IF Len(PassWord)<6 then
Call KS.AlertHistory("设置失败:\n\n密码不能少于6位,请重新输入!","-1")
Response.End
End If
ConPassWord=KS.S("ConPassWord")
IF PassWord<>ConPassWord then
Call KS.AlertHistory("设置失败:\n\n两次输入密码不一致,请重新输入!","-1")
Response.End
End If
PassWord =MD5(KS.R(Request.form("PassWord")),16)
Conn.Execute("Update KS_Admin Set [password]='" & password & "' Where Supertf='1'")
End If
response.write ""
End Sub
Sub EditSN()
Dim RS:Set RS=Server.CreateObject("ADODB.RECORDSET")
RS.Open "Select Setting From KS_Config",conn,1,3
Dim SetArr,SetStr,I
SetArr=Split(RS(0),"^%^")
For I=0 To Ubound(SetArr)
If I=0 Then
SetStr=SetArr(0)
ElseIf I=17 Then
SetStr=SetStr & "^%^" & request("sn")
Else
SetStr=SetStr & "^%^" & SetArr(I)
End If
Next
RS(0)=SetStr
RS.Update
RS.Close:Set RS=Nothing
Call KS.DelCahe(KS.SiteSn & "_Config")
Call KS.DelCahe(KS.SiteSn & "_Date")
response.write ""
End Sub
Sub Main()
%>
<%
End Sub
Sub AddAdmin()
%>
<%
End Sub
Sub EditAdmin()
%>
<%
End Sub
Sub EditSiteSN()
%>
<%
End Sub
End Class
%>