Applied fixes
parent
166b59b61a
commit
55efe01bf7
|
@ -40,18 +40,23 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
def run
|
def run
|
||||||
print_status("Enumerating #{datastore['DOMAIN']}")
|
print_status("Enumerating #{datastore['DOMAIN']}")
|
||||||
@res = Net::DNS::Resolver.new()
|
@res = Net::DNS::Resolver.new()
|
||||||
@res.retry = datastore['RETRY'].to_i
|
|
||||||
@res.retry_interval = datastore['RETRY_INTERVAL'].to_i
|
if datastore['RETRY']
|
||||||
|
@res.retry = datastore['RETRY'].to_i
|
||||||
|
end
|
||||||
|
|
||||||
|
if datastore['RETRY_INTERVAL']
|
||||||
|
@res.retry_interval = datastore['RETRY_INTERVAL'].to_i
|
||||||
|
end
|
||||||
|
|
||||||
wildcard(datastore['DOMAIN'])
|
wildcard(datastore['DOMAIN'])
|
||||||
switchdns() if not datastore['NS'].nil?
|
switchdns() if not datastore['NS'].nil?
|
||||||
|
|
||||||
# Get A and AAAA Records for the domain
|
|
||||||
get_ip(datastore['DOMAIN']).each do |r|
|
get_ip(datastore['DOMAIN']).each do |r|
|
||||||
print_good("#{r[:host]} #{r[:address]} #{r[:type]}")
|
print_good("#{r[:host]} #{r[:address]} #{r[:type]}")
|
||||||
report_host(:host => r[:address])
|
report_host(:host => r[:address])
|
||||||
end
|
end
|
||||||
|
|
||||||
# Get Name Servers
|
|
||||||
get_ns(datastore['DOMAIN']).each do |r|
|
get_ns(datastore['DOMAIN']).each do |r|
|
||||||
print_good("#{r[:host]} #{r[:address]} #{r[:type]}")
|
print_good("#{r[:host]} #{r[:address]} #{r[:type]}")
|
||||||
report_host(:host => r[:address], :name => r[:host])
|
report_host(:host => r[:address], :name => r[:host])
|
||||||
|
@ -63,13 +68,11 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Get SOA
|
|
||||||
get_soa(datastore['DOMAIN']).each do |r|
|
get_soa(datastore['DOMAIN']).each do |r|
|
||||||
print_good("#{r[:host]} #{r[:address]} #{r[:type]}")
|
print_good("#{r[:host]} #{r[:address]} #{r[:type]}")
|
||||||
report_host(:host => r[:address], :name => r[:host])
|
report_host(:host => r[:address], :name => r[:host])
|
||||||
end
|
end
|
||||||
|
|
||||||
#Get MX
|
|
||||||
get_mx(datastore['DOMAIN']).each do |r|
|
get_mx(datastore['DOMAIN']).each do |r|
|
||||||
print_good("#{r[:host]} #{r[:address]} #{r[:type]}")
|
print_good("#{r[:host]} #{r[:address]} #{r[:type]}")
|
||||||
report_host(:host => r[:address], :name => r[:host])
|
report_host(:host => r[:address], :name => r[:host])
|
||||||
|
@ -81,10 +84,12 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Get TX
|
|
||||||
get_txt(datastore['DOMAIN']).each do |r|
|
get_txt(datastore['DOMAIN']).each do |r|
|
||||||
print_good("#{r[:host]} #{r[:address]} #{r[:type]}")
|
report_note(:host => datastore['DOMAIN'],
|
||||||
report_host(:host => r[:address], :name => r[:host])
|
:proto => 'UDP',
|
||||||
|
:port => 53,
|
||||||
|
:type => 'dns.info',
|
||||||
|
:data => {:text => r[:text]})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -175,12 +180,19 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
def get_txt(target)
|
def get_txt(target)
|
||||||
|
results = []
|
||||||
query = @res.query(target, "TXT")
|
query = @res.query(target, "TXT")
|
||||||
if (query)
|
if (query)
|
||||||
query.answer.each do |rr|
|
query.answer.each do |rr|
|
||||||
|
record = {}
|
||||||
print_good("Text: #{rr.txt}, TXT")
|
print_good("Text: #{rr.txt}, TXT")
|
||||||
|
record[:host] = target
|
||||||
|
record[:text] = rr.txt
|
||||||
|
record[:type] = "TXT"
|
||||||
|
results << record
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
return results
|
||||||
end
|
end
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue