diff --git a/modules/exploits/windows/local/bypassuac_injection.rb b/modules/exploits/windows/local/bypassuac_injection.rb index b58dcf72be..34446fa276 100644 --- a/modules/exploits/windows/local/bypassuac_injection.rb +++ b/modules/exploits/windows/local/bypassuac_injection.rb @@ -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"