Save ref names for easier debugging
parent
176cdcb836
commit
adcf88761d
|
@ -118,15 +118,17 @@ module Msf::DBManager::ExploitAttempt
|
||||||
username = opts.delete(:username)
|
username = opts.delete(:username)
|
||||||
mname = opts.delete(:module)
|
mname = opts.delete(:module)
|
||||||
|
|
||||||
if not vuln
|
if ! vuln.nil?
|
||||||
# Create a references map from the module list
|
ref_names = mrefs.map { |ref|
|
||||||
ref_objs = ::Mdm::Ref.where(:name => mrefs.map { |ref|
|
|
||||||
if ref.respond_to?(:ctx_id) and ref.respond_to?(:ctx_val)
|
if ref.respond_to?(:ctx_id) and ref.respond_to?(:ctx_val)
|
||||||
"#{ref.ctx_id}-#{ref.ctx_val}"
|
"#{ref.ctx_id}-#{ref.ctx_val}"
|
||||||
else
|
else
|
||||||
ref.to_s
|
ref.to_s
|
||||||
end
|
end
|
||||||
})
|
}
|
||||||
|
|
||||||
|
# Create a references map from the module list
|
||||||
|
ref_objs = ::Mdm::Ref.where(name: ref_names)
|
||||||
|
|
||||||
# Try find a matching vulnerability
|
# Try find a matching vulnerability
|
||||||
vuln = find_vuln_by_refs(ref_objs, host, svc)
|
vuln = find_vuln_by_refs(ref_objs, host, svc)
|
||||||
|
|
Loading…
Reference in New Issue