Operating environment, NT (SERVER, WORKSTATION), W2K
WSH2.0 or higher is required to be installed on the server
If your system does not currently have WSH2.0 installed, you can download it from the following address
http://www.microsoft.com/msdownload/vbscript/scripting.asp
WSH2.0 is included
Below is the source code
<%@Language="VBScript"%>
<%OptionExplicit%>
<%
IfRequest.Form("frmHost")=""Then
'Set the initial value
strIP=Request.ServerVariables("REMOTE_ADDR")
Else
strIP=Request.Form("frmHost")
EndIf
%>
<html>
<head>
<title>DNSLookup[v1.0]</title>
</head>
<bodybgcolor="#FFFFFF">
<formMethod="POST"Name="frmRDNS">
<labelfor="frmHost"><u>Host:</u></label>
<inputtype="text"name="frmHost"ID="frmHost"
value="<%=strIP%>">
<inputtype="button"name="btnSubmit"ID="btnSubmit"
value="Lookup"onClick="document.frmRDNS.submit()">
</form>
<fontface="arial"size="2"color="#003366">
<%
rMethod=uCase(Request.ServerVariables("REQUEST_METHOD"))
IfrMethod="POST"Then
'LookupHost
strReturn=nsLookup(strIP)
IfstrReturn<>""Then
Response.WritesstrReturn
Else
'ALameHostisanyValidHostthatDNSCannotResolve
'SeeInterNicforDetails
Response.Write"<b>LameHost-CouldNotResolveDNSFor"_
&strIP&"</b><br>"
EndIf
EndIf
FunctionNSlookup(strHost)
'CreateShellObject
SetoShell=Server.CreateObject("Wscript.Shell")
'RunNSLookupviaCommandPrompt
'DumpResultsintoatemptextfile
oShell.Run"%ComSpec%/cnslookup"&strHost_