From 7bb3679fef74d98788c2879d2d1b47b9e257575d Mon Sep 17 00:00:00 2001 From: Tod Beardsley Date: Fri, 15 Jun 2012 18:10:21 -0500 Subject: [PATCH] Errors are different from mere failures (enum_dns) This makes a clear distinction between errors and failures when performing zone transfers, and logs accordingly. [See #483] --- modules/auxiliary/gather/enum_dns.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/auxiliary/gather/enum_dns.rb b/modules/auxiliary/gather/enum_dns.rb index be34269e76..c699a0bd5e 100644 --- a/modules/auxiliary/gather/enum_dns.rb +++ b/modules/auxiliary/gather/enum_dns.rb @@ -453,10 +453,11 @@ class Metasploit3 < Msf::Auxiliary end end else - print_error("Zone transfer failed") + print_error("Zone transfer failed (length was zero)") end - rescue - print_error("Zone transfer failed") + rescue Exception => e + print_error("Error executing zone transfer: #{e.message}") + elog("Error executing zone transfer: #{e.message}\n#{e.backtrace.join("\n")}") end end