Land #11768, implement faster compatible payload logic
commit
a9bb4efe6a
|
@ -761,12 +761,19 @@ class Exploit < Msf::Module
|
||||||
|
|
||||||
c_platform, c_arch = normalize_platform_arch
|
c_platform, c_arch = normalize_platform_arch
|
||||||
|
|
||||||
framework.payloads.each_module(
|
results = Msf::Modules::Metadata::Cache.instance.find(
|
||||||
'Arch' => c_arch, 'Platform' => c_platform) { |name, mod|
|
'type' => [['payload'], []],
|
||||||
payloads << [ name, mod ] if is_payload_compatible?(name)
|
'platform' => [[*c_platform.names, 'All'], []], # "All" for generic
|
||||||
}
|
'arch' => [c_arch, []]
|
||||||
|
)
|
||||||
|
|
||||||
return payloads;
|
results.each do |res|
|
||||||
|
if is_payload_compatible?(res.ref_name)
|
||||||
|
payloads << [res.ref_name, framework.payloads[res.ref_name]]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
payloads
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue