Skip to content

Commit

Permalink
Merge branch 'dns_enum_over_tcp' of https://github.com/sempervictus/m…
Browse files Browse the repository at this point in the history
…etasploit-framework into sempervictus-dns_enum_over_tcp
  • Loading branch information
sinn3r committed Jun 18, 2012
2 parents 5afdc23 + c68476c commit 10b733e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions modules/auxiliary/gather/enum_dns.rb
Expand Up @@ -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', [ 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]), 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) ], self.class)
end end


Expand Down Expand Up @@ -468,6 +469,10 @@ def axfr(target, nssrv)


def run def run
@res = Net::DNS::Resolver.new() @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 = datastore['RETRY'].to_i
@res.retry_interval = datastore['RETRY_INTERVAL'].to_i @res.retry_interval = datastore['RETRY_INTERVAL'].to_i
@threadnum = datastore['THREADS'].to_i @threadnum = datastore['THREADS'].to_i
Expand Down
2 changes: 1 addition & 1 deletion modules/auxiliary/scanner/telnet/telnet_version.rb
Expand Up @@ -42,7 +42,7 @@ def run_host(ip)
::Timeout.timeout(to) do ::Timeout.timeout(to) do
res = connect res = connect
# This makes db_services look a lot nicer. # This makes db_services look a lot nicer.
banner_santized = Rex::Text.to_hex_ascii(banner.to_s.unpack('C*').pack('U*')) banner_santized = Rex::Text.to_hex_ascii(banner.to_s)
print_status("#{ip}:#{rport} TELNET #{banner_santized}") print_status("#{ip}:#{rport} TELNET #{banner_santized}")
report_service(:host => rhost, :port => rport, :name => "telnet", :info => banner_santized) report_service(:host => rhost, :port => rport, :name => "telnet", :info => banner_santized)
end end
Expand Down

0 comments on commit 10b733e

Please sign in to comment.