ReverseDnsLookup
ReverseDnsLookup 用于将 IP 地址解析为主机名。
语法
ReverseDnsLookup(IP)
返回结果
包含返回的主机名的字符串。
示例
非常简单的 dns 查找和反向查找:
函数 Main
Dim SocketObject As Object
Dim ServerName As String
Dim IP As String
Dim ResolvedName As String
'回车符和换行
cr = Chr(13) + Chr(10)
ServerName = "whois.networksolutions.com"
echo("Resolving"+cr)
Socket.SetTimeout 5000,5000
ip = socket.DnsLookup(ServerName)
echo(ServerName + " resolves to the IP Address:"+cr )
echo(ip +cr)
ResolvedName = Socket.ReverseDnsLookup(ip)
echo(cr)
echo("IP Address "+ip+ " resolves to "+cr)
echo(ResolvedName+cr)
End 函数