Questions tagged [resolv]

25 questions
1
vote
2 answers

Increasing Ruby Resolv Speed

Im trying to build a sub-domain brute forcer for use with my clients - I work in security/pen testing. Currently, I am able to get Resolv to look up around 70 hosts in 10 seconds, give or take and wanted to know if there was a way to get it to do…
hatlord
  • 151
  • 2
  • 9
1
vote
1 answer

Resolv::DNS not resolving PTR for 192.168.x

This is my test code: require 'resolv' puts `dig @172.17.0.40 -x 203.208.60.1 +short` puts `dig @172.17.0.40 -x 192.168.12.100 +short` resolver = Resolv::DNS.new( :nameserver => ['172.17.0.40'], :search => ['example.com'], :ndots => 1 …
Jon Skarpeteig
  • 4,118
  • 7
  • 34
  • 53
1
vote
1 answer

Ruby resolv library how to exclude non-IPv4 addresses

I want to use Resolv library to resolve hostnames including 'localhost' but it lists non-IPv4 addresses also. I want to find out first IPv4 address. Looked at the library but could not find a way to do so. Does anyone know of a way to do this or…
Paddy
  • 3,472
  • 5
  • 29
  • 48
1
vote
1 answer

Extending Resolv::DNS to also get SPF resources

I am trying to extend Resolv::DNS to be able to get SPF resources. For this, I've simply added the following: class Resolv::DNS::Resource::IN::SPF < Resolv::DNS::Resource::IN::TXT end class Resolv::DNS::Resource::SPF <…
pdu
  • 10,295
  • 4
  • 58
  • 95
0
votes
0 answers

podman resolv.conf is different from host

The content of /etc/resolv.conf is different inside the container from what it is on the host. The "search" domains are missing in the resolv.conf inside the container resulting in failure of name resolution unless I use fully qualified domain…
mickey
  • 31
  • 1
  • 7
0
votes
0 answers

OCI: Cannot add search domain to resolv.conf using terraform

The documentation for OCI terraform says that I can add a search domain to resolv.conf but I cannot get this working. https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/core_dhcp_options resource "oci_core_dhcp_options"…
paradroid
  • 219
  • 3
  • 12
0
votes
1 answer

Resolving a CAA DNS record in Ruby

I'm trying to use the Ruby library to lookup the CAA record for a domain. I was expecting it to look something like this: Resolv::DNS.open do |dns| ress = dns.getresources "ruby-lang.org", Resolv::DNS::Resource::CAA p…
Tom Rossi
  • 11,604
  • 5
  • 65
  • 96
0
votes
1 answer

Header file missing value in resolv.h

Code I was trying to implement this code: void findNameServers(domain, nsList, nsNum) char *domain; char *nsList[]; int *nsNum; { union { HEADER hdr; /* defined in resolv.h */ u_char buf[NS_PACKETSZ]; /* defined in…
rlorez
  • 9
  • 2
0
votes
1 answer

RVM cannot load such file -- win32/resolv (LoadError)

I used RVM to install ruby 2.2.3. It successfully installed, but when I run gem install rails (or any gem for that matter), it gives me this error: $ gem install…
0
votes
1 answer

Resolv::DNS - How to handle timeouts, errors

I'm using the following function in Ruby on Rails: def isGoogleEmailAddress?(email_domain) Resolv::DNS.open({:nameserver=>["8.8.8.8"]}) do |r| mx = r.getresources(email_domain,Resolv::DNS::Resource::IN::MX) if mx.any? {|server|…
AnApprentice
  • 108,152
  • 195
  • 629
  • 1,012
1
2