开发者

Ruby net-dns reverse lookups

开发者 https://www.devze.com 2022-12-12 11:53 出处:网络
I am trying to get reverse DNS lookups working with the net-dns gem for ruby. From the rdoc 开发者_运维技巧

I am trying to get reverse DNS lookups working with the net-dns gem for ruby.

From the rdoc

开发者_运维技巧
res = Net::DNS::Resolver.new
ip = IPAddr.new("172.16.100.2")
packet = res.search(ip)
packet = res.search("192.168.10.254")

should work but I'm getting

ArgumentError: invalid address

for the last two lines.

This happens using a custom gem built from head of github source or the latest released version from

gem install net-dns


This is a known issue. It should be fixed soon.

0

精彩评论

暂无评论...
验证码 换一张
取 消