Skip to content

Commit 04552d7

Browse files
committed
windows/gather/enum_domains: Return early if no domains are found
1 parent 58d9820 commit 04552d7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

modules/post/windows/gather/enum_domains.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def initialize(info={})
2323

2424
def run
2525
domains = net_server_enum(SV_TYPE_DOMAIN_ENUM)
26+
return if domains.nil?
2627

2728
domains.each do |domain|
2829
print_status("Enumerating DCs for #{domain[:name]}")

0 commit comments

Comments
 (0)