最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
用ASP做的DNS LOOKUP程序
时间:2022-06-30 11:27:48 编辑:袖梨 来源:一聚教程网
文章转译自ASP101
运行环境,NT(SERVER、WORKSTATION)、W2K
服务器上需要安装WSH2.0或者更高版本
如果您的系统目前没有安装WSH2.0,您可以从以下这个地址去下载它
http://www.mi*c*ro*soft.com/msdownload/vbscript/scripting.asp
里面包含了WSH2.0
下面是源代码
If Request.Form("frmHost") = "" Then
'设置初始值
strIP = Request.ServerVariables("REMOTE_ADDR")
Else
strIP = Request.Form("frmHost")
End If
%>
rMethod = uCase(Request.ServerVariables("REQUEST_METHOD"))
If rMethod = "POST" Then
' Lookup Host
strReturn = nsLookup(strIP)
If strReturn "" Then
Response.Write strReturn
Else
' A Lame Host is any Valid Host that DNS Cannot Resolve
' See InterNic for Details
Response.Write "Lame Host - Could Not Resolve DNS For " _
& strIP & "
"
End If
End If
Function NSlookup(strHost)
'Create Shell Object
Set oShell = Server.CreateObject("Wscript.Shell")
'Run NSLookup via Command Prompt
'Dump Results into a temp text file
相关文章
- Microsoft Copilot的实用边界:功能、限制与场景适配 06-18
- 《深岩银河》侦察武器加点方案推荐 06-18
- Google AI开发者体验:免费配额限制、模型选择与部署门槛 06-18
- Google AI开发者隐私风险:数据权限与模型输出边界说明 06-18
- 《星痕共鸣》S2赛季幻花异梦更新活动介绍 06-18
- Google AI开发者账号权限设置:配置要点与限制说明 06-18