Skip to content

Commit 7abfb6c

Browse files
committed
Return nil on error to avoid another exception
1 parent d4378d6 commit 7abfb6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/auxiliary/scanner/smb/smb_enumusers_domain.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def run_service(port, direct)
8787
rescue ::Timeout::Error
8888
rescue ::Exception => e
8989
print_error("Error: #{e.class} #{e}")
90+
nil
9091
ensure
9192
disconnect_wkssvc
9293
end
@@ -100,7 +101,6 @@ def run_host(_ip)
100101
end
101102

102103
unless results.to_s.empty?
103-
104104
accounts = [ Hash.new() ]
105105
results.compact.each do |result_set|
106106
result_set.each { |result| accounts << {

0 commit comments

Comments
 (0)