![](/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.