diff --git a/modules/auxiliary/scanner/smb/smb_enumshares.rb b/modules/auxiliary/scanner/smb/smb_enumshares.rb index 1fe13d2f72..5e8457ee06 100644 --- a/modules/auxiliary/scanner/smb/smb_enumshares.rb +++ b/modules/auxiliary/scanner/smb/smb_enumshares.rb @@ -109,13 +109,14 @@ class Metasploit3 < Msf::Auxiliary disconnect return + rescue ::Timeout::Error rescue ::Interrupt raise $! rescue ::Rex::ConnectionError rescue ::Rex::Proto::SMB::Exceptions::LoginError next rescue ::Exception => e - print_line("Error: #{ip} #{e.class} #{e} #{e.backtrace}") + print_line("Error: #{ip} #{e.class} #{e}") end end end diff --git a/modules/auxiliary/scanner/smb/smb_enumusers.rb b/modules/auxiliary/scanner/smb/smb_enumusers.rb index 1cf7b7f0fd..5cb9139ccd 100644 --- a/modules/auxiliary/scanner/smb/smb_enumusers.rb +++ b/modules/auxiliary/scanner/smb/smb_enumusers.rb @@ -315,13 +315,14 @@ class Metasploit3 < Msf::Auxiliary # cleanup disconnect return + rescue ::Timeout::Error rescue ::Interrupt raise $! rescue ::Rex::ConnectionError rescue ::Rex::Proto::SMB::Exceptions::LoginError next rescue ::Exception => e - print_line("Error: #{ip} #{e.class} #{e} #{e.backtrace}") + print_line("Error: #{ip} #{e.class} #{e}") end end end diff --git a/modules/auxiliary/scanner/smb/smb_lookupsid.rb b/modules/auxiliary/scanner/smb/smb_lookupsid.rb index ad3b386402..e62324bb45 100644 --- a/modules/auxiliary/scanner/smb/smb_lookupsid.rb +++ b/modules/auxiliary/scanner/smb/smb_lookupsid.rb @@ -256,13 +256,14 @@ class Metasploit3 < Msf::Auxiliary # cleanup disconnect return + rescue ::Timeout::Error rescue ::Interrupt raise $! rescue ::Rex::ConnectionError rescue ::Rex::Proto::SMB::Exceptions::LoginError next rescue ::Exception => e - print_line("Error: #{ip} #{e.class} #{e} #{e.backtrace}") + print_line("Error: #{ip} #{e.class} #{e}") end end end diff --git a/modules/auxiliary/scanner/smb/smb_version.rb b/modules/auxiliary/scanner/smb/smb_version.rb index 87556ce454..605d38ce9e 100644 --- a/modules/auxiliary/scanner/smb/smb_version.rb +++ b/modules/auxiliary/scanner/smb/smb_version.rb @@ -128,10 +128,11 @@ class Metasploit3 < Msf::Auxiliary end return + rescue ::Timeout::Error rescue ::Rex::ConnectionError next rescue ::Exception => e - print_error("#{rhost}: #{e.class} #{e} #{e.backtrace}") + print_error("#{rhost}: #{e.class} #{e}") ensure disconnect end