Check payload.arch

bug/bundler_fix
Meatballs 2013-09-27 11:13:19 +01:00
parent 2764bfc1b4
commit 353cd9aaf5
1 changed files with 2 additions and 2 deletions

View File

@ -117,7 +117,7 @@ class Metasploit3 < Msf::Exploit::Local
# decide, x86 or x64 # decide, x86 or x64
sysarch = sysinfo["Architecture"] sysarch = sysinfo["Architecture"]
if sysarch =~ /x64/i if sysarch =~ /x64/i
unless(target_arch.first =~ /64/i) and (datastore['PAYLOAD'] =~ /64/i) unless(target_arch.first =~ /64/i) and (payload_instance.arch.first =~ /64/i)
fail_with( fail_with(
Exploit::Failure::BadConfig, Exploit::Failure::BadConfig,
"x86 Target Selected for x64 System" "x86 Target Selected for x64 System"
@ -134,7 +134,7 @@ class Metasploit3 < Msf::Exploit::Local
register_files_for_cleanup("#{windir}\\System32\\sysprep\\CRYPTBASE.dll") register_files_for_cleanup("#{windir}\\System32\\sysprep\\CRYPTBASE.dll")
end end
else else
if (target_arch.first =~ /64/i) or (datastore['PAYLOAD'] =~ /64/i) if (target_arch.first =~ /64/i) or (payload_instance.arch.first =~ /64/i)
fail_with( fail_with(
Exploit::Failure::BadConfig, Exploit::Failure::BadConfig,
"x64 Target Selected for x86 System" "x64 Target Selected for x86 System"