Save ref names for easier debugging

bug/bundler_fix
James Lee 2015-03-31 13:07:09 -05:00
parent 176cdcb836
commit adcf88761d
No known key found for this signature in database
GPG Key ID: 2D6094C7CEA0A321
1 changed files with 6 additions and 4 deletions

View File

@ -118,15 +118,17 @@ module Msf::DBManager::ExploitAttempt
username = opts.delete(:username)
mname = opts.delete(:module)
if not vuln
# Create a references map from the module list
ref_objs = ::Mdm::Ref.where(:name => mrefs.map { |ref|
if ! vuln.nil?
ref_names = mrefs.map { |ref|
if ref.respond_to?(:ctx_id) and ref.respond_to?(:ctx_val)
"#{ref.ctx_id}-#{ref.ctx_val}"
else
ref.to_s
end
})
}
# Create a references map from the module list
ref_objs = ::Mdm::Ref.where(name: ref_names)
# Try find a matching vulnerability
vuln = find_vuln_by_refs(ref_objs, host, svc)