Land #5369, @dmaloney-r7's snmp_login fixes

unstable
William Vu 2015-05-19 10:39:03 -05:00
commit c1b8cee315
No known key found for this signature in database
GPG Key ID: 68BD00CE25866743
4 changed files with 17 additions and 7 deletions

View File

@ -75,8 +75,10 @@ module Metasploit
def to_s
if realm && realm_key == Metasploit::Model::Realm::Key::ACTIVE_DIRECTORY_DOMAIN
"#{self.realm}\\#{self.public}:#{self.private}"
else
elsif self.private
"#{self.public}:#{self.private}#{at_realm}"
else
self.public
end
end

View File

@ -566,7 +566,6 @@ module Auxiliary::AuthBrute
else
level = opts[:level].to_s.strip
end
host_ip = opts[:ip] || opts[:rhost] || opts[:host] || (rhost rescue nil) || datastore['RHOST']
host_port = opts[:port] || opts[:rport] || (rport rescue nil) || datastore['RPORT']
msg = opts[:msg] || opts[:message] || opts[:legacy_msg]

View File

@ -12,10 +12,19 @@ module Auxiliary::Report
optionally_include_metasploit_credential_creation
def db_warning_given?
if @warning_issued
true
else
@warning_issued = true
false
end
end
def create_cracked_credential(opts={})
if active_db?
super(opts)
else
elsif !db_warning_given?
vprint_warning('No active DB -- Credential data will not be saved!')
end
end
@ -23,7 +32,7 @@ module Auxiliary::Report
def create_credential(opts={})
if active_db?
super(opts)
else
elsif !db_warning_given?
vprint_warning('No active DB -- Credential data will not be saved!')
end
end
@ -31,7 +40,7 @@ module Auxiliary::Report
def create_credential_login(opts={})
if active_db?
super(opts)
else
elsif !db_warning_given?
vprint_warning('No active DB -- Credential data will not be saved!')
end
end
@ -39,7 +48,7 @@ module Auxiliary::Report
def invalidate_login(opts={})
if active_db?
super(opts)
else
elsif !db_warning_given?
vprint_warning('No active DB -- Credential data will not be saved!')
end
end

View File

@ -85,7 +85,7 @@ class Metasploit3 < Msf::Auxiliary
print_good "#{ip}:#{rport} - LOGIN SUCCESSFUL: #{result.credential} (Access level: #{result.access_level})"
else
invalidate_login(credential_data)
vprint_error "#{ip}:#{rport} - LOGIN FAILED: #{result.credential} (#{result.status}: #{result.proof})"
print_error "#{ip}:#{rport} - LOGIN FAILED: #{result.credential} (#{result.status})"
end
end
end