Class: Ronin::CLI::Commands::Dns Private
- Inherits:
-
ValueProcessorCommand
- Object
- Core::CLI::Command
- Ronin::CLI::Command
- ValueProcessorCommand
- Ronin::CLI::Commands::Dns
- Includes:
- DNS
- Defined in:
- lib/ronin/cli/commands/dns.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Queries DNS records for the given host name.
Usage
ronin dns [options] {HOST ... | --file FILE}
Options
-f, --file FILE Optional file to read values from
-N, --nameserver IP Send DNS queries to the nameserver
-t A|AAAA|ANY|CNAME|HINFO|LOC|MINFO|MX|NS|PTR|SOA|SRV|TXT|WKS,
--type Queries a specific type of DNS record
-h, --help Print help information
Arguments
HOST The host name to query
Constant Summary
Constants included from DNS
Instance Attribute Summary
Attributes included from DNS
Attributes inherited from ValueProcessorCommand
Instance Method Summary collapse
-
#process_value(host) ⇒ Object
private
Queries the given host.
-
#query_records(host) ⇒ Array<Resolv::DNS::Resource>
private
Queries the records for the given host name.
Methods included from DNS
included, #initialize, #print_record, #print_records, #resolver
Methods inherited from ValueProcessorCommand
#initialize, #process_file, #run
Instance Method Details
#process_value(host) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Queries the given host.
69 70 71 |
# File 'lib/ronin/cli/commands/dns.rb', line 69 def process_value(host) print_records(query_records(host)) end |
#query_records(host) ⇒ Array<Resolv::DNS::Resource>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Queries the records for the given host name.
82 83 84 85 86 87 88 |
# File 'lib/ronin/cli/commands/dns.rb', line 82 def query_records(host) if [:type] resolver.get_records(host,[:type].downcase) else resolver.get_a_records(host) + resolver.get_aaaa_records(host) end end |