kesion科讯V4.0管理员Key工具

2018-09-06 11:27

阅读:539

  操作说明,请仔细阅读操作说明后进行操作:
1、请把压缩包中的key.asp文件上传到KesionCMS根目录下。
2、运行key.asp后选择您所需要的选项。
3、注意:使用完毕后请点击“删除Key文件”或在FTP中删除key.asp文件以防留有后门。
4、功能简介:
A在删除了所有管理员情况下,新建管理员帐号。
B修改后台管理员的登录名称和密码。
C商业用户注册码修改。
复制代码 代码如下:
<%@LANGUAGE=VBSCRIPTCODEPAGE=936%>
<%optionexplicit
Response.Buffer=true%>
<!--#includefile=Conn.asp-->
<!--#includefile=KS_Inc/md5.asp-->
<!--#includefile=KS_Cls/KS.PublicCls.asp-->
<%
****************************************************
Softwarename:KesionCMS4.0
Web:
Copyright(C)KesionNetworkAllRightsReserved.
****************************************************
DimKSCls
SetKSCls=NewInstall
KSCls.Kesion()
SetKSCls=Nothing

ClassInstall
PrivateKS
PrivateSqlStr,RS,InstallDir,FsoIndexFile,FsoIndexExt,AdminDirStr,CurrPath,Step

PrivateSubClass_Initialize()
SetKS=NewPublicCls
EndSub
PrivateSubClass_Terminate()
CallCloseConn()
SetKS=Nothing
EndSub
SubKesion
%>
<!DOCTYPEHTMLPUBLIC-//W3C//DTDHTML4.0Transitional//EN>
<HTMLxmlns=科汛网站管理系统V4.0系列产品安装程序</TITLE>
<METAhttp-equiv=Content-Typecontent=text/html;charset=GB2312>
<scriptsrc=<%=AdminDirStr%>/JS/Common.jslanguage=JavaScript></script>
<ScriptLanguage=javascript>
<!--
functionCheckForm()
{varform=document.SetWebInfoForm;
{
alert(请输入管理账号!);
form.UserName.focus();
returnfalse;
}
if(form.PassWord.value==)
{
alert(请输入管理密码!);
form.PassWord.focus();
returnfalse;
}
{
alert(请输入确认密码!);
form.ConPassWord.focus();
returnfalse;
}
if(form.ConPassWord.value!=form.PassWord.value)
{
alert(两次输入的密码不一致!);
form.ConPassWord.focus();
returnfalse;
}
if(form.SiteSN.value==)
{
alert(请输入授权系列号!);
form.SiteSN.focus();
returnfalse;
}
if(form.SiteSN.value.length!=29&&form.SiteSN.value.length!=1)
{
alert(请输入的授权系列号有误!);
form.SiteSN.focus();
returnfalse;
}
if(form.WebName.value==)
{
alert(请输入您的网站名称!);
form.WebName.focus();
returnfalse;
}
form.submit();
returntrue;

}
//-->
</Script>
<styletype=text/css>
<!--
.STYLE1{color:#FFFFFF}

A{TEXT-DECORATION:none;Color:#000000;}

A:hover{TEXT-DECORATION:none;Color:#4455aa;}

BODY{
text-align:center;
margin-top:20px;
SCROLLBAR-FACE-COLOR:#eeeeee;
SCROLLBAR-HIGHLIGHT-COLOR:#ffffff;
SCROLLBAR-SHADOW-COLOR:#dee3e7;
SCROLLBAR-3DLIGHT-COLOR:#d1d7dc;
SCROLLBAR-ARROW-COLOR:#000000;
SCROLLBAR-TRACK-COLOR:#ededed;
SCROLLBAR-DARKSHADOW-COLOR:#808080;
}
INPUT.text,TEXTAREA,subject,SELECT{
BORDER:1pxgraysolid;
PADDING-RIGHT:1px;
PADDING-LEFT:1px;
PADDING-BOTTOM:1px;
PADDING-TOP:1px;
HEIGHT:19px;
}
TABLE{
WORD-BREAK:break-all;
}
body,td,th,div{
FONT-SIZE:12px;COLOR:#000000;FONT-FAMILY:Tahoma;line-height:normal;
}
hr{height:1px;color:#6595D6;width:100%;}
.ContactInfo{
FONT-SIZE:14px;
padding:5px;
color:#003399;
}
TEXTAREA.UpdateInfo{
border:1pxdotted#666666;
width:100%;
height:360px;
overflow:auto;
BACKGROUND-COLOR:#ffffff;
FONT-SIZE:14px;
padding:5px;
color:#003399;
}
.copyright{
color:gray;
BACKGROUND-COLOR:#EAEAEA;
}
.redfont{color:#FF0000}
-->
</style></HEAD>
<BODY>
<tablewidth=700border=1align=centercellpadding=1cellspacing=6bordercolor=#CCCCCC>
<tr>
<tdwidth=682height=22bgcolor=#F0F0F0><TABLEwidth=98%border=0cellPadding=0cellSpacing=1class=Table1>
<TBODY>
<TR>
<THnoWrapclass=Link><Ahref=官方网站</A><Ahref=技术论坛</A><Ahref=帮助中心</A><Ahref=演示站点</A></TH>
<THwidth=404align=centernoWrapclass=Link><divalign=right><strong>当前版本:</strong>V4.0<strong>官方版本:</strong>
<scriptsrc=
</TR>
</TBODY>
</TABLE></td>
</tr>
<tr>
<tdwidth=682height=30align=centerbgcolor=#333399>
<tablewidth=100%border=0cellspacing=0cellpadding=0>
<tr>
<td></td>
<tdalign=center><spanclass=STYLE1><strong>KesionCMSV4.0Key管理员工具</strong></span></td>
</tr>
</table></td>
</tr>

<trbgcolor=#F0F0F0id=ShowSetup>
<tdheight=250>
<divstyle=color:red;font-weight:bold;text-align:center;padding:5px;>温馨提示:为了系统的安全,请使用后一定要删除该文件。</div>
<br>

<%selectcaserequest(action)
caseAddAdmin
CallAddAdmin()
CaseAddSave
CallSaveInfo()
CaseEditAdmin
CallEditAdmin()
CaseEditSave
CallEditSave()
CaseEditSiteSN
CallEditSiteSN()
CaseEditSN
CallEditSN()
CaseDel
CurrPath=KS.Setting(3)
CallKS.DeleteFile(CurrPath&key.asp)
Response.RedirectKS.Setting(89)&Login.asp
CaseElse
CallMain()
EndSelect
%>




<br></td>
</tr>

</table>
<tablewidth=700border=0align=centercellpadding=0cellspacing=0>
<tr>
<tdheight=10align=right></td>
</tr>
<tr>
<tdalign=centervalign=bottom>Poweredby<ahref=
©2007
</td>
</tr>
</table>
<TABLEclass=Table0cellSpacing=0cellPadding=0align=centerborder=0>
<TBODY>
<TR>
<TDclass=Table0height=1></TD></TR></TBODY></TABLE>
<!--结束部分-->
</BODY>
</HTML>
<%
EndSub
SubSaveInfo()
ifnotconn.execute(selectusernamefromks_adminwhereSuperTF=1).eofthen
CallKS.AlertHistory(设置失败:\n\n对不起,系统已存在超级管理账号!,-1)
Response.End
endif
DimPreUserName,UserName,PassWord,ConPassWord,UserRS
PreUserName=KS.S(PreUserName)
IFPreUserName=then
CallKS.AlertHistory(设置失败:\n\n没有输入前台会员账号,请输入!,-1)
Response.End
EndIf
IfConn.Execute(Select*FromKS_UserWhereUserName=&PreUserName&).eofthen
CallKS.AlertHistory(设置失败:\n\n前台用户不存在,请重新输入!,-1)
Response.End
endif

UserName=KS.S(UserName)
IFUserName=then
CallKS.AlertHistory(设置失败:\n\n没有输入管理账号,请输入!,-1)
Response.End
EndIf
PassWord=KS.S(PassWord)
IFPassWord=then
CallKS.AlertHistory(设置失败:\n\n没有输入管理密码,请输入!,-1)
Response.End
EndIf
IFLen(PassWord)<6then
CallKS.AlertHistory(设置失败:\n\n密码不能少于6位,请重新输入!,-1)
Response.End
EndIf

ConPassWord=KS.S(ConPassWord)
IFPassWord<>ConPassWordthen
CallKS.AlertHistory(设置失败:\n\n两次输入密码不一致,请重新输入!,-1)
Response.End
EndIf
PassWord=MD5(KS.R(Request.form(PassWord)),16)


SetUserRS=Server.CreateObject(ADODB.RECORDSET)
UserRS.OpenSelect*FromKS_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
SetUserRS=Nothing
Conn.Execute(UpdateKS_UserSetGroupID=4whereusername=&PreUserName&)
KS.DelCaches(KS.SiteSN)
response.write<divalign=center>恭喜,后台管理员设置成功!<br><ahref=&KS.Setting(89)&login.asp>进入后台</a><ahref=?action=Del>删除Key文件</a></div>
EndSub

SubEditSave()
DimUserName,password,conpassword
UserName=KS.S(UserName)
IFUserName=then
CallKS.AlertHistory(设置失败:\n\n没有输入管理账号,请输入!,-1)
Response.End
EndIf
Conn.Execute(UpdateKS_AdminSetUserName=&UserName&WhereSupertf=1)

PassWord=KS.S(PassWord)
IFPassWord<>then
IFLen(PassWord)<6then
CallKS.AlertHistory(设置失败:\n\n密码不能少于6位,请重新输入!,-1)
Response.End
EndIf

ConPassWord=KS.S(ConPassWord)
IFPassWord<>ConPassWordthen
CallKS.AlertHistory(设置失败:\n\n两次输入密码不一致,请重新输入!,-1)
Response.End
EndIf
PassWord=MD5(KS.R(Request.form(PassWord)),16)
Conn.Execute(UpdateKS_AdminSet[password]=&password&WhereSupertf=1)
EndIf
response.write<divalign=center>恭喜,后台管理员修改成功!<br><ahref=&KS.Setting(89)&login.asp>进入后台</a><ahref=?action=Del>删除Key文件</a></div>
EndSub

SubEditSN()
DimRS:SetRS=Server.CreateObject(ADODB.RECORDSET)
RS.OpenSelectSettingFromKS_Config,conn,1,3
DimSetArr,SetStr,I
SetArr=Split(RS(0),^%^)
ForI=0ToUbound(SetArr)
IfI=0Then
SetStr=SetArr(0)
ElseIfI=17Then
SetStr=SetStr&^%^&request(sn)
Else
SetStr=SetStr&^%^&SetArr(I)
EndIf
Next
RS(0)=SetStr
RS.Update
RS.Close:SetRS=Nothing
CallKS.DelCahe(KS.SiteSn&_Config)
CallKS.DelCahe(KS.SiteSn&_Date)
response.write<divalign=center>恭喜,授权系统号修改成功!<br><ahref=&KS.Setting(89)&login.asp>进入后台</a><ahref=?action=Del>删除Key文件</a></div>
EndSub

SubMain()
%>
<tablewidth=95%border=0align=centercellpadding=1cellspacing=1bgcolor=#666666>
<tralign=right>
<tdheight=5colspan=3bgcolor=#0066CC></td>
</tr>
<formname=SetWebInfoFormmethod=postaction=onSubmit=return(CheckForm())>
<inputtype=hiddenvalue=Savename=Action>
<tr>
<tdwidth=17%height=35align=rightbgcolor=#FFFFFF><strong>新建超级管理员:</strong></td>
<tdwidth=41%bgcolor=#FFFFFF>重新建立新的超级管理员帐号</td>
<tdwidth=42%bgcolor=#FFFFFF>
<%dimrsc:setrsc=conn.execute(selectusernamefromks_adminwhereSuperTF=1)
ifrsc.eofthen%>
<inputtype=buttonvalue=开始新建onClick=location.href=?action=AddAdmin;>
<%else%>
<inputtype=buttonvalue=禁止新建disabled><fontcolor=#a7a7a7>系统已存在<%=rsc(username)%>的超级用户</font>
<%endif%>
</td>
</tr>
<tr>
<tdheight=35align=rightbgcolor=#FFFFFF><strong>修改管理员:</strong></td>
<tdbgcolor=#FFFFFF>修改超级管理员登录名及登录密码</td>
<tdbgcolor=#FFFFFF>
<inputname=buttontype=buttonvalue=开始修改onClick=location.href=?action=EditAdmin;></td>
</tr>
<tr>
<tdheight=35align=rightbgcolor=#FFFFFF><strong>修改授权注册码:</strong></td>
<tdbgcolor=#FFFFFF>修改官方授权唯一的注册码</td>
<tdbgcolor=#FFFFFF>
<inputname=button2type=buttonvalue=开始修改onClick=location.href=?action=EditSiteSN;></td>
</tr>
<tralign=right>
<tdheight=5colspan=3bgcolor=#0066CC></td>
</tr>
</form>
</table>
<%
EndSub

SubAddAdmin()
%>
<tablewidth=95%border=0align=centercellpadding=1cellspacing=1bgcolor=#666666>
<tralign=right>
<tdheight=5colspan=2bgcolor=#0066CC></td>
</tr>
<formname=SetWebInfoFormmethod=postaction=?action=AddSave>
<tr>
<tdwidth=17%height=35align=rightbgcolor=#FFFFFF><strong>前台用户名:</strong></td>
<tdwidth=41%bgcolor=#FFFFFF><inputtype=textname=preusernamesize=12>(前台注册的用户名)</td>
</tr>
<tr>
<tdheight=35align=rightbgcolor=#FFFFFF><strong>管理员登录名:</strong></td>
<tdbgcolor=#FFFFFF><inputtype=textname=usernamesize=12></td>
</tr>
<tr>
<tdheight=35align=rightbgcolor=#FFFFFF><strong>登录密码:</strong></td>
<tdbgcolor=#FFFFFF><inputtype=passwordname=passwordsize=12>(长度不能小于6)</td>
</tr>
<tr>
<tdheight=35align=rightbgcolor=#FFFFFF><strong>确认密码:</strong></td>
<tdbgcolor=#FFFFFF><inputtype=passwordname=conpasswordsize=12>(长度不能小于6)</td>
</tr>
<tralign=right>
<tdheight=5colspan=2bgcolor=#0066CC></td>
</tr>
<tralign=center>
<tdheight=25colspan=2bgcolor=#ffffff><inputtype=submitvalue=确认增加></td>
</tr>
</form>
</table>
<%
EndSub

SubEditAdmin()
%>
<tablewidth=95%border=0align=centercellpadding=1cellspacing=1bgcolor=#666666>
<tralign=right>
<tdheight=5colspan=2bgcolor=#0066CC></td>
</tr>
<formname=SetWebInfoFormmethod=postaction=?action=EditSave>
<tr>
<tdheight=35align=rightbgcolor=#FFFFFF><strong>管理员登录名:</strong></td>
<tdbgcolor=#FFFFFF><inputvalue=<%=conn.execute(selectusernamefromks_adminwheresupertf=1)(0)%>type=textname=usernamesize=12></td>
</tr>
<tr>
<tdheight=35align=rightbgcolor=#FFFFFF><strong>登录密码:</strong></td>
<tdbgcolor=#FFFFFF><inputtype=passwordname=passwordsize=12>(长度不能小于6)不想修改请留空</td>
</tr>
<tr>
<tdheight=35align=rightbgcolor=#FFFFFF><strong>确认密码:</strong></td>
<tdbgcolor=#FFFFFF><inputtype=passwordname=conpasswordsize=12>(长度不能小于6)不想修改请留空</td>
</tr>
<tralign=right>
<tdheight=5colspan=2bgcolor=#0066CC></td>
</tr>
<tralign=center>
<tdheight=25colspan=2bgcolor=#ffffff><inputtype=submitvalue=确认修改></td>
</tr>
</form>
</table>
<%
EndSub

SubEditSiteSN()
%>
<tablewidth=95%border=0align=centercellpadding=1cellspacing=1bgcolor=#666666>
<tralign=right>
<tdheight=5colspan=2bgcolor=#0066CC></td>
</tr>
<formname=SetWebInfoFormmethod=postaction=?action=EditSN>
<tr>
<tdheight=35align=rightbgcolor=#FFFFFF><strong>授权系统号:</strong></td>
<tdbgcolor=#FFFFFF><inputvalue=<%=ks.setting(17)%>type=textname=snsize=40></td>
</tr>

<tralign=right>
<tdheight=5colspan=2bgcolor=#0066CC></td>
</tr>
<tralign=center>
<tdheight=25colspan=2bgcolor=#ffffff><inputtype=submitvalue=确认修改></td>
</tr>
</form>
</table>
<%
EndSub
EndClass
%>


评论


亲,登录后才可以留言!