<%@language="vbscript" codepage="65001"%>
<%
option explicit
response.buffer = true
server.scripttimeout="2000"
on error resume next
dim starttime:starttime=timer()
dim vbcrlf:vbcrlf=chr(32)&chr(10)
dim server_os,server_cpu,server_cpus
dim WSshell,isobjver

function isobj(objinfo)
  on error resume next
  isobj=false
  isobjver=""
  dim testobj
  set testobj=server.createobject(objinfo)
  if -2147221005<>err then
    isobj=true
    isobjver=testobj.version
    if isobjver="" or isnull(isobjver) then isobjver=testobj.about
  end if
  set testobj=nothing
end function

function show_item_info(strinfo)
  if isarray(strinfo) then
    show_item_info="<font class=""red"">Array</font>"
  else
    show_item_info=server.htmlencode(strinfo)
  end if
end function

function show_yesno(strboo)
  select case strboo
    case true:show_yesno="<font class=""green""><b>√</b></font>"
    case false:show_yesno="<font class=""red""><b>×</b></font>"
  end select
end function

function show_syesno(strrun)
  on error resume next
  dim testobj
  set testobj=server.createobject(strrun)
  if -2147221005<>err then
    show_syesno="<font class=""red"">√ 危险</font>"
  else
    show_syesno="<font class=""green"">× 安全</font>"
  end if
end function

function drivetype(typenum)
  select case typenum
    case 0
      drivetype="未知"
    case 1
      drivetype="移动磁盘"
    case 2
      drivetype="本地硬盘"
    case 3
      drivetype="网络磁盘"
    case 4
      drivetype="CD-ROM"
    case 5
      drivetype="RAM 磁盘"
  end select
end function

function csize(tsize)
  if tsize>=1073741824 then
    csize=int((tsize/1073741824)*1000)/1000 & " GB"
  elseif tsize>=1048576 then
    csize=int((tsize/1048576)*1000)/1000 & " MB"
  elseif tsize>=1024 then
    csize=int((tsize/1024)*1000)/1000 & " KB"
  else
    csize=tsize & "B"
  end if
end function

function repath(pathstr)
  if isnull(pathstr) or pathstr="" then
    repath=""
  else
    repath=replace(pathstr,"\\","\")
  end if
end function

sub jsalert(str,stype)
  response.clear
  response.write"<html>"&vbcrlf
  response.write"<head>"&vbcrlf
  response.write"<meta http-equiv=""content-type"" content=""text/html; charset=utf-8"">"&vbcrlf
  response.write"<title>Alert</title>"&vbcrlf
  response.write"</head>"&vbcrlf
  response.write"<body>"&vbcrlf
  response.write "<script language=""javascript"">"&vbcrlf
  response.write "alert("""&str&""")"&vbcrlf
  if isnumeric(stype) then
    response.write "history.go("&stype&")"&vbcrlf
  else
    response.write "location.href=""&stype&"")"&vbcrlf
  end if
  response.write "</script>"&vbcrlf
  response.write"</body>"&vbcrlf
  response.write"</html>"&vbcrlf
  response.end
end sub

sub jtb_leftmenu()
%>
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="tabb">
  <tr>
    <td width="100%"><a href="?stype=server_info" target="_self">■ 概况</a></td>
  </tr>
  <tr>
    <td width="100%"><a href="?stype=com_list" target="_self">■ 组件</a></td>
  </tr>
  <tr>
    <td width="100%"><a href="?stype=speed_info" target="_self">■ 速度</a></td>
  </tr>
  <tr>
    <td width="100%"><a href="?stype=safe_info" target="_self">■ 安全</a></td>
  </tr>
  <tr>
    <td width="100%"></td>
  </tr>
</table>
<%
end sub

%>
<script language="JScript" runat="server">
function jtb_getjver(){
  return ScriptEngineMajorVersion()+"."+ScriptEngineMinorVersion()+"."+ ScriptEngineBuildVersion();
}
</script>
<%

sub jtb_getsysinfo()
  on error resume next
  dim wshshell,wshsysenv
  set wshshell=server.createobject("wscript.shell")
  set wshsysenv=wshshell.environment("system")
  server_os=cstr(wshsysenv("os"))
  server_cpus=cstr(wshsysenv("number_of_processors"))
  server_cpu=cstr(wshsysenv("processor_identifier"))
  if isnull(server_cpus)&""="" then
    server_cpus=request.servervariables("number_of_processors")
  end if
end sub

sub jtb_server_info()
%>
<table border="0" width="96%" cellspacing="0" cellpadding="0" class="tabd">
  <tr>
    <td width="96%" class="tdb" colspan="2">&nbsp;■ 服务器概况</td>
  </tr>
  <tr>
    <td width="28%">&nbsp;服务器地址:</td>
    <td width="72%">名称 <%=request.servervariables("server_name")%>(ip:<%=request.servervariables("local_addr")%>) 端口:<%=request.servervariables("server_port")%></td>
  </tr>
  <tr>
    <td>&nbsp;服务器时间:</td>
    <td><%=now()%></td>
  </tr>
  <tr>
    <td>&nbsp;iis版本:</td>
    <td><%=request.servervariables("server_software")%></td>
  </tr>
  <tr>
    <td>&nbsp;脚本超时时间:</td>
    <td><%=server.scripttimeout%> 秒</td>
  </tr>
  <tr>
    <td>&nbsp;本文件路径:</td>
    <td><%=request.servervariables("path_translated")%></td>
  </tr>
  <tr>
    <td>&nbsp;服务器脚本引擎:</td>
    <td><%=scriptengine&"/"&scriptenginemajorversion&"."&scriptengineminorversion&"."&scriptenginebuildversion%> , <%="jscript/"&jtb_getjver()%></td>
  </tr><%call jtb_getsysinfo()%>
  <tr>
    <td>&nbsp;服务器操作系统:</td>
    <td><%=server_os%></td>
  </tr>
  <tr>
    <td>&nbsp;Application 变量:</td>
    <td>Application <%=Application.Contents.count%> 个 <%if Application.Contents.count>0 then Response.Write "[<a href=""?stype=application_info"">列表</a>]"%></td>
  </tr>
  <tr>
    <td>&nbsp;Session 变量:</td>
    <td>Session <%=Session.Contents.count%> 个 <%if Session.Contents.count>0 then Response.Write "[<a href=""?stype=session_info"">列表</a>]"%></td>
  </tr>
  <tr>
    <td>&nbsp;Cookies 变量:</td>
    <td>Cookies <%=Request.Cookies.Count%> 个 <%if Request.Cookies.Count>0 then Response.Write "[<a href=""?stype=request_cookies_info"">列表</a>]"%></td>
  </tr>
  <tr>
    <td>&nbsp;ServerVariables:</td>
    <td><%=Request.ServerVariables.Count%> 个 <%if Request.ServerVariables.Count>0 then Response.Write "[<a href=""?stype=request_servervariables"">Request.ServerVariables 列表</a>]"%></td>
  </tr>
  <tr>
    <td>&nbsp;服务器CPU通道数:</td>
    <td><%=server_cpus%></td>
  </tr>
  <%
  if isobj("WScript.Shell") then
    set WSshell=server.CreateObject("WScript.Shell")
    %>
  <tr>
    <td>&nbsp;服务器CPU详情</td>
    <td><%=server_cpu%></td>
  </tr>
  <tr>
    <td>&nbsp;全部服务器环境</td>
    <td><%=WSshell.Environment.count%> 个  <%if WSshell.Environment.count>0 then Response.Write "[<a href=""?stype=wsshell_info"">WSshell.Environment 列表</a>]"%></td>
  </tr>
    <%
  end if
  %>
</table>
<%
end sub

sub jtb_apps_info(infotype,infoname)
  on error resume next
%>
<table border="0" width="96%" cellspacing="0" cellpadding="0" class="tabd">
  <tr>
    <td width="96%" class="tdb" colspan="2">&nbsp;<%=infoname%>列表</td>
  </tr>
  <tr>
    <td width="28%">&nbsp;变量名</td>
    <td width="72%">&nbsp;值</td>
  </tr>
  <%
  dim apps,appi
  appi=1
  for each apps in eval(infotype)
    %>
  <tr>
    <td width="28%" valign="top">&nbsp;<font class="red"><%=appi%></font>:<font class="green"><%=apps%></font></td>
    <td width="72%" valign="top">&nbsp;<%=show_item_info(eval(infotype)(apps))%></td>
  </tr>
    <%
    appi=appi+1
  next
  %>
</table>
<%
end sub

sub jtb_wsshell_info()
  on error resume next
  dim tmpwsshell
  Set tmpwsshell=server.CreateObject("WScript.Shell")
%>
<table border="0" width="96%" cellspacing="0" cellpadding="0" class="tabd">
  <tr>
    <td width="96%" class="tdb" colspan="2">&nbsp;WScript.Shell.Environments列表</td>
  </tr>
  <tr>
    <td width="28%">&nbsp;变量名</td>
    <td width="72%">&nbsp;值</td>
  </tr>
  <%
  dim apps,appsa,appi
  appi=1
  for each apps in tmpwsshell.Environment
    appsa=split(apps,"=")
    %>
  <tr>
    <td width="28%" valign="top">&nbsp;<font class="red"><%=appi%></font>:<font class="green"><%=appsa(0)%></font></td>
    <td width="72%" valign="top">&nbsp;<%=appsa(1)%></td>
  </tr>
    <%
    appi=appi+1
  next
  set tmpwsshell=nothing
  %>
</table>
<%
end sub

sub jtb_com_list()
  on error resume next
  dim comary(3,14,1)
  comary(0,0,0) = "MSWC.AdRotator"
  comary(0,1,0) = "MSWC.BrowserType"
  comary(0,2,0) = "MSWC.NextLink"
  comary(0,3,0) = "MSWC.Tools"
  comary(0,4,0) = "MSWC.Status"
  comary(0,5,0) = "MSWC.Counters"
  comary(0,6,0) = "IISSample.ContentRotator"
  comary(0,7,0) = "IISSample.PageCounter"
  comary(0,8,0) = "MSWC.PermissionChecker"
  comary(0,9,0) = "Microsoft.XMLHTTP"
    comary(0,9,1) = "(Http 组件, 常在采集系统中用到)"
  comary(0,10,0) = "Microsoft.XMLDOM"
    comary(0,10,1) = "(XMLDOM)"
  comary(0,11,0) = "WScript.Shell"
    comary(0,11,1) = "(Shell 组件, 可能涉及安全问题)"
  comary(0,12,0) = "Scripting.FileSystemObject"
    comary(0,12,1) = "(FSO 文件系统管理、文本文件读写)"
  comary(0,13,0) = "Adodb.Connection"
    omary(0,14,1) = "(ADO 数据对象)"
  comary(0,14,0) = "Adodb.Stream"
    comary(0,14,1) = "(ADO 数据流对象, 常见被用在无组件上传程序中)"

  comary(1,0,0) = "SoftArtisans.FileUp"
    comary(1,0,1) = "(SA-FileUp 文件上传)"
  comary(1,1,0) = "SoftArtisans.FileManager"
    comary(1,1,1) = "(SoftArtisans 文件管理)"
  comary(1,2,0) = "Ironsoft.UpLoad"
    comary(1,2,1) = "(国产免费, 上传组件)"
  comary(1,3,0) = "LyfUpload.UploadFile"
    comary(1,3,1) = "(刘云峰的文件上传组件)"
  comary(1,4,0) = "Persits.Upload.1"
    comary(1,4,1) = "(ASPUpload 文件上传)"
  comary(1,5,0) = "w3.upload"
    comary(1,5,1) = "(Dimac 文件上传)"

  comary(2,0,0) = "JMail.SmtpMail"
    comary(2,0,1) = "(Dimac JMail 邮件收发)"
  comary(2,1,0) = "CDONTS.NewMail"
    comary(2,1,1) = "(CDONTS)"
  comary(2,2,0) = "CDO.Message"
    comary(2,2,1) = "(CDOSYS)"
  comary(2,3,0) = "Persits.MailSender"
    comary(2,3,1) = "(ASPemail 发信)"
  comary(2,4,0) = "SMTPsvg.Mailer"
    comary(2,4,1) = "(ASPmail 发信)"
  comary(2,5,0) = "DkQmail.Qmail"
    comary(2,5,1) = "(dkQmail 发信)"
  comary(2,6,0) = "SmtpMail.SmtpMail.1"
    comary(2,6,1) = "(SmtpMail 发信)"

  comary(3,0,0) = "SoftArtisans.ImageGen"
    comary(3,0,1) = "(SA 的图像读写组件)"
  comary(3,1,0) = "W3Image.Image"
    comary(3,1,1) = "(Dimac 的图像读写组件)"
  comary(3,2,0) = "Persits.Jpeg"
    comary(3,2,1) = "(ASPJpeg)"
  comary(3,3,0) = "XY.Graphics"
    comary(3,3,1) = "(国产免费, 图像/图表处理)"
  comary(3,4,0) = "Ironsoft.DrawPic"
    comary(3,4,1) = "(国产免费, 图像/图形处理)"
  comary(3,5,0) = "Ironsoft.FlashCapture"
    comary(3,5,1) = "(国产免费, 多功能 FLASH 截图)"
  comary(3,6,0) = "dyy.zipsvr"
    comary(3,6,1) = "(国产免费, 呆呆文件压缩解压组件)"
  comary(3,7,0) = "hin2.com_iis"
    comary(3,7,1) = "(国产免费, 呆呆IIS管理组件)"
  comary(3,8,0) = "Socket.TCP"
    comary(3,8,1) = "(Dimac 公司的 Socket 组件)"
%>
<table border="0" width="96%" cellspacing="0" cellpadding="0" class="tabd">
  <tr>
    <td width="96%" class="tdb" colspan="2">&nbsp;■ 检查组件是否被支持</td>
  </tr>
  <form name="ckcom" method="post">
  <tr>
    <td width="96%" colspan="2">&nbsp;在下面的文本框中输入您要检测的组件的 ProgId 或 ClassId</td>
  </tr>
  <tr>
    <td width="96%" colspan="2">&nbsp;<input type="text" name="classname" size="50">&nbsp;<a class="submit" href="javascript:document.ckcom.submit()">检测</a></td>
  </tr>
  <tr>
    <td width="96%">
<%
dim classstr:classstr=trim(request.form("classname"))
if not classstr="" then
  if isobj(classstr) then
    response.write "&nbsp;<font class=""green"">恭喜，该服务器支持"&show_item_info(classstr)&"组件 "&isobjver&"</font>"
  else
    response.write "&nbsp;<font class=""red"">很抱歉，该服务器不支持"&show_item_info(classstr)&"组件</font>"
  end if
end if
%>
    </td>
  </tr>
  </form>
</table>
<%
  call jtb_com_item("操作系统自带的组件",0,comary)
  call jtb_com_item("常见文件上传和管理组件",1,comary)
  call jtb_com_item("常见邮件处理组件",2,comary)
  call jtb_com_item("其它常见组件",3,comary)
end sub

sub jtb_com_item(itemstr,itemnum,itemary)
%>
<table border="0" width="96%" cellspacing="0" cellpadding="0" class="tabd">
  <tr>
    <td width="96%" class="tdb" colspan="2">&nbsp;■ <%=itemstr%></td>
  </tr>
  <tr>
    <td width="28%">&nbsp;支持/版本:</td>
    <td width="72%">&nbsp;组件名称及简介:</td>
  </tr>
<%
dim tmpa,tmpb,tmpisobj
tmpa=itemnum
for tmpb=0 to ubound(itemary,2)
  if not isnull(itemary(tmpa,tmpb,0)) and not itemary(tmpa,tmpb,0)="" then
    tmpisobj=isobj(itemary(tmpa,tmpb,0))
%>
  <tr>
    <td width="28%">&nbsp;<%=show_yesno(tmpisobj)%><%if tmpisobj and isnumeric(isobjver) then%><%=left(isobjver,4)%><%end if%></td>
    <td width="72%" title="<%=itemary(tmpa,tmpb,1)%>">&nbsp;<%=itemary(tmpa,tmpb,0)%></td>
  </tr>
<%
  end if
next
%>
</table>
<%
end sub

sub jtb_speed_info()
  on error resume next
  dim testnum,testintnum,testknum
  testnum=request.form("files")
  if isnumeric(testnum) and testnum<>"" then
    testnum=clng(testnum)
  else
    testnum=50
  end if
  testintnum=request.form("ints")
  if isnumeric(testintnum) and testintnum<>"" then
    testintnum=clng(testintnum)
  else
    testintnum=500000
  end if
  testknum=request.form("flos")
  if isnumeric(testknum) and testknum<>"" then
    testknum=clng(testknum)
  else
    testknum=200000
  end if
  %>
<table border="0" width="96%" cellspacing="0" cellpadding="0" class="tabd">
  <tr>
    <td width="96%" class="tdb" colspan="2">&nbsp;■ 检查服务器速度</td>
  </tr>
  <form name="ckspeed" method="post">
  <tr>
    <td width="96%" colspan="2">&nbsp;<font class="red">文件</font>：<input type="text" name="files" size="4" value="<%=testnum%>">&nbsp;次&nbsp;<font class="red">整数</font>：<input type="text" name="ints" size="4" value="<%=testintnum%>">&nbsp;次&nbsp;<font class="red">浮点</font>：<input type="text" name="flos" size="4" value="<%=testknum%>">&nbsp;次&nbsp;<a class="submit" href="javascript:document.ckspeed.submit()">检测</a></td>
  </tr>
  <tr>
    <td width="96%">
    </td>
  </tr>
  </form>
</table>
<table border="0" width="96%" cellspacing="0" cellpadding="0" class="tabd">
  <tr>
    <td width="96%" class="tdb" colspan="2">&nbsp;■ 磁盘文件操作速度</td>
  </tr>
  <%if isobj("Scripting.FileSystemObject") then%>
  <tr>
    <td width="96%" colspan="2">
    <%
    dim testfso
    set testfso=server.CreateObject("Scripting.FileSystemObject")
    response.write "<font class=""green"">开始尝试重复创建，写入和删除文件共计"&testnum&"次..</font><br>"
    dim teststarttime,testendtime,testtime,testiserr,testi,testfile,testobj
    testiserr=false
    teststarttime=timer
    testfile=server.MapPath("./")&"\test.txt"
    for testi=1 to testnum
      err.clear
      set testobj=testfso.CreateTextFile(testfile,true)
      if err<>0 then
        response.write "<font class=""red"">创建文件错误..</font><br>"
        testiserr=true
        err.clear
        exit for
      end if
      testobj.WriteLine "Only for test!"
      if err<>0 then
        response.write "<font class=""red"">写入文件错误..</font><br>"
        testiserr=true
        err.clear
        exit for
      end if
      testobj.close
      set testobj=testfso.GetFile(testfile)
      testobj.Delete 
      if err<>0 then
        response.write "<font class=""red"">删除文件错误..</font><br>"
        testiserr=true
        err.clear
        exit for
      end if
      set testobj=nothing
    next
    testendtime=timer
    if not testiserr then
      testtime=formatnumber((testendtime-teststarttime)*1000,3)
      response.write "<font class=""green"">已完成..共花费：<font class=""red"">"&testtime&"</font>毫秒</font><br>"
      %>
    </td>
  </tr>
  <tr>
    <td width="28%">&nbsp;完成时间(毫秒):</td>
    <td width="72%">&nbsp;对照属性(50次参考值):</td>
  </tr>
  <tr>
    <td width="28%">&nbsp;<31</td>
    <td width="72%">&nbsp;快</td>
  </tr>
  <tr>
    <td width="28%">&nbsp;31-62</td>
    <td width="72%">&nbsp;中</td>
  </tr>
  <tr>
    <td width="28%">&nbsp;>62</td>
    <td width="72%">&nbsp;慢</td>
  </tr>
  <tr class="red">
    <td width="28%">&nbsp;<%=testtime%></td>
    <td width="72%">&nbsp;这台服务器: <%=Request.ServerVariables("SERVER_NAME")%></td>
  </tr>
      <%
    end if
  else
  %>
  <tr>
    <td width="96%" colspan="2">&nbsp;<font class="red">缺少必要的FSO权限</font></td>
  </tr>
  <%
  end if
  %>
</table>
<table border="0" width="96%" cellspacing="0" cellpadding="0" class="tabd">
  <tr>
    <td width="96%" class="tdb" colspan="2">&nbsp;■ 脚本解释和运算速度</td>
  </tr>
  <tr>
    <td width="96%" colspan="2">
  <%
  response.write "<font class=""green"">整数运算测试，正在进行"&testintnum&"次加法运算..</font><br>"
  dim testintstarttime,testintendtime,testinttime,testinti,testintii
  testintstarttime=timer
  for testinti=1 to testintnum
    testintii=1+1
  next
  testintendtime=timer
  testinttime=formatnumber((testintendtime-testintstarttime)*1000,3)
  response.write "<font class=""green"">已完成..共花费：<font class=""red"">"&testinttime&"</font>毫秒</font><br><br>"
  %>
    </td>
  </tr>
  <tr>
    <td width="28%">&nbsp;完成时间(毫秒):</td>
    <td width="72%">&nbsp;对照属性(50万次参考值):</td>
  </tr>
  <tr>
    <td width="28%">&nbsp;<167</td>
    <td width="72%">&nbsp;快</td>
  </tr>
  <tr>
    <td width="28%">&nbsp;167-233</td>
    <td width="72%">&nbsp;中</td>
  </tr>
  <tr>
    <td width="28%">&nbsp;>233</td>
    <td width="72%">&nbsp;慢</td>
  </tr>
  <tr class="red">
    <td width="28%">&nbsp;<%=testinttime%></td>
    <td width="72%">&nbsp;这台服务器: <%=Request.ServerVariables("SERVER_NAME")%></td>
  </tr>
  <tr>
    <td width="96%" colspan="2">
  <%
  response.write "<font class=""green"">浮点运算测试，正在进行"&testknum&"次开方运算...</font><br>"
  dim testkstarttime,testkendtime,testktime,testki,testkii
  testkstarttime=timer
  for testki=1 to testknum
    testkii=2^0.5
  next
  testkendtime=timer
  testktime=formatnumber((testkendtime-testkstarttime)*1000,3)
  response.write "<font class=""green"">已完成..共花费：<font class=""red"">"&testktime&"</font>毫秒</font><br><br>"
  %>
    </td>
  </tr>
  <tr>
    <td width="28%">&nbsp;完成时间(毫秒):</td>
    <td width="72%">&nbsp;对照属性(20万次参考值):</td>
  </tr>
  <tr>
    <td width="28%">&nbsp;<148</td>
    <td width="72%">&nbsp;快</td>
  </tr>
  <tr>
    <td width="28%">&nbsp;148-181</td>
    <td width="72%">&nbsp;中</td>
  </tr>
  <tr>
    <td width="28%">&nbsp;>181</td>
    <td width="72%">&nbsp;慢</td>
  </tr>
  <tr class="red">
    <td width="28%">&nbsp;<%=testktime%></td>
    <td width="72%">&nbsp;这台服务器: <%=Request.ServerVariables("SERVER_NAME")%></td>
  </tr>
</table>
<%
end sub

sub jtb_safe_info()
  on error resume next
%>
<table border="0" width="96%" cellspacing="0" cellpadding="0" class="tabd">
  <tr>
    <td width="96%" class="tdb" colspan="2">&nbsp;服务器相对不安全的组件检测(仅供参考)</td>
  </tr>
  <tr class="green">
    <td width="28%">&nbsp;组件名</td>
    <td width="72%">&nbsp;描述</td>
  </tr>
  <tr>
    <td width="28%" valign="top">&nbsp;WScript.Shell<br>&nbsp;<%=show_syesno("WScript.Shell")%><br>&nbsp;Shell.application<br>&nbsp;<%=show_syesno("Shell.application")%></td>
    <td width="72%" valign="top">Shell 组件允许ASP运行.exe等可执行文件，存在严重的安全隐患。即使在文件系统进行过严格的权限设置的服务器上，此组件也会被用来运行提升权限的程序。</td>
  </tr>
  <tr>
    <td width="28%" valign="top">&nbsp;WScript.Network<br>&nbsp;<%=show_syesno("WScript.Network")%></td>
    <td width="72%" valign="top">WScript.Network 为ASP程序罗列和创建系统用户(組)提供了可能，如果上面提示“√ 危险”则可能存在此安全隐患。</td>
  </tr>
  <tr>
    <td width="28%" valign="top">&nbsp;Adodb.Stream<br>&nbsp;<%=show_syesno("Adodb.Stream")%></td>
    <td width="72%" valign="top">Adodb.Stream 常常被用来上传木马等不安全程序，从而扩大攻击者的破坏能力。通过必要的权限设置，Adodb.Stream不会对系统安全造成威胁，它常常被使用在无组件上传工具中。</td>
  </tr>
  <tr>
    <td width="28%" valign="top">&nbsp;FSO<br>&nbsp;<%=show_syesno("Scripting.FileSystemObject")%></td>
    <td width="72%" valign="top">FSO(Scripting.FileSystemObject) 具备罗列和管理服务器中文件和文件夹的能力，如果权限设置不当，将导致木马程序移动、修改甚至删除服务器上的文件。FSO 组件是常用的组件之一，禁用该组件并不是最理想的安全措施，不建议禁止。</td>
  </tr>
</table>
<table border="0" width="96%" cellspacing="0" cellpadding="0" class="tabd">
  <tr>
    <td width="96%" class="tdb" colspan="2">&nbsp;系统用户(组)和进程检测</td>
  </tr>
  <tr class="green">
    <td width="96%" colspan="2">&nbsp;如果下面列出了系统用户和进程，则说明系统可能存在安全隐患。</td>
  </tr>
  <%
  on error resume next
  dim sysobj
  for each sysobj in getobject("WinNT://.")
    err.clear
    %>
  <tr>
    <td width="28%" valign="top">
    <!--<%=sysobj.path%>-->
    <%
    if err then
      response.write "系统用户(组)"
    else
      response.write "系统进程"
    end if
    %>
    </td>
    <td width="72%" valign="top"><%=sysobj.name%><%if err=0 then response.write "("&sysobj.displayname&")"%><br><%=sysobj.path%></td>
  </tr>
    <%
  next
  %>
</table>
<%
end sub

sub jtb_default()
  call jtb_server_info()
  call jtb_com_list()
  call jtb_disk_list()
end sub

sub jtb_selshow()
  select case request.querystring("stype")
    case "main"
      call jtb_default()
    case "server_info"
      call jtb_server_info()
    case "application_info"
      call jtb_apps_info("Application.Contents","Application")
    case "session_info"
      call jtb_apps_info("Session.Contents","Session")
    case "request_cookies_info"
      call jtb_apps_info("Request.Cookies","Cookies")
    case "request_servervariables"
      call jtb_apps_info("Request.ServerVariables","Request.ServerVariables")
    case "wsshell_info"
      call jtb_wsshell_info()
    case "com_list"
      call jtb_com_list()
    case "disk_list"
      call jtb_disk_list()
    case "speed_info"
      call jtb_speed_info()
    case "safe_info"
      call jtb_safe_info()
    case "show_files"
      call jtb_show_files()
    case else
      call jtb_default()
  end select
end sub

sub jtb_main()
%>
<table border="0" width="98%" cellspacing="0" cellpadding="0" class="taba">
  <tr>
    <td width="98%" colspan="2" class="tda" onclick="javascript:location.href='?stype=main'">&nbsp;ASP探针</td>
  </tr>
  <tr>
    <td width="10%" valign="top"><%call jtb_leftmenu()%></td>
    <td width="88%" valign="top"><%call jtb_selshow()%></td>
  </tr>
  <tr>
    <td width="98%" colspan="2" class="tda" align="right"><%dim enddtime:enddtime=timer():response.write "执行时间:"&formatnumber((enddtime-starttime)*1000,3)&"毫秒&nbsp;"%></td>
  </tr>
</table>
<%
end sub
%>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>asp探针</title>
<style>
<!--
h1{font-size:12px;color:#006241;font-family:arial;}
h2{font-size:12px;color:#000000;font-family:arial;}
h3{font-size:12px;color:#cccccc;font-family:arial;font-weight: normal;margin:0px 0px 0px 0px;}
body{font-size:12px;font-family:arial;word-break:break-all;margin-top:0px;margin-left:0px;}
a{color:#e54646;text-decoration:none;}
a:hover{color:#000000;text-decoration:none;}
a.submit{border:#000000 1px solid;color:#000000;text-decoration:none;margin:2px 2px 2px 2px;padding-left:2px;padding-right:2px;padding-top:2px;padding-bottom:0px;}
a.submit:hover{border:#e54646 1px solid;color:#e54646;text-decoration:none;margin:2px 2px 2px 2px;padding-left:2px;padding-right:2px;padding-top:2px;padding-bottom:0px;}
a.link{color:#ffffff;text-decoration:none;}
a.link:hover{color:#00ff00;text-decoration:none;}
.taba{border:#cccccc 1px solid;font-size:12px;background-color:#ffffff;margin-left:10px;}
.tabb{font-size:12px;background-color:#ffffff;margin:10px 0px 10px 10px;}
.tabc{border:#cccccc 1px solid;font-size:12px;background-color:#ffffff;}
.tabd{border:#cccccc 1px solid;font-size:12px;background-color:#ffffff;margin-top:15px;margin-left:10px;margin-bottom:15px;}
.tda{border:#cccccc 1px solid;font-size:12px;background-color:#cccccc;color:#ffffff;height:20px;}
.tdb{border:#ebebeb 1px solid;font-size:12px;background-color:#ebebeb;color:#e54646;height:20px;}
td{padding-left:2px;padding-right:2px;padding-top:2px;padding-bottom:2px;}
input{border:#cccccc 1px solid;font-size:12px;background-color:#ffffff;}
.red{font-size:12px;color:red;font-family:arial;}
.green{font-size:12px;color:green;font-family:arial;}
-->
</style>
</head>
<body>
<%
  call jtb_main()
%>
</body>
</html>
