운영 환경, NT (서버, 워크 스테이션), W2K
서버에 WSH2.0 이상을 설치해야합니다.
시스템이 현재 WSH2.0이 설치되지 않은 경우 다음 주소에서 다운로드 할 수 있습니다.
http://www.microsoft.com/msdownload/vbscript/scripting.asp
WSH2.0이 포함되어 있습니다
아래는 소스 코드입니다
<%@language = "vbscript"%>
<%옵션 출현%>
<%
ifrequest.form ( "frmhost") = ""그런 다음
'초기 값을 설정하십시오
strip = request.servervariables ( "remote_addr")
또 다른
strip = request.form ( "frmhost")
endif
%>
<html>
<헤드>
<title> dnslookup [v1.0] </title>
</head>
<bodybgcolor = "#ffffff">
<formmethod = "post"name = "frmrdns">
<labelfor = "frmhost"> <u> 호스트 : </u> </label>
<inputtype = "text"name = "frmhost"id = "frmhost"
값 = "<%= 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"입니다
'Lookuphost
strreturn = nslookup (스트립)
ifstrreturn <> ""그런 다음
응답 .writesstrreturn
또 다른
'AlameHostisanyValidHostthatdnscannotresold
'InternicfordeTails
response.write "<b> lamehost-couldnotresolvednsfor"_
& Strip & "</b> <br>"
endif
endif
functionnslookup (strhost)
'CreateShellObject
setoshell = server.createobject ( "wscript.shell")
'runnslookupviacommandPrompt
'dumpresultsintintemptextFile
OSHELL.RUN "%COMSPEC%/CNSLOOKUP"& strhost_