1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-10-09 04:26:11 +02:00

Add some bonus archs for interact mode

This commit is contained in:
HD Moore 2017-05-27 17:26:50 -05:00
parent 41253ab32b
commit f9ecdf2b4d

View File

@ -99,10 +99,16 @@ class MetasploitModule < Msf::Exploit::Remote
ARCH_AARCH64 => [ 'aarch64' ],
#
# Missing from Rex::Arch
# ARCH_MIPS64LE = 'mips64le',
# ARCH_MIPS64LE = 'mips64el',
# ARCH_SPARC64 = 'sparc64',
# ARCH_S390X = 's390x',
#
}
# Platforms we don't offiically support but can shell anyways with interact
@@payload_arch_bonus = %W{
mips64el sparc64 s390x
}
end
# List all top-level directories within a given share
@ -286,6 +292,13 @@ class MetasploitModule < Msf::Exploit::Remote
all_architectures = @@payload_arch_mappings.values.flatten.uniq
# Include our bonus architectures for the interact payload
if target['Interact']
@@payload_arch_bonus.each do |t_arch|
all_architectures << t_arch
end
end
# Prioritize the most common architectures first
%W{ x86_64 x86 armel armhf mips mipsel }.each do |t_arch|
template_list << all_architectures.delete(t_arch)