Tutorial :Ruby net-dns reverse lookups



Question:

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  


Solution:1

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


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »