Check domain return value

bug/bundler_fix
Meatballs 2014-02-18 23:34:17 +00:00
parent e4aedfad43
commit ff4e91bb1b
No known key found for this signature in database
GPG Key ID: 5380EAF01F2F8B38
1 changed files with 5 additions and 2 deletions

View File

@ -46,9 +46,12 @@ class Metasploit3 < Msf::Post
sessions = net_session_enum(host, user)
elsif user
# Domain must be NETBIOS style rather than DNS style
domain = get_domain.split('.').first.upcase
domain = get_domain
unless domain.blank?
if domain.blank?
fail_with(Failure::Unknown, "Machine is not part of a domain.")
else
domain = domain.split('.').first.upcase
print_status("Using domain: #{domain}")
print_status("Getting list of domain hosts...")
end