Added extra logic and fixes for user supplied domains option

unstable
Meatballs1 2012-07-02 10:15:58 +01:00
parent b549c9b767
commit 5c2c1ccc39
1 changed files with 12 additions and 2 deletions

View File

@ -79,8 +79,18 @@ class Metasploit3 < Msf::Post
domains.reject!{|n| n == "WORKGROUP" || n.to_s.empty?}
end
datastore['DOMAINS'].split('').each{|ud| domains << ud} if datastore['DOMAINS']
# Add user specified domains to list.
if datastore['DOMAINS']
user_domains = datastore['DOMAINS'].split(' ')
print_status "Looking for the user supplied domains: #{user_domains}"
user_domains.each{|ud| domains << ud} if datastore['DOMAINS']
end
# If we find a local policy store then assume we are on DC and do not wish to enumerate the current DC again.
if locals.blank?
domains << get_domain_reg
end
domains.flatten!
domains.compact!
domains.uniq!