Check payload.arch
parent
2764bfc1b4
commit
353cd9aaf5
|
@ -117,7 +117,7 @@ class Metasploit3 < Msf::Exploit::Local
|
|||
# decide, x86 or x64
|
||||
sysarch = sysinfo["Architecture"]
|
||||
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(
|
||||
Exploit::Failure::BadConfig,
|
||||
"x86 Target Selected for x64 System"
|
||||
|
@ -134,7 +134,7 @@ class Metasploit3 < Msf::Exploit::Local
|
|||
register_files_for_cleanup("#{windir}\\System32\\sysprep\\CRYPTBASE.dll")
|
||||
end
|
||||
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(
|
||||
Exploit::Failure::BadConfig,
|
||||
"x64 Target Selected for x86 System"
|
||||
|
|
Loading…
Reference in New Issue