diff --git a/modules/auxiliary/gather/dns_info.rb b/modules/auxiliary/gather/dns_info.rb index e1d37e3949..836bd4119a 100644 --- a/modules/auxiliary/gather/dns_info.rb +++ b/modules/auxiliary/gather/dns_info.rb @@ -124,6 +124,7 @@ class Metasploit3 < Msf::Auxiliary query = @res.search(host, "A") if query query.answer.each do |rr| + next unless rr.type == "A" record = {} record[:host] = host record[:type] = "A" @@ -134,6 +135,7 @@ class Metasploit3 < Msf::Auxiliary query1 = @res.search(host, "AAAA") if query1 query1.answer.each do |rr| + next unless rr.type == "AAAA" record = {} record[:host] = host record[:type] = "AAAA" @@ -189,6 +191,7 @@ class Metasploit3 < Msf::Auxiliary query = @res.query(target, "TXT") return results if not query query.answer.each do |rr| + next unless rr.type == "TXT" record = {} record[:host] = target record[:text] = rr.txt