Skip to content

Commit

Permalink
Return nil on error to avoid another exception
Browse files Browse the repository at this point in the history
  • Loading branch information
smcintyre-r7 committed Sep 17, 2024
1 parent d4378d6 commit 7abfb6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/auxiliary/scanner/smb/smb_enumusers_domain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def run_service(port, direct)
rescue ::Timeout::Error
rescue ::Exception => e
print_error("Error: #{e.class} #{e}")
nil
ensure
disconnect_wkssvc
end
Expand All @@ -100,7 +101,6 @@ def run_host(_ip)
end

unless results.to_s.empty?

accounts = [ Hash.new() ]
results.compact.each do |result_set|
result_set.each { |result| accounts << {
Expand Down

0 comments on commit 7abfb6c

Please sign in to comment.