Permalink
Browse files

Add DNS/TCP to enum_dns

  • Loading branch information...
1 parent 9096145 commit c68476cce2304d264437d8aa4511d72cf9e72c23 RageLtMan committed Jun 18, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 modules/auxiliary/gather/enum_dns.rb
@@ -54,6 +54,7 @@ def initialize(info = {})
[
OptInt.new('RETRY', [ false, "Number of times to try to resolve a record if no response is received", 2]),
OptInt.new('RETRY_INTERVAL', [ false, "Number of seconds to wait before doing a retry", 2]),
+ OptBool.new('TCP_DNS', [false, "Run queries over TCP", false]),
], self.class)
end
@@ -468,6 +469,10 @@ def axfr(target, nssrv)
def run
@res = Net::DNS::Resolver.new()
+ if datastore['TCP_DNS']
+ vprint_good("Using DNS/TCP")
+ @res.use_tcp = true
+ end
@res.retry = datastore['RETRY'].to_i
@res.retry_interval = datastore['RETRY_INTERVAL'].to_i
@threadnum = datastore['THREADS'].to_i

0 comments on commit c68476c

Please sign in to comment.