国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

用ASP做的DNS LOOKUP程序

2024-05-04 11:01:48
字體:
來源:轉載
供稿:網友
運行環(huán)境,NT(SERVER、WORKSTATION)、W2K
服務器上需要安裝WSH2.0或者更高版本
如果您的系統(tǒng)目前沒有安裝WSH2.0,您可以從以下這個地址去下載它
http://www.microsoft.com/msdownload/vbscript/scripting.asp
里面包含了WSH2.0
下面是源代碼
<%@ Language="VBScript" %>
<% Option Explicit %>
<%
If Request.Form("frmHost") = "" Then
    '設置初始值 
    strIP = Request.ServerVariables("REMOTE_ADDR")
Else
    strIP = Request.Form("frmHost") 
End If
%>
<html>
<head>
    <title>DNS Lookup [v 1.0]</title>
</head>
<body bgcolor="#FFFFFF">
<form Method="POST" Name="frmRDNS">
    <label for="frmHost"><u>Host:</u></label>
    <input type="text" name="frmHost" ID="frmHost"
        value="<%= strIP  %>">
    <input type="button" name="btnSubmit" ID="btnSubmit"
        value="Lookup" onClick="document.frmRDNS.submit()">
</form>
<font face="arial" size="2" color="#003366">
<%
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 "<b>Lame Host - Could Not Resolve DNS For " _
            & strIP & "</b><br>"
    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
    oShell.Run "%ComSpec% /c nslookup " & strHost _
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 正阳县| 汉阴县| 黄骅市| 汤原县| 合作市| 维西| 临澧县| 基隆市| 汉源县| 苍南县| 康马县| 浮梁县| 同德县| 扬州市| 石屏县| 江华| 北宁市| 广宗县| 怀安县| 台江县| 青川县| 英德市| 桓台县| 额济纳旗| 桐乡市| 临漳县| 县级市| 荆州市| 吉林市| 和平区| 云安县| 赤水市| 博野县| 永康市| 文登市| 万宁市| 弋阳县| 密山市| 永登县| 周宁县| 米脂县|