Class: Ronin::Recon::DNS::Lookup

Inherits:
Ronin::Recon::DNSWorker show all
Defined in:
lib/ronin/recon/builtin/dns/lookup.rb

Overview

Looks up the IP address of a host name, domain, nameserver, or mailserver.

Constant Summary

Constants included from Mixins::DNS

Mixins::DNS::IDN, Mixins::DNS::RECORD_TYPES

Instance Attribute Summary

Attributes included from Mixins::DNS

#dns_resolver

Instance Method Summary collapse

Methods included from Mixins::DNS

#dns_get_a_address, #dns_get_a_addresses, #dns_get_a_record, #dns_get_a_records, #dns_get_aaaa_address, #dns_get_aaaa_addresses, #dns_get_aaaa_record, #dns_get_aaaa_records, #dns_get_address, #dns_get_addresses, #dns_get_any_records, #dns_get_cname, #dns_get_cname_record, #dns_get_hinfo_record, #dns_get_loc_record, #dns_get_mailservers, #dns_get_minfo_record, #dns_get_mx_records, #dns_get_name, #dns_get_names, #dns_get_nameservers, #dns_get_ns_records, #dns_get_ptr_name, #dns_get_ptr_names, #dns_get_ptr_record, #dns_get_ptr_records, #dns_get_record, #dns_get_records, #dns_get_soa_record, #dns_get_srv_records, #dns_get_txt_record, #dns_get_txt_records, #dns_get_txt_string, #dns_get_txt_strings, #dns_get_wks_records, #initialize

Methods inherited from Worker

accepts, concurrency, #initialize, intensity, outputs, register, run

Instance Method Details

#process(host) {|ip| ... } ⇒ Object

Resolves the IP address for the given host.

Parameters:

Yields:

  • (ip)

Yield Parameters:



54
55
56
57
58
59
60
# File 'lib/ronin/recon/builtin/dns/lookup.rb', line 54

def process(host)
  addresses = dns_get_addresses(host.name)

  addresses.each do |address|
    yield IP.new(address, host: host.name)
  end
end