2004/11/11 | aspcheck
类别(我的工作) | 评论(0) | 阅读(41) | 发表于 09:20
<%@ Language="VBScript" %> <% '#################################### '# # '# 阿江ASP探针 V1.8 # '# 040606 # '# 阿江守候 http://www.ajiang.net # '# 电子邮件 info@ajiang.net # '# # '# 转载本程序时请保留这些信息 # '# # '#################################### ' 使用输出缓冲区,避免在WIN2003显示过慢 Response.Buffer = true ' 声明待检测数组 Dim ObjTotest(26,4) ObjTotest(0,0) = "MSWC.AdRotator" ObjTotest(1,0) = "MSWC.BrowserType" ObjTotest(2,0) = "MSWC.NextLink" ObjTotest(3,0) = "MSWC.Tools" ObjTotest(4,0) = "MSWC.Status" ObjTotest(5,0) = "MSWC.Counters" ObjTotest(6,0) = "IISSample.ContentRotator" ObjTotest(7,0) = "IISSample.PageCounter" ObjTotest(8,0) = "MSWC.PermissionChecker" ObjTotest(9,0) = "Scripting.FileSystemObject" ObjTotest(9,1) = "(FSO 文本文件读写)" ObjTotest(10,0) = "adodb.connection" ObjTotest(10,1) = "(ADO 数据对象)" ObjTotest(11,0) = "SoftArtisans.FileUp" ObjTotest(11,1) = "(SA-FileUp 文件上传)" ObjTotest(12,0) = "SoftArtisans.FileManager" ObjTotest(12,1) = "(SoftArtisans 文件管理)" ObjTotest(13,0) = "LyfUpload.UploadFile" ObjTotest(13,1) = "(刘云峰的文件上传组件)" ObjTotest(14,0) = "Persits.Upload.1" ObjTotest(14,1) = "(ASPUpload 文件上传)" ObjTotest(15,0) = "w3.upload" ObjTotest(15,1) = "(Dimac 文件上传)" ObjTotest(16,0) = "JMail.SmtpMail" ObjTotest(16,1) = "(Dimac JMail 邮件收发) 中文手册下载" ObjTotest(17,0) = "CDONTS.NewMail" ObjTotest(17,1) = "(虚拟 SMTP 发信)" ObjTotest(18,0) = "Persits.MailSender" ObjTotest(18,1) = "(ASPemail 发信)" ObjTotest(19,0) = "SMTPsvg.Mailer" ObjTotest(19,1) = "(ASPmail 发信)" ObjTotest(20,0) = "DkQmail.Qmail" ObjTotest(20,1) = "(dkQmail 发信)" ObjTotest(21,0) = "Geocel.Mailer" ObjTotest(21,1) = "(Geocel 发信)" ObjTotest(22,0) = "IISmail.Iismail.1" ObjTotest(22,1) = "(IISmail 发信)" ObjTotest(23,0) = "SmtpMail.SmtpMail.1" ObjTotest(23,1) = "(SmtpMail 发信)" ObjTotest(24,0) = "SoftArtisans.ImageGen" ObjTotest(24,1) = "(SA 的图像读写组件)" ObjTotest(25,0) = "W3Image.Image" ObjTotest(25,1) = "(Dimac 的图像读写组件)" public IsObj,VerObj,TestObj public okOS,okCPUS,okCPU '检查预查组件支持情况及版本 dim i for i=0 to 25 on error resume next IsObj=false VerObj="" 'dim TestObj TestObj="" set TestObj=server.CreateObject(ObjTotest(i,0)) If -2147221005 <> Err then '感谢网友iAmFisher的宝贵建议 IsObj = True VerObj = TestObj.version if VerObj="" or isnull(VerObj) then VerObj=TestObj.about end if ObjTotest(i,2)=IsObj ObjTotest(i,3)=VerObj next '检查组件是否被支持及组件版本的子程序 sub ObjTest(strObj) on error resume next IsObj=false VerObj="" TestObj="" set TestObj=server.CreateObject (strObj) If -2147221005 <> Err then '感谢网友iAmFisher的宝贵建议 IsObj = True VerObj = TestObj.version if VerObj="" or isnull(VerObj) then VerObj=TestObj.about end if End sub %> ASP探针V1.8-阿江http://www.ajiang.net 阿江改写的ASP探针-V1.8

是否支持ASP
出现以下情况即表示您的空间不支持ASP:
1、访问本文件时提示下载。
2、访问本文件时看到类似“<%@ Language="VBScript" %>”的文字。

服务器的有关参数
<%getsysinfo() '获得服务器数据%>
 服务器名 <%=Request.ServerVariables("SERVER_NAME")%>
 服务器IP <%=Request.ServerVariables("LOCAL_ADDR")%>
 服务器端口 <%=Request.ServerVariables("SERVER_PORT")%>
 服务器时间 <%=now%>
 IIS版本 <%=Request.ServerVariables("SERVER_SOFTWARE")%>
 脚本超时时间 <%=Server.ScriptTimeout%> 秒
 本文件路径 <%=Request.ServerVariables("PATH_TRANSLATED")%>
 服务器解译引擎 <%=ScriptEngine & "/"& ScriptEngineMajorVersion &"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %>
 服务器CPU数量 <%=okCPUS%> 个
 服务器CPU详情 <%=okCPU%>
 服务器操作系统 <%=okOS%>

组件支持情况 <% Dim strClass strClass = Trim(Request.Form("classname")) If "" <> strClass then Response.Write "
您指定的组件的检查结果:" Dim Verobj1 ObjTest(strClass) If Not IsObj then Response.Write "
很遗憾,该服务器不支持 " & strclass & " 组件!" Else if VerObj="" or isnull(VerObj) then Verobj1="无法取得该组件版本" Else Verobj1="该组件版本是:" & VerObj End If Response.Write "
恭喜!该服务器支持 " & strclass & " 组件。" & verobj1 & "" End If Response.Write "
" end if %>
■ IIS自带的ASP组件 <%For i=0 to 10%> <%next%>
组 件 名 称支持及版本
 <%=ObjTotest(i,0) & " " & ObjTotest(i,1)%>  <% If Not ObjTotest(i,2) Then Response.Write "×" Else Response.Write " " & left(ObjTotest(i,3),11) & "" End If%>

■ 常见的文件上传和管理组件 <%For i=11 to 15%> <%next%>
组 件 名 称支持及版本
 <%=ObjTotest(i,0) & " " & ObjTotest(i,1)%>  <% If Not ObjTotest(i,2) Then Response.Write "×" Else Response.Write " " & left(ObjTotest(i,3),11) & "" End If%>

■ 常见的收发邮件组件 <%For i=16 to 23%> <%next%>
组 件 名 称支持及版本
 <%=ObjTotest(i,0) & " " & ObjTotest(i,1)%>  <% If Not ObjTotest(i,2) Then Response.Write "×" Else Response.Write " " & left(ObjTotest(i,3),11) & "" End If%>

■ 图像处理组件 <%For i=24 to 25%> <%next%>
组 件 名 称支持及版本
 <%=ObjTotest(i,0) & " " & ObjTotest(i,1)%>  <% If Not ObjTotest(i,2) Then Response.Write "×" Else Response.Write " " & left(ObjTotest(i,3),11) & "" End If%>

■ 其他组件支持情况检测
在下面的输入框中输入你要检测的组件的ProgId或ClassId。 method=post id=form1 name=form1>
<% Response.Flush if ObjTest("Scripting.FileSystemObject") then set fsoobj=server.CreateObject("Scripting.FileSystemObject") %>
磁盘相关测试
■ 服务器磁盘信息 <% ' 测试磁盘信息的想法来自“COCOON ASP 探针” set drvObj=fsoobj.Drives for each d in drvObj %> <% if d.DriveLetter = "A" then '为防止影响服务器,不检查软驱 Response.Write "" else %> <% end if %> <% next %>
盘符和磁盘类型 就绪 卷标 文件系统 可用空间 总空间
<%=cdrivetype(d.DriveType) & " " & d.DriveLetter%>:<%=cIsReady(d.isReady)%> <%=d.VolumeName%> <%=d.FileSystem%> <%=cSize(d.FreeSpace)%> <%=cSize(d.TotalSize)%>

■ 当前文件夹信息 <% Response.Flush dPath = server.MapPath("./") set dDir = fsoObj.GetFolder(dPath) set dDrive = fsoObj.GetDrive(dDir.Drive) %> 文件夹: <%=dPath%>
已用空间 可用空间 文件夹数 文件数 创建时间
<%=cSize(dDir.Size)%> <%=cSize(dDrive.AvailableSpace)%> <%=dDir.SubFolders.Count%> <%=dDir.Files.Count%> <%=dDir.DateCreated%>

■ 磁盘文件操作速度测试
<% Response.Flush ' 测试文件读写的想法来自“迷城浪子” Response.Write "正在重复创建、写入和删除文本文件50次..." dim thetime3,tempfile,iserr iserr=false t1=timer tempfile=server.MapPath("./") & "\aspchecktest.txt" for i=1 to 50 Err.Clear set tempfileOBJ = FsoObj.CreateTextFile(tempfile,true) if Err <> 0 then Response.Write "创建文件错误!

" iserr=true Err.Clear exit for end if tempfileOBJ.WriteLine "Only for test. Ajiang ASPcheck" if Err <> 0 then Response.Write "写入文件错误!

" iserr=true Err.Clear exit for end if tempfileOBJ.close Set tempfileOBJ = FsoObj.GetFile(tempfile) tempfileOBJ.Delete if Err <> 0 then Response.Write "删除文件错误!

" iserr=true Err.Clear exit for end if set tempfileOBJ=nothing next t2=timer if iserr <> true then thetime3=cstr(int(( (t2-t1)*10000 )+0.5)/10) Response.Write "...已完成!" & thetime3 & "毫秒
" Response.Flush %>
供 对 照 的 服 务 器 完成时间(毫秒)
 华东数据hdidc.com主机 双至强2.4,1GddrEcc,SCSI36.4G) 32~75
 新丰信息港付费ASP+CGI空间 46~62
 68互联 78
 第5空间diy5.com四至强主机(P42.4,2GddrEcc,SCSI72.8G) 46~78
 百优科技 100u 主机 31~62
 点击网络主机 31~62
 这台服务器: <%=Request.ServerVariables("SERVER_NAME")%>  <%=thetime3%>
<% end if Response.Flush set fsoobj=nothing end if%>
ASP脚本解释和运算速度测试
<% Response.Flush '感谢网际同学录 http://www.5719.net 推荐使用timer函数 '因为只进行50万次计算,所以去掉了是否检测的选项而直接检测 Response.Write "整数运算测试,正在进行50万次加法运算..." dim t1,t2,lsabc,thetime,thetime2 t1=timer for i=1 to 500000 lsabc= 1 + 1 next t2=timer thetime=cstr(int(( (t2-t1)*10000 )+0.5)/10) Response.Write "...已完成!" & thetime & "毫秒
" Response.Write "浮点运算测试,正在进行20万次开方运算..." t1=timer for i=1 to 200000 lsabc= 2^0.5 next t2=timer thetime2=cstr(int(( (t2-t1)*10000 )+0.5)/10) Response.Write "...已完成!" & thetime2 & "毫秒
" %>
供对照的服务器及完成时间(毫秒) 整数运算浮点运算
 百优科技 100u 主机, 2003-11-1 181~233 156~218
 西部数码 west263 主机, 2003-11-1 171~233 156~171
 联网科技 linkwww 主机, 2003-11-1 181~203 171
 就是我www.9s5.com全功能(ASP+PHP+JSP)主机,2003-11-1 171~187 156~171
 永讯网络 Dnsmy 主机, 2003-11-1 155~180 122~172
 数据互联 Hostidc.net 主机, 2004-3-28 156~171 140~156
 这台服务器: <%=Request.ServerVariables("SERVER_NAME")%>  <%=thetime%> <%=thetime2%>

[提醒·说明]  [更多空间商即时实测数据]  [查看下载最新版]

欢迎访问 【阿江守候】 http://www.ajiang.net
本程序由阿江(info@ajiang.net)编写,转载时请保留这些信息
<% function cdrivetype(tnum) Select Case tnum Case 0: cdrivetype = "未知" Case 1: cdrivetype = "可移动磁盘" Case 2: cdrivetype = "本地硬盘" Case 3: cdrivetype = "网络磁盘" Case 4: cdrivetype = "CD-ROM" Case 5: cdrivetype = "RAM 磁盘" End Select end function function cIsReady(trd) Select Case trd case true: cIsReady="" case false: cIsReady="×" 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 sub getsysinfo() on error resume next Set WshShell = server.CreateObject("WScript.Shell") Set WshSysEnv = WshShell.Environment("SYSTEM") okOS = cstr(WshSysEnv("OS")) okCPUS = cstr(WshSysEnv("NUMBER_OF_PROCESSORS")) okCPU = cstr(WshSysEnv("PROCESSOR_IDENTIFIER")) if isnull(okCPUS) then okCPUS = Request.ServerVariables("NUMBER_OF_PROCESSORS") elseif okCPUS="" then okCPUS = Request.ServerVariables("NUMBER_OF_PROCESSORS") end if if Request.ServerVariables("OS")="" then okOS=okOS & "(可能是 Windows Server 2003)" end sub %>
0

评论Comments

日志分类
首页[141]
我的日志[1]