![](/img/trans.png)
[英]How can I get the list of computer names in Windows Network using Ruby
[英]How to get a list of IPs for a remote computer in Ruby
我有一個需要通過套接字連接到具有多個IP地址的遠程計算機的應用程序。 有沒有辦法將遠程主機名或IP變成系統具有的所有IP的列表?
可能(主機名| IP)=>(RemoteMAC)=> IP?
這些將是Windows Server 2003/2008計算機。
require 'resolv-replace'
Resolv::DNS.new.each_address("oreilly.com") { |addr| puts addr }
產生:
208.201.239.101
208.201.239.100
http://codeidol.com/other/rubyckbk/Internet-Services/Performing-DNS-Queries/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.